diff -r c4ad4e3c6839 -r 56f8987f4c7c src/dialogs.cpp --- a/src/dialogs.cpp Mon May 27 18:17:21 2013 +0300 +++ b/src/dialogs.cpp Mon May 27 22:05:10 2013 +0300 @@ -26,6 +26,7 @@ #include #include #include +#include #include "dialogs.h" #include "widgets.h" @@ -164,12 +165,19 @@ dsb_replacement = new QDoubleSpinBox; dsb_replacement->setRange (-10000.0f, 10000.0f); + cb_any = new QCheckBox ("Any"); + cb_rel = new QCheckBox ("Relative"); + + connect (cb_any, SIGNAL (stateChanged (int)), this, SLOT (anyChanged (int))); + QGridLayout* valueLayout = new QGridLayout; valueLayout->setColumnStretch (1, 1); valueLayout->addWidget (lb_search, 0, 0); valueLayout->addWidget (dsb_search, 0, 1); + valueLayout->addWidget (cb_any, 0, 2); valueLayout->addWidget (lb_replacement, 1, 0); valueLayout->addWidget (dsb_replacement, 1, 1); + valueLayout->addWidget (cb_rel, 1, 2); QVBoxLayout* layout = new QVBoxLayout; layout->addWidget (cbg_axes); @@ -190,6 +198,18 @@ return cbg_axes->checkedValues (); } +void ReplaceCoordsDialog::anyChanged (int state) { + dsb_search->setEnabled (state != Qt::Checked); +} + +bool ReplaceCoordsDialog::any () const { + return cb_any->isChecked (); +} + +bool ReplaceCoordsDialog::rel () const { + return cb_rel->isChecked (); +} + // ============================================================================= // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // =============================================================================