summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_sm
diff options
context:
space:
mode:
Diffstat (limited to 'ftnoir_tracker_sm')
-rw-r--r--ftnoir_tracker_sm/ftnoir_sm_controls.ui78
-rw-r--r--ftnoir_tracker_sm/ftnoir_tracker_faceapi_dialog.cpp30
-rw-r--r--ftnoir_tracker_sm/ftnoir_tracker_sm.h2
3 files changed, 27 insertions, 83 deletions
diff --git a/ftnoir_tracker_sm/ftnoir_sm_controls.ui b/ftnoir_tracker_sm/ftnoir_sm_controls.ui
index 2be55a91..732f0598 100644
--- a/ftnoir_tracker_sm/ftnoir_sm_controls.ui
+++ b/ftnoir_tracker_sm/ftnoir_sm_controls.ui
@@ -9,8 +9,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>252</width>
- <height>222</height>
+ <width>172</width>
+ <height>220</height>
</rect>
</property>
<property name="windowTitle">
@@ -26,50 +26,8 @@
<property name="autoFillBackground">
<bool>false</bool>
</property>
- <layout class="QFormLayout" name="formLayout_2">
- <item row="1" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QPushButton" name="btnSave">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>70</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Save</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="0" column="1">
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
@@ -77,18 +35,15 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>140</height>
- </size>
- </property>
<property name="title">
- <string>Enable Axis</string>
+ <string>Axis enablement</string>
</property>
<layout class="QFormLayout" name="formLayout">
- <property name="sizeConstraint">
- <enum>QLayout::SetMinAndMaxSize</enum>
+ <property name="labelAlignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+ </property>
+ <property name="formAlignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_6">
@@ -234,6 +189,19 @@
</layout>
</widget>
</item>
+ <item row="1" column="0">
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
<resources/>
diff --git a/ftnoir_tracker_sm/ftnoir_tracker_faceapi_dialog.cpp b/ftnoir_tracker_sm/ftnoir_tracker_faceapi_dialog.cpp
index 8c3cd922..d8f90e62 100644
--- a/ftnoir_tracker_sm/ftnoir_tracker_faceapi_dialog.cpp
+++ b/ftnoir_tracker_sm/ftnoir_tracker_faceapi_dialog.cpp
@@ -44,24 +44,13 @@ TrackerControls::TrackerControls() :
theTracker = NULL;
prev_state = -1;
- // Connect Qt signals to member-functions
- connect(ui.btnOK, SIGNAL(clicked()), this, SLOT(doOK()));
- connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel()));
- connect(ui.btnEngineStart, SIGNAL(clicked()), this, SLOT(doStartEngine()));
- connect(ui.btnEngineStop, SIGNAL(clicked()), this, SLOT(doStopEngine()));
- connect(ui.btnSave, SIGNAL(clicked()), this, SLOT(save()));
-
- ui.cbxFilterSetting->addItem("None");
- ui.cbxFilterSetting->addItem("Normal");
- ui.cbxFilterSetting->addItem("High");
- connect(ui.cbxFilterSetting, SIGNAL(currentIndexChanged(int)), this, SLOT(doSetFilter( int )));
- connect(ui.btnCameraSettings, SIGNAL(clicked()), this, SLOT(doShowCam()));
+ //connect(ui.cbxFilterSetting, SIGNAL(currentIndexChanged(int)), this, SLOT(doSetFilter( int )));
+ //connect(ui.btnCameraSettings, SIGNAL(clicked()), this, SLOT(doShowCam()));
//Setup the timer for showing the headpose.
- timUpdateSettings = new QTimer(this);
- connect(timUpdateSettings, SIGNAL(timeout()), this, SLOT(doTimUpdate()));
- timUpdateSettings->start(100);
connect(this, SIGNAL(stateChanged( int )), this, SLOT(showSettings( int )));
+ connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK()));
+ connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel()));
connect(ui.chkEnableRoll, SIGNAL(stateChanged(int)), this, SLOT(settingChanged(int)));
connect(ui.chkEnablePitch, SIGNAL(stateChanged(int)), this, SLOT(settingChanged(int)));
@@ -201,17 +190,6 @@ void TrackerControls::save() {
settingsDirty = false;
}
-// Show the current engine-settings etc.
-//
-void TrackerControls::doTimUpdate()
-{
- int state = pMemData->state;
- if ( state != prev_state) {
- emit stateChanged(state);
- prev_state = state;
- }
-}
-
//
// Show the current engine-settings etc.
//
diff --git a/ftnoir_tracker_sm/ftnoir_tracker_sm.h b/ftnoir_tracker_sm/ftnoir_tracker_sm.h
index 49ae7ff5..615d9d1b 100644
--- a/ftnoir_tracker_sm/ftnoir_tracker_sm.h
+++ b/ftnoir_tracker_sm/ftnoir_tracker_sm.h
@@ -98,8 +98,6 @@ private:
SMMemMap *pMemData;
smEngineHandle *engine_handle;
- QTimer *timUpdateSettings; // Timer to display current settings
-
FTNoIR_Tracker *theTracker;
PortableLockedShm shm;