diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-09-02 12:59:43 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-09-02 12:59:43 +0200 |
commit | 82ffb9b11a6f5bc94c658a10d6c2c21c0f217d18 (patch) | |
tree | e4ae39dd2917226f2fe38972a998b45bb32b0f06 | |
parent | afbec6a10b1e718fed134f61295e92f1e94770d4 (diff) |
UI cleanup, tracking overlay already provides that information. Expose one internal value less.
-rw-r--r-- | facetracknoir/facetracknoir.cpp | 4 | ||||
-rw-r--r-- | facetracknoir/facetracknoir.ui | 35 | ||||
-rw-r--r-- | facetracknoir/tracker.cpp | 11 | ||||
-rw-r--r-- | facetracknoir/tracker.h | 3 |
4 files changed, 5 insertions, 48 deletions
diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp index bb0cef11..aa49fe90 100644 --- a/facetracknoir/facetracknoir.cpp +++ b/facetracknoir/facetracknoir.cpp @@ -270,7 +270,6 @@ void FaceTrackNoIR::setupFaceTrackNoIR() { //Setup the timer for showing the headpose.
connect(&timUpdateHeadPose, SIGNAL(timeout()), this, SLOT(showHeadPose()));
- ui.txtTracking->setVisible(false);
settingsDirty = false;
}
@@ -766,7 +765,6 @@ void FaceTrackNoIR::stopTracker( ) { ui.lcdNumOutputRotX->setVisible(false);
ui.lcdNumOutputRotY->setVisible(false);
ui.lcdNumOutputRotZ->setVisible(false);
- ui.txtTracking->setVisible(false);
//
// Delete the tracker (after stopping things and all).
@@ -854,8 +852,6 @@ void FaceTrackNoIR::showHeadPose() { ui.lcdNumRotY->display(QString("%1").arg(newdata[Pitch], 0, 'f', 1));
ui.lcdNumRotZ->display(QString("%1").arg(newdata[Roll], 0, 'f', 1));
- ui.txtTracking->setVisible(tracker->getTrackingActive());
-
//
// Get the output-pose and also display it.
//
diff --git a/facetracknoir/facetracknoir.ui b/facetracknoir/facetracknoir.ui index ee5fb5b0..fca13902 100644 --- a/facetracknoir/facetracknoir.ui +++ b/facetracknoir/facetracknoir.ui @@ -1482,7 +1482,7 @@ background:none;</string> <property name="geometry">
<rect>
<x>10</x>
- <y>20</y>
+ <y>12</y>
<width>231</width>
<height>169</height>
</rect>
@@ -1698,39 +1698,6 @@ color:white;</string> </property>
</widget>
</widget>
- <widget class="QGroupBox" name="groupBox_2">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>0</y>
- <width>231</width>
- <height>50</height>
- </rect>
- </property>
- <property name="title">
- <string>Status</string>
- </property>
- <property name="flat">
- <bool>true</bool>
- </property>
- <widget class="QLabel" name="txtTracking">
- <property name="geometry">
- <rect>
- <x>110</x>
- <y>10</y>
- <width>101</width>
- <height>16</height>
- </rect>
- </property>
- <property name="styleSheet">
- <string notr="true">border:none;
-color: rgb(0, 255, 0);</string>
- </property>
- <property name="text">
- <string>Tracking</string>
- </property>
- </widget>
- </widget>
</widget>
<widget class="QWidget" name="widget4logo" native="true">
<property name="geometry">
diff --git a/facetracknoir/tracker.cpp b/facetracknoir/tracker.cpp index a0b827e4..0d584fae 100644 --- a/facetracknoir/tracker.cpp +++ b/facetracknoir/tracker.cpp @@ -70,7 +70,6 @@ /** constructor **/
Tracker::Tracker( FaceTrackNoIR *parent ) :
- confid(false),
should_quit(false),
do_center(false)
{
@@ -137,7 +136,7 @@ void Tracker::run() { {
QMutexLocker foo(&mtx);
- confid = bTracker1Confid || bTracker2Confid;
+ const bool confid = bTracker1Confid || bTracker2Confid;
if ( confid ) {
for (int i = 0; i < 6; i++)
@@ -151,10 +150,8 @@ void Tracker::run() { //
// Only copy valid values
//
- if (confid) {
- for (int i = 0; i < 6; i++)
- offset_camera.axes[i] = mainApp->axis(i).headPos;
- }
+ for (int i = 0; i < 6; i++)
+ offset_camera.axes[i] = mainApp->axis(i).headPos;
Tracker::do_center = false;
@@ -168,7 +165,7 @@ void Tracker::run() { Libraries->pFilter->Initialize();
}
- if (getTrackingActive()) {
+ if (confid) {
// get values
for (int i = 0; i < 6; i++)
target_camera.axes[i] = mainApp->axis(i).headPos;
diff --git a/facetracknoir/tracker.h b/facetracknoir/tracker.h index f452395d..c023d54e 100644 --- a/facetracknoir/tracker.h +++ b/facetracknoir/tracker.h @@ -119,7 +119,6 @@ public: Tracker( FaceTrackNoIR *parent );
~Tracker();
void loadSettings(); // Load settings from the INI-file
- bool getTrackingActive() { return confid; }
void setInvertAxis(Axis axis, bool invert);
@@ -129,8 +128,6 @@ public: volatile bool should_quit;
// following are now protected by hTrackMutex
volatile bool do_center; // Center head-position, using the shortkey
- // Flags to start/stop/reset tracking
- volatile bool confid; // Tracker data is OK;
T6DOF output_camera;
};
|