+ use quantity boxes in revolution dialog
This commit is contained in:
parent
67257633d6
commit
d56357f764
|
@ -104,10 +104,10 @@ DlgRevolution::DlgRevolution(QWidget* parent, Qt::WindowFlags fl)
|
|||
ui->xPos->setRange(-DBL_MAX,DBL_MAX);
|
||||
ui->yPos->setRange(-DBL_MAX,DBL_MAX);
|
||||
ui->zPos->setRange(-DBL_MAX,DBL_MAX);
|
||||
ui->xPos->setDecimals(Base::UnitsApi::getDecimals());
|
||||
ui->yPos->setDecimals(Base::UnitsApi::getDecimals());
|
||||
ui->zPos->setDecimals(Base::UnitsApi::getDecimals());
|
||||
ui->angle->setDecimals(Base::UnitsApi::getDecimals());
|
||||
ui->xPos->setUnit(Base::Unit::Length);
|
||||
ui->yPos->setUnit(Base::Unit::Length);
|
||||
ui->zPos->setUnit(Base::Unit::Length);
|
||||
ui->angle->setUnit(Base::Unit::Angle);
|
||||
findShapes();
|
||||
|
||||
Gui::ItemViewSelection sel(ui->treeWidget);
|
||||
|
@ -206,10 +206,10 @@ void DlgRevolution::accept()
|
|||
.arg(axis.x,0,'f',2)
|
||||
.arg(axis.y,0,'f',2)
|
||||
.arg(axis.z,0,'f',2)
|
||||
.arg(ui->xPos->value(),0,'f',2)
|
||||
.arg(ui->yPos->value(),0,'f',2)
|
||||
.arg(ui->zPos->value(),0,'f',2)
|
||||
.arg(ui->angle->value(),0,'f',2)
|
||||
.arg(ui->xPos->value().getValue(),0,'f',2)
|
||||
.arg(ui->yPos->value().getValue(),0,'f',2)
|
||||
.arg(ui->zPos->value().getValue(),0,'f',2)
|
||||
.arg(ui->angle->value().getValue(),0,'f',2)
|
||||
.arg(solid)
|
||||
;
|
||||
Gui::Application::Instance->runPythonCode((const char*)code.toLatin1());
|
||||
|
|
|
@ -49,7 +49,11 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QDoubleSpinBox" name="zPos"/>
|
||||
<widget class="Gui::QuantitySpinBox" name="zPos">
|
||||
<property name="unit" stdset="0">
|
||||
<string notr="true">mm</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
|
@ -62,7 +66,11 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QDoubleSpinBox" name="yPos"/>
|
||||
<widget class="Gui::QuantitySpinBox" name="yPos">
|
||||
<property name="unit" stdset="0">
|
||||
<string notr="true">mm</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QComboBox" name="direction"/>
|
||||
|
@ -88,10 +96,17 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="xPos"/>
|
||||
<widget class="Gui::QuantitySpinBox" name="xPos">
|
||||
<property name="unit" stdset="0">
|
||||
<string notr="true">mm</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QDoubleSpinBox" name="angle">
|
||||
<widget class="Gui::QuantitySpinBox" name="angle">
|
||||
<property name="unit" stdset="0">
|
||||
<string notr="true">deg</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-360.000000000000000</double>
|
||||
</property>
|
||||
|
@ -139,6 +154,13 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Gui::QuantitySpinBox</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>Gui/QuantitySpinBox.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>treeWidget</tabstop>
|
||||
<tabstop>angle</tabstop>
|
||||
|
|
Loading…
Reference in New Issue
Block a user