From fd3a1fc78a7e0ebd178ea0567ca8eec0d25ac53f Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 29 Apr 2013 17:13:39 +0200 Subject: Replace 'game zero' with settings zero-pose in the curves dialog --- facetracknoir/facetracknoir.cpp | 50 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 4 deletions(-) (limited to 'facetracknoir/facetracknoir.cpp') diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp index eeff25ec..2338303e 100644 --- a/facetracknoir/facetracknoir.cpp +++ b/facetracknoir/facetracknoir.cpp @@ -1490,7 +1490,7 @@ QWidget( parent , f) ui.ty_altp, ui.tz_altp }; - + for (int i = 0; i < 6; i++) { configs[i]->setConfig(GlobalPose->axes[i].curvePtr, currentFile); @@ -1587,9 +1587,7 @@ void CurveConfigurationDialog::loadSettings() { for (int i = 0; i < 6; i++) GlobalPose->axes[i].altp = iniFile.value(names[i], false).toBool(); - iniFile.endGroup(); - - static QCheckBox* widgets[] = { + QCheckBox* widgets[] = { ui.tx_altp, ui.ty_altp, ui.tz_altp, @@ -1601,6 +1599,29 @@ void CurveConfigurationDialog::loadSettings() { for (int i = 0; i < 6; i++) widgets[i]->setChecked(GlobalPose->axes[i].altp); + QDoubleSpinBox* widgets2[] = { + ui.pos_tx, + ui.pos_ty, + ui.pos_tz, + ui.pos_tx, + ui.pos_ry, + ui.pos_rz + }; + + const char* names2[] = { + "zero_tx", + "zero_ty", + "zero_tz", + "zero_rx", + "zero_ry", + "zero_rz" + }; + + for (int i = 0; i < 6; i++) + widgets2[i]->setValue(iniFile.value(names2[i], 0).toDouble()); + + iniFile.endGroup(); + settingsDirty = false; } @@ -1639,6 +1660,27 @@ void CurveConfigurationDialog::save() { iniFile.setValue("tx_alt", ui.tx_altp->checkState() != Qt::Unchecked); iniFile.setValue("ty_alt", ui.ty_altp->checkState() != Qt::Unchecked); iniFile.setValue("tz_alt", ui.tz_altp->checkState() != Qt::Unchecked); + + QDoubleSpinBox* widgets2[] = { + ui.pos_tx, + ui.pos_ty, + ui.pos_tz, + ui.pos_tx, + ui.pos_ry, + ui.pos_rz + }; + + const char* names2[] = { + "zero_tx", + "zero_ty", + "zero_tz", + "zero_rx", + "zero_ry", + "zero_rz" + }; + + for (int i = 0; i < 6; i++) + iniFile.setValue(names2[i], widgets2[i]->value()); iniFile.endGroup(); -- cgit v1.2.3