diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-12-14 17:45:05 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-12-14 17:45:05 +0100 |
commit | 3fc21e23083bce507fc9832073297c9a861c3505 (patch) | |
tree | 6d7e0da788706e8c0e8db3aef1d544dda50d3021 /facetracknoir/curve-config.cpp | |
parent | b0b5db6bcf762928e1278488f14819cd2e9a0cd9 (diff) |
allow for Z swapping for tcomp
Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
Diffstat (limited to 'facetracknoir/curve-config.cpp')
-rw-r--r-- | facetracknoir/curve-config.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/facetracknoir/curve-config.cpp b/facetracknoir/curve-config.cpp index ca9e0d19..2e731892 100644 --- a/facetracknoir/curve-config.cpp +++ b/facetracknoir/curve-config.cpp @@ -96,6 +96,7 @@ void CurveConfigurationDialog::loadSettings() { iniFile.beginGroup("Tracking"); + ui.tcomp_rz->setChecked(iniFile.value("tcomp-rz", false).toBool()); ui.checkBox->setChecked(iniFile.value("compensate", true).toBool()); for (int i = 0; i < 6; i++) @@ -184,7 +185,7 @@ void CurveConfigurationDialog::loadSettings() { connect(checkboxes[i], SIGNAL(stateChanged(int)), this, SLOT(curveChanged(int)), Qt::UniqueConnection); mainApp->axis(i).zero = widgets3[i]->value(); } - + settingsDirty = false; } @@ -213,16 +214,20 @@ void CurveConfigurationDialog::save() { ui.ryconfig_alt->saveSettings(currentFile); ui.rzconfig_alt->saveSettings(currentFile); + bool tcomp_rz = false, compensate = true; + QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file) iniFile.beginGroup("Tracking"); - bool compensate = true; - + iniFile.setValue("tcomp-rz", tcomp_rz = ui.tcomp_rz->checkState() != Qt::Unchecked); iniFile.setValue("compensate", compensate = (bool) !!ui.checkBox->isChecked()); if (mainApp->tracker) + { mainApp->tracker->compensate = compensate; + mainApp->tracker->tcomp_rz = tcomp_rz; + } iniFile.setValue("rx_alt", ui.rx_altp->checkState() != Qt::Unchecked); iniFile.setValue("ry_alt", ui.ry_altp->checkState() != Qt::Unchecked); |