summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2012-12-08 10:01:20 +0000
committerWim Vriend <facetracknoir@gmail.com>2012-12-08 10:01:20 +0000
commit9fdac8789acda4989a094a8ed8c9a19cdc29f7f6 (patch)
tree312ba59534193883e07f87bce3ab856caf1f679e
parentacdb0aaf27e2ca623a9e32ea7efcc484aecde498 (diff)
Modified main form a bit
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@197 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.cpp5
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.qrc1
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.ui165
-rw-r--r--FaceTrackNoIR/tracker.cpp10
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 @@
<RCC>
<qresource prefix="/">
+ <file>UIElements/Tools.png</file>
<file>images/Settings16.png</file>
<file>images/SettingsOpen16.png</file>
<file>UIElements/Donate.png</file>
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 @@
<x>0</x>
<y>0</y>
<width>925</width>
- <height>411</height>
+ <height>415</height>
</rect>
</property>
<property name="sizePolicy">
@@ -20,6 +20,18 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>415</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>415</height>
+ </size>
+ </property>
<property name="contextMenuPolicy">
<enum>Qt::DefaultContextMenu</enum>
</property>
@@ -1665,7 +1677,7 @@ opacity:100;</string>
<widget class="QLabel" name="cameraName">
<property name="minimumSize">
<size>
- <width>420</width>
+ <width>400</width>
<height>25</height>
</size>
</property>
@@ -1688,7 +1700,7 @@ background:none;</string>
<widget class="QLabel" name="gameName">
<property name="minimumSize">
<size>
- <width>420</width>
+ <width>400</width>
<height>20</height>
</size>
</property>
@@ -1709,57 +1721,6 @@ background:none;</string>
</item>
</layout>
</item>
- <item>
- <widget class="QPushButton" name="btnEditCurves">
- <property name="minimumSize">
- <size>
- <width>52</width>
- <height>40</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>180</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="cursor">
- <cursorShape>PointingHandCursor</cursorShape>
- </property>
- <property name="toolTip">
- <string>Edit the Curve settings</string>
- </property>
- <property name="styleSheet">
- <string notr="true">background:none;</string>
- </property>
- <property name="text">
- <string>Curves</string>
- </property>
- <property name="icon">
- <iconset resource="FaceTrackNoIR.qrc">
- <normaloff>:/UIElements/Curves.png</normaloff>:/UIElements/Curves.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>150</width>
- <height>32</height>
- </size>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
</item>
</layout>
@@ -1769,8 +1730,11 @@ background:none;</string>
</item>
<item row="4" column="0">
<layout class="QGridLayout" name="gridLayout_5">
+ <property name="leftMargin">
+ <number>10</number>
+ </property>
<property name="verticalSpacing">
- <number>1</number>
+ <number>6</number>
</property>
<item row="0" column="0">
<widget class="QGroupBox" name="groupTrackerSource">
@@ -2081,19 +2045,100 @@ background:none;</string>
</widget>
</widget>
</item>
- <item row="1" column="2">
- <spacer name="verticalSpacer">
+ <item row="0" column="3">
+ <spacer name="horizontalSpacer_2">
<property name="orientation">
- <enum>Qt::Vertical</enum>
+ <enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
- <width>20</width>
- <height>30</height>
+ <width>40</width>
+ <height>20</height>
</size>
</property>
</spacer>
</item>
+ <item row="1" column="2">
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QPushButton" name="btnShortcuts">
+ <property name="minimumSize">
+ <size>
+ <width>52</width>
+ <height>38</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>200</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="cursor">
+ <cursorShape>PointingHandCursor</cursorShape>
+ </property>
+ <property name="toolTip">
+ <string>Edit the Keyboard and mouse shortcuts</string>
+ </property>
+ <property name="text">
+ <string>Short
+cuts</string>
+ </property>
+ <property name="icon">
+ <iconset resource="FaceTrackNoIR.qrc">
+ <normaloff>:/UIElements/Tools.png</normaloff>:/UIElements/Tools.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="btnEditCurves">
+ <property name="minimumSize">
+ <size>
+ <width>52</width>
+ <height>38</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>200</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="cursor">
+ <cursorShape>PointingHandCursor</cursorShape>
+ </property>
+ <property name="toolTip">
+ <string>Edit the Curve settings</string>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">background:none;</string>
+ </property>
+ <property name="text">
+ <string>Curves</string>
+ </property>
+ <property name="icon">
+ <iconset resource="FaceTrackNoIR.qrc">
+ <normaloff>:/UIElements/Curves.png</normaloff>:/UIElements/Curves.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>70</width>
+ <height>24</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
</layout>
</item>
</layout>
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();