From 04ec6d036899a126e2d7fad1523c1c262442423d Mon Sep 17 00:00:00 2001 From: Wim Vriend Date: Sun, 31 Oct 2010 12:24:15 +0000 Subject: AutoStart feature added git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@27 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb --- FaceTrackNoIR.suo | Bin 268288 -> 270336 bytes FaceTrackNoIR/FTNoIR_Preferences.ui | 24 +++++++++++++++++++----- FaceTrackNoIR/FaceTrackNoIR.cpp | 14 +++++++++++++- List of compatible games.xls | Bin 21504 -> 22016 bytes List of compatible webcams.xls | Bin 19456 -> 19968 bytes bin/FaceTrackNoIR.exe | Bin 684032 -> 688128 bytes 6 files changed, 32 insertions(+), 6 deletions(-) diff --git a/FaceTrackNoIR.suo b/FaceTrackNoIR.suo index bb4a4a07..3d6cffb9 100644 Binary files a/FaceTrackNoIR.suo and b/FaceTrackNoIR.suo differ 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 @@ - - + + @@ -42,7 +42,7 @@ - + @@ -55,7 +55,7 @@ - + @@ -68,13 +68,27 @@ - + sec. (after 'Start') + + + + + + + + + + + Automatically Start tracking on Startup + + + 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 index 8aecccd9..f66c1a54 100644 Binary files a/List of compatible games.xls and b/List of compatible games.xls differ diff --git a/List of compatible webcams.xls b/List of compatible webcams.xls index 4e704e3c..1bc25310 100644 Binary files a/List of compatible webcams.xls and b/List of compatible webcams.xls differ diff --git a/bin/FaceTrackNoIR.exe b/bin/FaceTrackNoIR.exe index de1532da..a0c35625 100644 Binary files a/bin/FaceTrackNoIR.exe and b/bin/FaceTrackNoIR.exe differ -- cgit v1.2.3