+ support units in polar pattern panel
This commit is contained in:
parent
67b85ff8c3
commit
3585403ee2
|
@ -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
|
||||
|
|
|
@ -70,9 +70,12 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="spinAngle">
|
||||
<property name="decimals">
|
||||
<number>2</number>
|
||||
<widget class="Gui::QuantitySpinBox" name="polarAngle">
|
||||
<property name="unit" stdset="0">
|
||||
<string>deg</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>0.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>360.000000000000000</double>
|
||||
|
@ -141,6 +144,13 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Gui::QuantitySpinBox</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>Gui/QuantitySpinBox.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
Loading…
Reference in New Issue
Block a user