diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-10-25 14:08:56 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-10-25 14:08:56 +0200 |
commit | 3831edae9a45d65f6636767d6f6c53378e036b06 (patch) | |
tree | 923e6729b80e8e54b3941900ae3fbc88d1168279 /facetracknoir/curve-config.cpp | |
parent | 06687f9777fc7fa4e2bca2b2471af596ab658e9f (diff) |
add translation compensation
Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
Diffstat (limited to 'facetracknoir/curve-config.cpp')
-rw-r--r-- | facetracknoir/curve-config.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/facetracknoir/curve-config.cpp b/facetracknoir/curve-config.cpp index 50aa8acf..6da1730d 100644 --- a/facetracknoir/curve-config.cpp +++ b/facetracknoir/curve-config.cpp @@ -1,6 +1,7 @@ #include "facetracknoir/facetracknoir.h" #include "facetracknoir/curve-config.h" #include <QDebug> +#include <QCheckBox> CurveConfigurationDialog::CurveConfigurationDialog(FaceTrackNoIR *ftnoir, QWidget *parent) : QWidget( parent, Qt::Dialog ), mainApp(ftnoir) { @@ -93,6 +94,8 @@ void CurveConfigurationDialog::loadSettings() { iniFile.beginGroup("Tracking"); + ui.checkBox->setChecked(iniFile.value("compensation", true).toBool()); + for (int i = 0; i < 6; i++) mainApp->axis(i).altp = iniFile.value(names[i], false).toBool(); @@ -179,6 +182,8 @@ void CurveConfigurationDialog::loadSettings() { connect(checkboxes[i], SIGNAL(stateChanged(int)), this, SLOT(curveChanged(int)), Qt::UniqueConnection); mainApp->axis(i).zero = widgets3[i]->value(); } + + connect(ui.checkBox, SIGNAL(stateChanged(int)), this, SLOT(curveChanged(int))); settingsDirty = false; } @@ -212,6 +217,13 @@ void CurveConfigurationDialog::save() { iniFile.beginGroup("Tracking"); + bool compensate = true; + + iniFile.setValue("compensation", compensate = (bool) !!ui.checkBox->isChecked()); + + if (mainApp->tracker) + mainApp->tracker->compensate = compensate; + 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); |