summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-09-15 04:32:44 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-09-15 04:32:44 +0200
commit7b0ce8034456271ab0ea15da9b60fe9b94d75dc0 (patch)
tree62e2dfa60e418efeb47f94b1dda2b623e46fa77a /facetracknoir
parent842d261e5d0d2af65b6327288cecc845d452db5a (diff)
Don't use tracker.cpp indirection for updating zeroing
Diffstat (limited to 'facetracknoir')
-rw-r--r--facetracknoir/curve-config.cpp8
-rw-r--r--facetracknoir/facetracknoir.cpp9
-rw-r--r--facetracknoir/facetracknoir.h2
-rw-r--r--facetracknoir/tracker.cpp30
-rw-r--r--facetracknoir/tracker.h1
5 files changed, 3 insertions, 47 deletions
diff --git a/facetracknoir/curve-config.cpp b/facetracknoir/curve-config.cpp
index 5421c670..1bb40078 100644
--- a/facetracknoir/curve-config.cpp
+++ b/facetracknoir/curve-config.cpp
@@ -230,14 +230,12 @@ void CurveConfigurationDialog::save() {
};
for (int i = 0; i < 6; i++)
+ {
iniFile.setValue(names2[i], widgets2[i]->value());
+ mainApp->axis(i).zero = widgets2[i]->value();
+ }
iniFile.endGroup();
settingsDirty = false;
-
- //
- // Send a message to the main program, to update the Settings (for the tracker)
- //
- mainApp->update_tracker_settings();
}
diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp
index 17dded92..d9569ccc 100644
--- a/facetracknoir/facetracknoir.cpp
+++ b/facetracknoir/facetracknoir.cpp
@@ -190,15 +190,6 @@ FaceTrackNoIR::~FaceTrackNoIR() {
}
//
-// Update the Settings, after a value has changed. This way, the Tracker does not have to re-start.
-//
-void FaceTrackNoIR::update_tracker_settings() {
- if ( tracker != NULL ) {
- tracker->loadSettings();
- }
-}
-
-//
// Get a pointer to the video-widget, to use in the DLL
//
QFrame *FaceTrackNoIR::get_video_widget() {
diff --git a/facetracknoir/facetracknoir.h b/facetracknoir/facetracknoir.h
index 2aa6614f..16f42727 100644
--- a/facetracknoir/facetracknoir.h
+++ b/facetracknoir/facetracknoir.h
@@ -69,8 +69,6 @@ public:
FaceTrackNoIR(QWidget *parent = 0, Qt::WFlags flags = 0);
~FaceTrackNoIR();
- void update_tracker_settings(); // Update the settings (let Tracker read INI-file).
-
QFrame *get_video_widget(); // Get a pointer to the video-widget, to use in the DLL
Tracker *tracker;
void bindKeyboardShortcuts();
diff --git a/facetracknoir/tracker.cpp b/facetracknoir/tracker.cpp
index cff2e765..4304d939 100644
--- a/facetracknoir/tracker.cpp
+++ b/facetracknoir/tracker.cpp
@@ -36,7 +36,6 @@ Tracker::Tracker( FaceTrackNoIR *parent ) :
// Retieve the pointer to the parent
mainApp = parent;
// Load the settings from the INI-file
- loadSettings();
}
Tracker::~Tracker()
@@ -196,33 +195,4 @@ void Tracker::getOutputHeadPose( double *data ) {
data[i] = output_camera.axes[i];
}
-//
-// Load the current Settings from the currently 'active' INI-file.
-//
-void Tracker::loadSettings() {
- qDebug() << "Tracker::loadSettings says: Starting ";
- QSettings settings("opentrack"); // 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)
-
- iniFile.beginGroup("Tracking");
-
- qDebug() << "loadSettings says: iniFile = " << currentFile;
-
- const char* names2[] = {
- "zero_tx",
- "zero_ty",
- "zero_tz",
- "zero_rx",
- "zero_ry",
- "zero_rz"
- };
-
- for (int i = 0; i < 6; i++)
- mainApp->axis(i).zero = iniFile.value(names2[i], 0).toDouble();
-
- iniFile.endGroup();
-}
-
void Tracker::setInvertAxis(Axis axis, bool invert) { mainApp->axis(axis).invert = invert?-1.0f:1.0f; }
diff --git a/facetracknoir/tracker.h b/facetracknoir/tracker.h
index 31489d87..c831df61 100644
--- a/facetracknoir/tracker.h
+++ b/facetracknoir/tracker.h
@@ -99,7 +99,6 @@ protected:
public:
Tracker( FaceTrackNoIR *parent );
~Tracker();
- void loadSettings(); // Load settings from the INI-file
void setInvertAxis(Axis axis, bool invert);