+ use quantity boxes in box & cylinder creation dialogs
This commit is contained in:
parent
d56357f764
commit
236f1666db
|
@ -74,11 +74,11 @@ void CmdPartSimpleCylinder::activated(int iMsg)
|
|||
".Shape=Part.makeCylinder(%f,%f,"
|
||||
"Base.Vector(%f,%f,%f),"
|
||||
"Base.Vector(%f,%f,%f))"
|
||||
,dlg.radius->value()
|
||||
,dlg.length->value()
|
||||
,dlg.xPos->value()
|
||||
,dlg.yPos->value()
|
||||
,dlg.zPos->value()
|
||||
,dlg.radius->value().getValue()
|
||||
,dlg.length->value().getValue()
|
||||
,dlg.xPos->value().getValue()
|
||||
,dlg.yPos->value().getValue()
|
||||
,dlg.zPos->value().getValue()
|
||||
,dir.x,dir.y,dir.z);
|
||||
commitCommand();
|
||||
updateActive();
|
||||
|
|
|
@ -27,7 +27,10 @@
|
|||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="1">
|
||||
<widget class="QDoubleSpinBox" name="xPos">
|
||||
<widget class="Gui::QuantitySpinBox" name="xPos">
|
||||
<property name="unit" stdset="0">
|
||||
<string notr="true">mm</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-2147480000.000000000000000</double>
|
||||
</property>
|
||||
|
@ -44,7 +47,10 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="yPos">
|
||||
<widget class="Gui::QuantitySpinBox" name="yPos">
|
||||
<property name="unit" stdset="0">
|
||||
<string notr="true">mm</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-2147480000.000000000000000</double>
|
||||
</property>
|
||||
|
@ -54,7 +60,10 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QDoubleSpinBox" name="zPos">
|
||||
<widget class="Gui::QuantitySpinBox" name="zPos">
|
||||
<property name="unit" stdset="0">
|
||||
<string notr="true">mm</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-2147480000.000000000000000</double>
|
||||
</property>
|
||||
|
@ -107,7 +116,10 @@
|
|||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="1">
|
||||
<widget class="QDoubleSpinBox" name="wLength">
|
||||
<widget class="Gui::QuantitySpinBox" name="wLength">
|
||||
<property name="unit" stdset="0">
|
||||
<string notr="true">mm</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>2147480000.000000000000000</double>
|
||||
</property>
|
||||
|
@ -117,7 +129,10 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="vLength">
|
||||
<widget class="Gui::QuantitySpinBox" name="vLength">
|
||||
<property name="unit" stdset="0">
|
||||
<string notr="true">mm</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>2147480000.000000000000000</double>
|
||||
</property>
|
||||
|
@ -127,7 +142,10 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QDoubleSpinBox" name="uLength">
|
||||
<widget class="Gui::QuantitySpinBox" name="uLength">
|
||||
<property name="unit" stdset="0">
|
||||
<string notr="true">mm</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>2147480000.000000000000000</double>
|
||||
</property>
|
||||
|
@ -170,6 +188,13 @@
|
|||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Gui::QuantitySpinBox</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>Gui/QuantitySpinBox.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>xPos</tabstop>
|
||||
<tabstop>yPos</tabstop>
|
||||
|
|
|
@ -62,7 +62,10 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QDoubleSpinBox" name="zPos">
|
||||
<widget class="Gui::QuantitySpinBox" name="zPos">
|
||||
<property name="unit" stdset="0">
|
||||
<string notr="true">mm</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-2147480000.000000000000000</double>
|
||||
</property>
|
||||
|
@ -72,7 +75,10 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="yPos">
|
||||
<widget class="Gui::QuantitySpinBox" name="yPos">
|
||||
<property name="unit" stdset="0">
|
||||
<string notr="true">mm</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-2147480000.000000000000000</double>
|
||||
</property>
|
||||
|
@ -82,7 +88,10 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QDoubleSpinBox" name="xPos">
|
||||
<widget class="Gui::QuantitySpinBox" name="xPos">
|
||||
<property name="unit" stdset="0">
|
||||
<string notr="true">mm</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-2147480000.000000000000000</double>
|
||||
</property>
|
||||
|
@ -121,7 +130,10 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="length">
|
||||
<widget class="Gui::QuantitySpinBox" name="length">
|
||||
<property name="unit" stdset="0">
|
||||
<string notr="true">mm</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>2147480000.000000000000000</double>
|
||||
</property>
|
||||
|
@ -131,7 +143,10 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QDoubleSpinBox" name="radius">
|
||||
<widget class="Gui::QuantitySpinBox" name="radius">
|
||||
<property name="unit" stdset="0">
|
||||
<string notr="true">mm</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>2147480000.000000000000000</double>
|
||||
</property>
|
||||
|
@ -153,6 +168,13 @@
|
|||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Gui::QuantitySpinBox</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>Gui/QuantitySpinBox.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>xPos</tabstop>
|
||||
<tabstop>yPos</tabstop>
|
||||
|
|
|
@ -39,9 +39,6 @@ using namespace PartGui;
|
|||
DlgPartCylinderImp::DlgPartCylinderImp(QWidget* parent, Qt::WindowFlags fl)
|
||||
: Gui::LocationInterface<Ui_DlgPartCylinder>(parent, fl)
|
||||
{
|
||||
QList<QDoubleSpinBox*> list = this->findChildren<QDoubleSpinBox*>();
|
||||
for (QList<QDoubleSpinBox*>::iterator it = list.begin(); it != list.end(); ++it)
|
||||
(*it)->setDecimals(Base::UnitsApi::getDecimals());
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue
Block a user