From ee4f1ceb7741cc1b578dafe37e255f96e15a5a84 Mon Sep 17 00:00:00 2001 From: Wim Vriend Date: Sun, 1 May 2011 14:20:34 +0000 Subject: Added controls for faceAPI git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@82 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb --- FTNoIR_Tracker_SM/FTNoIR_Tracker_SM.h | 59 +++++++++++++++++++++++++++++------ 1 file changed, 50 insertions(+), 9 deletions(-) (limited to 'FTNoIR_Tracker_SM/FTNoIR_Tracker_SM.h') diff --git a/FTNoIR_Tracker_SM/FTNoIR_Tracker_SM.h b/FTNoIR_Tracker_SM/FTNoIR_Tracker_SM.h index 1edc612f..702f236e 100644 --- a/FTNoIR_Tracker_SM/FTNoIR_Tracker_SM.h +++ b/FTNoIR_Tracker_SM/FTNoIR_Tracker_SM.h @@ -1,6 +1,6 @@ #include "..\ftnoir_tracker_base\ftnoir_tracker_base.h" #include "..\ftnoir_tracker_base\ftnoir_tracker_sm_types.h" -#include "ui_FTNoIR_SMClientcontrols.h" +#include "ui_FTNoIR_SM_controls.h" #include #include @@ -27,14 +27,6 @@ public: bool setParameterValue(const int index, const float newvalue); private: - /** face api variables **/ - //APIScope *faceapi_scope; - // QSharedPointer _engine; - //VideoDisplayWidget *_display; - //QVBoxLayout *l; - //MainWindow *main_window; - //parameter list for the filter-function(s) - // // global variables // @@ -53,3 +45,52 @@ private: QList parameterValueAsFloat; }; + +// Widget that has controls for SMoIR protocol client-settings. +class SMClientControls: public QWidget, Ui::UICSMClientControls, public ITrackerDialog +{ + Q_OBJECT +public: + + explicit SMClientControls(); + virtual ~SMClientControls(); + void showEvent ( QShowEvent * event ); + + void Release(); // Member functions which are accessible from outside the DLL + void Initialize(QWidget *parent); + +private: + Ui::UICSMClientControls ui; + void loadSettings(); + void save(); + bool SMCreateMapping(); + void doCommand( int command ); + + /** helper **/ + bool settingsDirty; + + // + // global variables + // + HANDLE hSMMemMap; + SMMemMap *pMemData; + HANDLE hSMMutex; + smEngineHandle *engine_handle; + QTimer *timUpdateSettings; // Timer to display current settings + +private slots: + void doOK(); + void doCancel(); + void settingChanged() { settingsDirty = true; }; + void showSettings(); + void doStartEngine(){ + doCommand(FT_SM_START); + } + void doStopEngine(){ + doCommand(FT_SM_STOP); + } + void doShowCam(){ + doCommand(FT_SM_SHOW_CAM); + } +}; + -- cgit v1.2.3