+ support units in polar pattern panel

This commit is contained in:
wmayer
2014-07-22 14:39:23 +02:00
parent 5123d18c9b
commit a250e5e2d5
2 changed files with 17 additions and 8 deletions

View File

@@ -105,7 +105,7 @@ void TaskPolarPatternParameters::setupUI()
this, SLOT(onAxisChanged(int)));
connect(ui->checkReverse, SIGNAL(toggled(bool)),
this, SLOT(onCheckReverse(bool)));
connect(ui->spinAngle, SIGNAL(valueChanged(double)),
connect(ui->polarAngle, SIGNAL(valueChanged(double)),
this, SLOT(onAngle(double)));
connect(ui->spinOccurrences, SIGNAL(valueChanged(int)),
this, SLOT(onOccurrences(int)));
@@ -129,9 +129,8 @@ void TaskPolarPatternParameters::setupUI()
ui->comboAxis->setEnabled(true);
ui->checkReverse->setEnabled(true);
ui->spinAngle->setEnabled(true);
ui->polarAngle->setEnabled(true);
ui->spinOccurrences->setEnabled(true);
ui->spinAngle->setDecimals(Base::UnitsApi::getDecimals());
updateUI();
}
@@ -172,7 +171,7 @@ void TaskPolarPatternParameters::updateUI()
// Note: These three lines would trigger onLength(), on Occurrences() and another updateUI() if we
// didn't check for blockUpdate
ui->checkReverse->setChecked(reverse);
ui->spinAngle->setValue(angle);
ui->polarAngle->setValue(angle);
ui->spinOccurrences->setValue(occurrences);
blockUpdate = false;
@@ -319,7 +318,7 @@ const bool TaskPolarPatternParameters::getReverse(void) const
const double TaskPolarPatternParameters::getAngle(void) const
{
return ui->spinAngle->value();
return ui->polarAngle->value().getValue();
}
const unsigned TaskPolarPatternParameters::getOccurrences(void) const