summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/facetracknoir.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-04-13 00:45:20 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-04-13 00:45:20 +0200
commitb89195cee53549704e0807a802f5f05ed5d4e87a (patch)
tree1042585a3bc0a9deabe491d5c00322736e37d99f /facetracknoir/facetracknoir.cpp
parentc98efcbfdebd2e6ce85cb1b3b08a1bc48f3d968b (diff)
Fix last commit, remove duplicated code
Diffstat (limited to 'facetracknoir/facetracknoir.cpp')
-rw-r--r--facetracknoir/facetracknoir.cpp32
1 files changed, 18 insertions, 14 deletions
diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp
index 7442940f..37f54aaa 100644
--- a/facetracknoir/facetracknoir.cpp
+++ b/facetracknoir/facetracknoir.cpp
@@ -740,9 +740,22 @@ void FaceTrackNoIR::startTracker( ) {
delete tracker;
}
- if (GlobalPose)
- delete GlobalPose;
- GlobalPose = new HeadPoseData();
+ QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+ QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
+ QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
+ GlobalPose->X.curvePtr->loadSettings(iniFile);
+ GlobalPose->Y.curvePtr->loadSettings(iniFile);
+ GlobalPose->Z.curvePtr->loadSettings(iniFile);
+ GlobalPose->Yaw.curvePtr->loadSettings(iniFile);
+ GlobalPose->Pitch.curvePtr->loadSettings(iniFile);
+ GlobalPose->Roll.curvePtr->loadSettings(iniFile);
+
+ GlobalPose->X.curvePtrAlt->loadSettings(iniFile);
+ GlobalPose->Y.curvePtrAlt->loadSettings(iniFile);
+ GlobalPose->Z.curvePtrAlt->loadSettings(iniFile);
+ GlobalPose->Yaw.curvePtrAlt->loadSettings(iniFile);
+ GlobalPose->Pitch.curvePtrAlt->loadSettings(iniFile);
+ GlobalPose->Roll.curvePtrAlt->loadSettings(iniFile);
tracker = new Tracker ( this );
@@ -788,11 +801,10 @@ void FaceTrackNoIR::startTracker( ) {
// Get the TimeOut value for minimizing FaceTrackNoIR
// Only start the Timer if value > 0
//
- QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
- int timevalue = settings.value ( "AutoMinimizeTime", 0 ).toInt() * 1000;
+ int timevalue = iniFile.value ( "AutoMinimizeTime", 0 ).toInt() * 1000;
if (timevalue > 0) {
- bool minimizeTaskBar = settings.value ( "MinimizeTaskBar", 1 ).toBool();
+ bool minimizeTaskBar = iniFile.value ( "MinimizeTaskBar", 1 ).toBool();
if (minimizeTaskBar) {
connect(timMinimizeFTN, SIGNAL(timeout()), this, SLOT(showMinimized()));
}
@@ -1958,14 +1970,6 @@ void CurveConfigurationDialog::loadSettings() {
iniFile.beginGroup ( "Tracking" );
iniFile.endGroup ();
- ui.rxconfig->loadSettings(currentFile);
- ui.ryconfig->loadSettings(currentFile);
- ui.rzconfig->loadSettings(currentFile);
-
- ui.rxconfig_alt->loadSettings(currentFile);
- ui.ryconfig_alt->loadSettings(currentFile);
- ui.rzconfig_alt->loadSettings(currentFile);
-
GlobalPose->Yaw.altp = iniFile.value("rx_alt", false).toBool();
GlobalPose->Pitch.altp = iniFile.value("ry_alt", false).toBool();
GlobalPose->Roll.altp = iniFile.value("rz_alt", false).toBool();