diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-04-29 16:29:34 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-04-29 16:29:34 +0200 |
commit | 6742c131815df55b69682b0ad04621d1a5814333 (patch) | |
tree | abe9da9d96efdb4c6cbafe217c45800851568a08 /facetracknoir | |
parent | d6535aa0293fad7d03b51a6cc9c607babbd5eb34 (diff) |
cleanup
Diffstat (limited to 'facetracknoir')
-rw-r--r-- | facetracknoir/facetracknoir.cpp | 19 | ||||
-rw-r--r-- | facetracknoir/facetracknoir.h | 3 |
2 files changed, 6 insertions, 16 deletions
diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp index 30e5d7e3..ba21d1de 100644 --- a/facetracknoir/facetracknoir.cpp +++ b/facetracknoir/facetracknoir.cpp @@ -193,7 +193,8 @@ FaceTrackNoIR::FaceTrackNoIR(QWidget *parent, Qt::WFlags flags) : keyZero(),
keyStartStop(),
keyInhibit(),
- looping(false)
+ looping(false),
+ timUpdateHeadPose(this)
{
GlobalPose = new HeadPoseData();
cameraDetected = false;
@@ -297,13 +298,8 @@ void FaceTrackNoIR::setupFaceTrackNoIR() { connect(ui.iconcomboTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int)));
connect(ui.iconcomboFilter, SIGNAL(currentIndexChanged(int)), this, SLOT(filterSelected(int)));
- //Setup the timer for automatically minimizing after StartTracker.
- timMinimizeFTN = new QTimer(this);
- connect(timMinimizeFTN, SIGNAL(timeout()), this, SLOT(showMinimized()));
-
//Setup the timer for showing the headpose.
- timUpdateHeadPose = new QTimer(this);
- connect(timUpdateHeadPose, SIGNAL(timeout()), this, SLOT(showHeadPose()));
+ connect(&timUpdateHeadPose, SIGNAL(timeout()), this, SLOT(showHeadPose()));
ui.txtTracking->setVisible(false);
settingsDirty = false;
}
@@ -752,7 +748,7 @@ void FaceTrackNoIR::startTracker( ) { //
// Start the timer to update the head-pose (digits and 'man in black')
//
- timUpdateHeadPose->start(40);
+ timUpdateHeadPose.start(40);
ui.lblX->setVisible(true);
ui.lblY->setVisible(true);
@@ -784,7 +780,7 @@ void FaceTrackNoIR::stopTracker( ) { //
// Stop displaying the head-pose.
//
- timUpdateHeadPose->stop();
+ timUpdateHeadPose.stop();
ui.pose_display->rotateBy(0, 0, 0);
ui.lblX->setVisible(false);
@@ -847,11 +843,6 @@ void FaceTrackNoIR::stopTracker( ) { ui.btnSave->setEnabled ( true );
ui.btnSaveAs->setEnabled ( true );
ui.btnShowFilterControls->setEnabled ( true );
-
- //
- // Stop the timer, so it won't go off again...
- //
- timMinimizeFTN->stop();
}
/** set the invert from the checkbox **/
diff --git a/facetracknoir/facetracknoir.h b/facetracknoir/facetracknoir.h index 3e4f3f96..7a179bd4 100644 --- a/facetracknoir/facetracknoir.h +++ b/facetracknoir/facetracknoir.h @@ -130,8 +130,7 @@ public slots: private:
Ui::FaceTrackNoIRClass ui;
- QTimer *timMinimizeFTN; // Timer to Auto-minimize
- QTimer *timUpdateHeadPose; // Timer to display headpose
+ QTimer timUpdateHeadPose; // Timer to display headpose
QStringList iniFileList; // List of INI-files, that are present in the Settings folder
ITrackerDialog* pTrackerDialog; // Pointer to Tracker dialog instance (in DLL)
|