Skip to content

Commit

Permalink
[PD] allow expression for pocket offset
Browse files Browse the repository at this point in the history
- also disable KeyboardTracking for some fields to avoid unnecessary and often time consuming recomputes while typing in
  • Loading branch information
donovaly authored and wwmayer committed Aug 10, 2020
1 parent 17cd649 commit acecdd8
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 35 deletions.
29 changes: 22 additions & 7 deletions src/Mod/PartDesign/Gui/TaskPadParameters.ui
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
</item>
<item>
<widget class="Gui::PrefQuantitySpinBox" name="lengthEdit">
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="minimum">
<double>0.000000000000000</double>
</property>
Expand All @@ -62,7 +65,11 @@
</widget>
</item>
<item>
<widget class="Gui::PrefQuantitySpinBox" name="offsetEdit"/>
<widget class="Gui::PrefQuantitySpinBox" name="offsetEdit">
<property name="keyboardTracking">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
Expand Down Expand Up @@ -94,6 +101,9 @@
</item>
<item>
<widget class="Gui::PrefQuantitySpinBox" name="lengthEdit2">
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="minimum">
<double>0.000000000000000</double>
</property>
Expand Down Expand Up @@ -134,13 +144,18 @@
</item>
</layout>
</widget>
<resources/>
<customwidgets>
<customwidget>
<class>Gui::PrefQuantitySpinBox</class>
<extends>QWidget</extends>
<header>Gui/PrefWidgets.h</header>
</customwidget>
<customwidget>
<class>Gui::QuantitySpinBox</class>
<extends>QWidget</extends>
<header>Gui/QuantitySpinBox.h</header>
</customwidget>
<customwidget>
<class>Gui::PrefQuantitySpinBox</class>
<extends>Gui::QuantitySpinBox</extends>
<header>Gui/PrefWidgets.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
1 change: 1 addition & 0 deletions src/Mod/PartDesign/Gui/TaskPocketParameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ TaskPocketParameters::TaskPocketParameters(ViewProviderPocket *PocketView,QWidge
// Bind input fields to properties
ui->lengthEdit->bind(pcPocket->Length);
ui->lengthEdit2->bind(pcPocket->Length2);
ui->offsetEdit->bind(pcPocket->Offset);

QMetaObject::connectSlotsByName(this);

Expand Down
61 changes: 38 additions & 23 deletions src/Mod/PartDesign/Gui/TaskPocketParameters.ui
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
</item>
<item>
<widget class="Gui::PrefQuantitySpinBox" name="lengthEdit">
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="minimum">
<double>0.000000000000000</double>
</property>
Expand All @@ -62,7 +65,11 @@
</widget>
</item>
<item>
<widget class="Gui::PrefQuantitySpinBox" name="offsetEdit"/>
<widget class="Gui::PrefQuantitySpinBox" name="offsetEdit">
<property name="keyboardTracking">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
Expand All @@ -84,22 +91,25 @@
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="labelLength2">
<property name="text">
<string>2nd length</string>
</property>
</widget>
</item>
<item>
<widget class="Gui::PrefQuantitySpinBox" name="lengthEdit2">
<property name="minimum">
<double>0.000000000000000</double>
</property>
</widget>
</item>
</layout>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="labelLength2">
<property name="text">
<string>2nd length</string>
</property>
</widget>
</item>
<item>
<widget class="Gui::PrefQuantitySpinBox" name="lengthEdit2">
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="minimum">
<double>0.000000000000000</double>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
Expand Down Expand Up @@ -134,13 +144,18 @@
</item>
</layout>
</widget>
<resources/>
<customwidgets>
<customwidget>
<class>Gui::PrefQuantitySpinBox</class>
<extends>QWidget</extends>
<header>Gui/PrefWidgets.h</header>
</customwidget>
<customwidget>
<class>Gui::QuantitySpinBox</class>
<extends>QWidget</extends>
<header>Gui/QuantitySpinBox.h</header>
</customwidget>
<customwidget>
<class>Gui::PrefQuantitySpinBox</class>
<extends>Gui::QuantitySpinBox</extends>
<header>Gui/PrefWidgets.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
13 changes: 8 additions & 5 deletions src/Mod/PartDesign/Gui/TaskRevolutionParameters.ui
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,23 @@
</widget>
</item>
<item>
<widget class="Gui::QuantitySpinBox" name="revolveAngle" native="true">
<widget class="Gui::QuantitySpinBox" name="revolveAngle">
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="unit" stdset="0">
<string notr="true">deg</string>
</property>
<property name="minimum" stdset="0">
<property name="minimum">
<double>0.000000000000000</double>
</property>
<property name="maximum" stdset="0">
<property name="maximum">
<double>360.000000000000000</double>
</property>
<property name="singleStep" stdset="0">
<property name="singleStep">
<double>10.000000000000000</double>
</property>
<property name="value" stdset="0">
<property name="value">
<double>360.000000000000000</double>
</property>
</widget>
Expand Down

0 comments on commit acecdd8

Please sign in to comment.