From 9fdac8789acda4989a094a8ed8c9a19cdc29f7f6 Mon Sep 17 00:00:00 2001 From: Wim Vriend Date: Sat, 8 Dec 2012 10:01:20 +0000 Subject: Modified main form a bit git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@197 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb --- FaceTrackNoIR/FaceTrackNoIR.cpp | 5 +- FaceTrackNoIR/FaceTrackNoIR.qrc | 1 + FaceTrackNoIR/FaceTrackNoIR.ui | 165 +++++++++++++++++++++++++--------------- FaceTrackNoIR/tracker.cpp | 10 ++- 4 files changed, 115 insertions(+), 66 deletions(-) diff --git a/FaceTrackNoIR/FaceTrackNoIR.cpp b/FaceTrackNoIR/FaceTrackNoIR.cpp index ebe75265..5494c918 100644 --- a/FaceTrackNoIR/FaceTrackNoIR.cpp +++ b/FaceTrackNoIR/FaceTrackNoIR.cpp @@ -123,6 +123,7 @@ void FaceTrackNoIR::setupFaceTrackNoIR() { connect(ui.actionKeyboard_Shortcuts, SIGNAL(triggered()), this, SLOT(showKeyboardShortcuts())); connect(ui.actionCurve_Configuration, SIGNAL(triggered()), this, SLOT(showCurveConfiguration())); connect(ui.btnEditCurves, SIGNAL(clicked()), this, SLOT(showCurveConfiguration())); + connect(ui.btnShortcuts, SIGNAL(clicked()), this, SLOT(showKeyboardShortcuts())); connect(ui.actionSupport, SIGNAL(triggered()), this, SLOT(openurl_support())); connect(ui.actionYour_Support, SIGNAL(triggered()), this, SLOT(openurl_donation())); @@ -1914,7 +1915,7 @@ int keyindex; // Center key ui.cbxCenterMouseKey->setCurrentIndex( iniFile.value ( "MouseKey_Center", 0 ).toInt() ); - keyindex = keyList.indexOf ( iniFile.value ( "Keycode_Center", 1 ).toInt() ); + keyindex = keyList.indexOf ( iniFile.value ( "Keycode_Center", DIK_HOME ).toInt() ); if ( keyindex > 0 ) { ui.cbxCenterKey->setCurrentIndex( keyindex ); } @@ -1940,7 +1941,7 @@ int keyindex; // Start/stop key ui.cbxStartStopMouseKey->setCurrentIndex( iniFile.value ( "MouseKey_StartStop", 0 ).toInt() ); - keyindex = keyList.indexOf ( iniFile.value ( "Keycode_StartStop", 1 ).toInt() ); + keyindex = keyList.indexOf ( iniFile.value ( "Keycode_StartStop", DIK_END ).toInt() ); if ( keyindex > 0 ) { ui.cbxStartStopKey->setCurrentIndex( keyindex ); } diff --git a/FaceTrackNoIR/FaceTrackNoIR.qrc b/FaceTrackNoIR/FaceTrackNoIR.qrc index 32169124..60e4da7b 100644 --- a/FaceTrackNoIR/FaceTrackNoIR.qrc +++ b/FaceTrackNoIR/FaceTrackNoIR.qrc @@ -1,5 +1,6 @@ + UIElements/Tools.png images/Settings16.png images/SettingsOpen16.png UIElements/Donate.png diff --git a/FaceTrackNoIR/FaceTrackNoIR.ui b/FaceTrackNoIR/FaceTrackNoIR.ui index 1cdd5891..9b32fc89 100644 --- a/FaceTrackNoIR/FaceTrackNoIR.ui +++ b/FaceTrackNoIR/FaceTrackNoIR.ui @@ -11,7 +11,7 @@ 0 0 925 - 411 + 415 @@ -20,6 +20,18 @@ 0 + + + 0 + 415 + + + + + 16777215 + 415 + + Qt::DefaultContextMenu @@ -1665,7 +1677,7 @@ opacity:100; - 420 + 400 25 @@ -1688,7 +1700,7 @@ background:none; - 420 + 400 20 @@ -1709,57 +1721,6 @@ background:none; - - - - - 52 - 40 - - - - - 180 - 16777215 - - - - PointingHandCursor - - - Edit the Curve settings - - - background:none; - - - Curves - - - - :/UIElements/Curves.png:/UIElements/Curves.png - - - - 150 - 32 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - @@ -1769,8 +1730,11 @@ background:none; + + 10 + - 1 + 6 @@ -2081,19 +2045,100 @@ background:none; - - + + - Qt::Vertical + Qt::Horizontal - 20 - 30 + 40 + 20 + + + + + + + 52 + 38 + + + + + 200 + 16777215 + + + + PointingHandCursor + + + Edit the Keyboard and mouse shortcuts + + + Short +cuts + + + + :/UIElements/Tools.png:/UIElements/Tools.png + + + + 24 + 24 + + + + + + + + + 52 + 38 + + + + + 200 + 16777215 + + + + PointingHandCursor + + + Edit the Curve settings + + + Qt::LeftToRight + + + background:none; + + + Curves + + + + :/UIElements/Curves.png:/UIElements/Curves.png + + + + 70 + 24 + + + + + + diff --git a/FaceTrackNoIR/tracker.cpp b/FaceTrackNoIR/tracker.cpp index c8f297a0..f24ace79 100644 --- a/FaceTrackNoIR/tracker.cpp +++ b/FaceTrackNoIR/tracker.cpp @@ -624,13 +624,15 @@ bool bTracker2Confid = false; bTracker2Confid = pSecondTracker->GiveHeadPoseData(&newpose); } else { - bTracker2Confid = true; + bTracker2Confid = false; + bInitialCenter2 = false; } if (pTracker) { bTracker1Confid = pTracker->GiveHeadPoseData(&newpose); } else { - bTracker1Confid = true; + bTracker1Confid = false; + bInitialCenter1 = false; } Tracker::confid = (bTracker1Confid || bTracker2Confid); @@ -951,14 +953,14 @@ int sensX, sensY, sensZ; // Center key CenterMouseKey = iniFile.value ( "MouseKey_Center", 0 ).toInt(); - CenterKey.keycode = iniFile.value ( "Keycode_Center", 0 ).toInt(); + CenterKey.keycode = iniFile.value ( "Keycode_Center", DIK_HOME ).toInt(); CenterKey.shift = iniFile.value ( "Shift_Center", 0 ).toBool(); CenterKey.ctrl = iniFile.value ( "Ctrl_Center", 0 ).toBool(); CenterKey.alt = iniFile.value ( "Alt_Center", 0 ).toBool(); // StartStop key StartStopMouseKey = iniFile.value ( "MouseKey_StartStop", 0 ).toInt(); - StartStopKey.keycode = iniFile.value ( "Keycode_StartStop", 0 ).toInt(); + StartStopKey.keycode = iniFile.value ( "Keycode_StartStop", DIK_END ).toInt(); StartStopKey.shift = iniFile.value ( "Shift_StartStop", 0 ).toBool(); StartStopKey.ctrl = iniFile.value ( "Ctrl_StartStop", 0 ).toBool(); StartStopKey.alt = iniFile.value ( "Alt_StartStop", 0 ).toBool(); -- cgit v1.2.3