diff options
author | Wim Vriend <facetracknoir@gmail.com> | 2010-10-31 12:24:15 +0000 |
---|---|---|
committer | Wim Vriend <facetracknoir@gmail.com> | 2010-10-31 12:24:15 +0000 |
commit | 04ec6d036899a126e2d7fad1523c1c262442423d (patch) | |
tree | 900a2ff7cb58a89b6956f885453744914cb3f5e5 | |
parent | b785bbaf8ce50e0e11bd08e8818a613b5add66ed (diff) |
AutoStart feature added
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@27 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
-rw-r--r-- | FaceTrackNoIR.suo | bin | 268288 -> 270336 bytes | |||
-rw-r--r-- | FaceTrackNoIR/FTNoIR_Preferences.ui | 24 | ||||
-rw-r--r-- | FaceTrackNoIR/FaceTrackNoIR.cpp | 14 | ||||
-rw-r--r-- | List of compatible games.xls | bin | 21504 -> 22016 bytes | |||
-rw-r--r-- | List of compatible webcams.xls | bin | 19456 -> 19968 bytes | |||
-rw-r--r-- | bin/FaceTrackNoIR.exe | bin | 684032 -> 688128 bytes |
6 files changed, 32 insertions, 6 deletions
diff --git a/FaceTrackNoIR.suo b/FaceTrackNoIR.suo Binary files differindex bb4a4a07..3d6cffb9 100644 --- a/FaceTrackNoIR.suo +++ b/FaceTrackNoIR.suo diff --git a/FaceTrackNoIR/FTNoIR_Preferences.ui b/FaceTrackNoIR/FTNoIR_Preferences.ui index 63db7fbc..c3fbeff0 100644 --- a/FaceTrackNoIR/FTNoIR_Preferences.ui +++ b/FaceTrackNoIR/FTNoIR_Preferences.ui @@ -25,8 +25,8 @@ </property>
<layout class="QVBoxLayout" name="_vertical_layout">
<item>
- <layout class="QHBoxLayout" name="horLayCenter">
- <item>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
<widget class="QLabel" name="textLabel2">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
@@ -42,7 +42,7 @@ </property>
</widget>
</item>
- <item>
+ <item row="0" column="1">
<widget class="QSlider" name="slideAutoMinimizeTime">
<property name="toolTip">
<string extracomment="Time after Start Tracker"/>
@@ -55,7 +55,7 @@ </property>
</widget>
</item>
- <item>
+ <item row="0" column="2">
<widget class="QSpinBox" name="spinAutoMinimizeTime">
<property name="toolTip">
<string extracomment="Time after Start Tracker"/>
@@ -68,13 +68,27 @@ </property>
</widget>
</item>
- <item>
+ <item row="0" column="3">
<widget class="QLabel" name="label">
<property name="text">
<string>sec. (after 'Start')</string>
</property>
</widget>
</item>
+ <item row="1" column="1">
+ <widget class="QCheckBox" name="chkAutoStartTracking">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Automatically Start tracking on Startup</string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
<item>
diff --git a/FaceTrackNoIR/FaceTrackNoIR.cpp b/FaceTrackNoIR/FaceTrackNoIR.cpp index 8f26d08a..3a259cba 100644 --- a/FaceTrackNoIR/FaceTrackNoIR.cpp +++ b/FaceTrackNoIR/FaceTrackNoIR.cpp @@ -55,6 +55,15 @@ QMainWindow(parent, flags) trayIcon = 0;
setupFaceTrackNoIR();
+
+ //
+ // Read the AutoStartTracking value from the registry. If it is '1', start the Tracker and Minimize...
+ //
+ QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+ if (settings.value ( "AutoStartTracking", 0 ).toBool()) {
+ startTracker();
+ showMinimized();
+ }
}
/** sets up all objects and connections to buttons */
@@ -171,7 +180,7 @@ void FaceTrackNoIR::getGameProgramName() { }
//
-// Get the ProgramName from a connected game and display it.
+// Update the Settings, after a value has changed. This way, the Tracker does not have to re-start.
//
void FaceTrackNoIR::updateSettings() {
if ( tracker != NULL ) {
@@ -885,6 +894,7 @@ QWidget( parent , f) connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel()));
connect(ui.slideAutoMinimizeTime, SIGNAL(valueChanged(int)), this, SLOT(keyChanged(int)));
+ connect(ui.chkAutoStartTracking, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
// Load the settings from the current .INI-file
loadSettings();
@@ -950,6 +960,7 @@ void PreferencesDialog::loadSettings() { QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
ui.slideAutoMinimizeTime->setValue( settings.value ( "AutoMinimizeTime", 0 ).toInt() );
+ ui.chkAutoStartTracking->setChecked( settings.value ( "AutoStartTracking", 0 ).toBool() );
settingsDirty = false;
@@ -962,6 +973,7 @@ void PreferencesDialog::save() { QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
settings.setValue( "AutoMinimizeTime", ui.slideAutoMinimizeTime->value() );
+ settings.setValue( "AutoStartTracking", ui.chkAutoStartTracking->isChecked() );
//
// Send a message to the main program, to update the Settings (for the tracker)
diff --git a/List of compatible games.xls b/List of compatible games.xls Binary files differindex 8aecccd9..f66c1a54 100644 --- a/List of compatible games.xls +++ b/List of compatible games.xls diff --git a/List of compatible webcams.xls b/List of compatible webcams.xls Binary files differindex 4e704e3c..1bc25310 100644 --- a/List of compatible webcams.xls +++ b/List of compatible webcams.xls diff --git a/bin/FaceTrackNoIR.exe b/bin/FaceTrackNoIR.exe Binary files differindex de1532da..a0c35625 100644 --- a/bin/FaceTrackNoIR.exe +++ b/bin/FaceTrackNoIR.exe |