summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_sm
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-10-24 17:37:35 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-10-24 17:37:35 +0200
commit0a09ee52d3f22201819234ea15d2d50f3dd0e48e (patch)
tree940f02e767532a0b1223661f97788b9b2d65fe7b /ftnoir_tracker_sm
parent941b72e0124d4a242b3a01b648be29fecbf8b928 (diff)
faceapi: stuff
Diffstat (limited to 'ftnoir_tracker_sm')
-rw-r--r--ftnoir_tracker_sm/ftnoir_sm_controls.ui19
-rw-r--r--ftnoir_tracker_sm/ftnoir_tracker_faceapi.cpp2
-rw-r--r--ftnoir_tracker_sm/ftnoir_tracker_faceapi_dialog.cpp20
-rw-r--r--ftnoir_tracker_sm/ftnoir_tracker_sm.h32
4 files changed, 37 insertions, 36 deletions
diff --git a/ftnoir_tracker_sm/ftnoir_sm_controls.ui b/ftnoir_tracker_sm/ftnoir_sm_controls.ui
index 732f0598..ecc252f1 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>172</width>
- <height>220</height>
+ <width>174</width>
+ <height>188</height>
</rect>
</property>
<property name="windowTitle">
@@ -27,10 +27,13 @@
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetMaximumSize</enum>
+ </property>
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
+ <sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -38,12 +41,18 @@
<property name="title">
<string>Axis enablement</string>
</property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
<layout class="QFormLayout" name="formLayout">
<property name="labelAlignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="formAlignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ <set>Qt::AlignHCenter|Qt::AlignTop</set>
+ </property>
+ <property name="leftMargin">
+ <number>10</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_6">
diff --git a/ftnoir_tracker_sm/ftnoir_tracker_faceapi.cpp b/ftnoir_tracker_sm/ftnoir_tracker_faceapi.cpp
index b867c60a..77fcd6fc 100644
--- a/ftnoir_tracker_sm/ftnoir_tracker_faceapi.cpp
+++ b/ftnoir_tracker_sm/ftnoir_tracker_faceapi.cpp
@@ -22,11 +22,11 @@
* with this program; if not, see <http://www.gnu.org/licenses/>. *
* *
********************************************************************************/
-#include "ftnoir_tracker_sm.h"
#include <QtGui>
#include <QMessageBox>
#include "facetracknoir/global-settings.h"
#include <QThread>
+#include "ftnoir_tracker_sm/ftnoir_tracker_sm.h"
FTNoIR_Tracker::FTNoIR_Tracker() : shm(SM_MM_DATA, SM_MUTEX, sizeof(SMMemMap)), started(false)
{
diff --git a/ftnoir_tracker_sm/ftnoir_tracker_faceapi_dialog.cpp b/ftnoir_tracker_sm/ftnoir_tracker_faceapi_dialog.cpp
index 1dbdd67f..3510f3e9 100644
--- a/ftnoir_tracker_sm/ftnoir_tracker_faceapi_dialog.cpp
+++ b/ftnoir_tracker_sm/ftnoir_tracker_faceapi_dialog.cpp
@@ -22,8 +22,8 @@
* with this program; if not, see <http://www.gnu.org/licenses/>. *
* *
********************************************************************************/
-#include "ftnoir_tracker_sm.h"
#include <QtGui>
+#include "ftnoir_tracker_sm/ftnoir_tracker_sm.h"
#include "facetracknoir/global-settings.h"
//*******************************************************************************************************
@@ -33,24 +33,24 @@
//
// Constructor for server-settings-dialog
//
-TrackerControls::TrackerControls() : QWidget()
+TrackerControls::TrackerControls() : settingsDirty(false)
{
ui.setupUi( this );
//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.
- 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)));
- connect(ui.chkEnableYaw, SIGNAL(stateChanged(int)), this, SLOT(settingChanged(int)));
- connect(ui.chkEnableX, SIGNAL(stateChanged(int)), this, SLOT(settingChanged(int)));
- connect(ui.chkEnableY, SIGNAL(stateChanged(int)), this, SLOT(settingChanged(int)));
- connect(ui.chkEnableZ, SIGNAL(stateChanged(int)), this, SLOT(settingChanged(int)));
+ connect(ui.chkEnableRoll, SIGNAL(setChecked(int)), this, SLOT(settingChanged(int)));
+ connect(ui.chkEnablePitch, SIGNAL(setChecked(int)), this, SLOT(settingChanged(int)));
+ connect(ui.chkEnableYaw, SIGNAL(setChecked(int)), this, SLOT(settingChanged(int)));
+ connect(ui.chkEnableX, SIGNAL(setChecked(int)), this, SLOT(settingChanged(int)));
+ connect(ui.chkEnableY, SIGNAL(setChecked(int)), this, SLOT(settingChanged(int)));
+ connect(ui.chkEnableZ, SIGNAL(setChecked(int)), this, SLOT(settingChanged(int)));
+ connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOk()));
+ connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doOCancel()));
}
//
diff --git a/ftnoir_tracker_sm/ftnoir_tracker_sm.h b/ftnoir_tracker_sm/ftnoir_tracker_sm.h
index 4f38a045..4089983d 100644
--- a/ftnoir_tracker_sm/ftnoir_tracker_sm.h
+++ b/ftnoir_tracker_sm/ftnoir_tracker_sm.h
@@ -22,10 +22,8 @@
* with this program; if not, see <http://www.gnu.org/licenses/>. *
* *
********************************************************************************/
-#include "ftnoir_tracker_base/ftnoir_tracker_base.h"
-#include "ftnoir_tracker_sm/ftnoir_tracker_sm_types.h"
-#include "ui_ftnoir_sm_controls.h"
-
+#include <QObject>
+#include <QWidget>
#include <QMessageBox>
#include <QSettings>
#include <QProcess>
@@ -34,6 +32,9 @@
#include "facetracknoir/global-settings.h"
#include "compat/compat.h"
#include <QFrame>
+#include "ftnoir_tracker_base/ftnoir_tracker_base.h"
+#include "ftnoir_tracker_sm/ftnoir_tracker_sm_types.h"
+#include "ui_ftnoir_sm_controls.h"
using namespace std;
@@ -73,9 +74,9 @@ private:
bool started;
};
-// Widget that has controls for SMoIR protocol client-settings.
class TrackerControls: public QWidget, public ITrackerDialog
{
+ Q_OBJECT
public:
explicit TrackerControls();
virtual ~TrackerControls();
@@ -86,25 +87,16 @@ public:
}
void unRegisterTracker() {
}
-
-private:
- Ui::UICSMClientControls ui;
- void loadSettings();
- bool settingsDirty;
-
-private slots:
+protected slots:
void doOK();
void doCancel();
void save();
void settingChanged() { settingsDirty = true; }
- void showSettings( int newState );
-public slots:
- void stateChanged(int) {
- settingsDirty = true;
- }
- void settingChanged(int) {
- settingsDirty = true;
- }
+ void settingChanged(int) { settingsDirty = true; }
+private:
+ Ui::UICSMClientControls ui;
+ void loadSettings();
+ bool settingsDirty;
};
//*******************************************************************************************************