summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/facetracknoir.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-04-13 07:55:51 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-04-13 07:55:51 +0200
commit458335e772b7ad790954351859d9f754a797bd80 (patch)
tree8606ae339d05650d6e927d415e3151dace6fd3c3 /facetracknoir/facetracknoir.cpp
parent7fd80129f3961465ce485a6ab7d873005b9c9427 (diff)
Fix alt axes, finally
Diffstat (limited to 'facetracknoir/facetracknoir.cpp')
-rw-r--r--facetracknoir/facetracknoir.cpp36
1 files changed, 23 insertions, 13 deletions
diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp
index c19585b2..41c456ce 100644
--- a/facetracknoir/facetracknoir.cpp
+++ b/facetracknoir/facetracknoir.cpp
@@ -751,18 +751,20 @@ void FaceTrackNoIR::startTracker( ) {
}
static const char* names[] = {
+ "tx_alt",
+ "ty_alt",
+ "tz_alt",
"rx_alt",
"ry_alt",
"rz_alt",
- "tx_alt",
- "ty_alt",
- "tz_alt"
};
+ iniFile.beginGroup("Tracking");
+
for (int i = 0; i < 6; i++)
- {
GlobalPose->axes[i].altp = iniFile.value(names[i], false).toBool();
- }
+
+ iniFile.endGroup();
tracker = new Tracker ( this );
@@ -1942,24 +1944,28 @@ void CurveConfigurationDialog::loadSettings() {
qDebug() << "loadSettings says: iniFile = " << currentFile;
static const char* names[] = {
- "rx_alt",
- "ry_alt",
- "rz_alt",
"tx_alt",
"ty_alt",
- "tz_alt"
+ "tz_alt",
+ "rx_alt",
+ "ry_alt",
+ "rz_alt"
};
+ iniFile.beginGroup("Tracking");
+
for (int i = 0; i < 6; i++)
GlobalPose->axes[i].altp = iniFile.value(names[i], false).toBool();
+ iniFile.endGroup();
+
static QCheckBox* widgets[] = {
- ui.rx_altp,
- ui.ry_altp,
- ui.rz_altp,
ui.tx_altp,
ui.ty_altp,
- ui.tz_altp
+ ui.tz_altp,
+ ui.rx_altp,
+ ui.ry_altp,
+ ui.rz_altp
};
for (int i = 0; i < 6; i++)
@@ -1995,6 +2001,8 @@ void CurveConfigurationDialog::save() {
QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
+ iniFile.beginGroup("Tracking");
+
iniFile.setValue("rx_alt", ui.rx_altp->checkState() != Qt::Unchecked);
iniFile.setValue("ry_alt", ui.ry_altp->checkState() != Qt::Unchecked);
iniFile.setValue("rz_alt", ui.rz_altp->checkState() != Qt::Unchecked);
@@ -2002,6 +2010,8 @@ void CurveConfigurationDialog::save() {
iniFile.setValue("ty_alt", ui.ty_altp->checkState() != Qt::Unchecked);
iniFile.setValue("tz_alt", ui.tz_altp->checkState() != Qt::Unchecked);
+ iniFile.endGroup();
+
settingsDirty = false;
//