Improve Pad/Pocket Task Dialog (#10392)

* Improve Pad/Pocket Task Dialog
- Reordering elements
- hide select face if not necessary
- improve tab stop order
This commit is contained in:
geolta
2023-08-27 20:01:55 +00:00
committed by GitHub
parent 1941abd999
commit 5a34c5fb80
2 changed files with 75 additions and 79 deletions

View File

@@ -429,7 +429,7 @@ void TaskExtrudeParameters::setCheckboxes(Modes mode, Type type)
bool isMidplaneEnabled = false;
bool isMidplaneVisible = false;
bool isReversedEnabled = false;
bool isFaceEditEnabled = false;
bool isFaceEditVisible = false;
bool isTaperEditVisible = false;
bool isTaperEdit2Visible = false;
@@ -461,7 +461,7 @@ void TaskExtrudeParameters::setCheckboxes(Modes mode, Type type)
else if (mode == Modes::ToFace) {
isOffsetEditVisible = true;
isReversedEnabled = true;
isFaceEditEnabled = true;
isFaceEditVisible = true;
QMetaObject::invokeMethod(ui->lineFaceName, "setFocus", Qt::QueuedConnection);
// Go into reference selection mode if no face has been selected yet
if (ui->lineFaceName->property("FeatureName").isNull())
@@ -501,9 +501,9 @@ void TaskExtrudeParameters::setCheckboxes(Modes mode, Type type)
ui->checkBoxReversed->setEnabled(isReversedEnabled);
ui->buttonFace->setEnabled(isFaceEditEnabled);
ui->lineFaceName->setEnabled(isFaceEditEnabled);
if (!isFaceEditEnabled) {
ui->buttonFace->setVisible(isFaceEditVisible);
ui->lineFaceName->setVisible(isFaceEditVisible);
if (!isFaceEditVisible) {
ui->buttonFace->setChecked(false);
}
}

View File

@@ -53,13 +53,30 @@
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="labelLength2">
<property name="text">
<string>2nd length</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="Gui::PrefQuantitySpinBox" name="lengthEdit2">
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="unit" stdset="0">
<string notr="true">mm</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="labelOffset">
<property name="text">
<string>Offset to face</string>
</property>
</widget>
</item>
<item row="2" column="1">
<item row="3" column="1">
<widget class="Gui::PrefQuantitySpinBox" name="offsetEdit">
<property name="keyboardTracking">
<bool>false</bool>
@@ -71,6 +88,53 @@
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<widget class="QToolButton" name="buttonFace">
<property name="minimumSize">
<size>
<width>0</width>
<height>22</height>
</size>
</property>
<property name="text">
<string>Select face</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineFaceName">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="checkBoxMidplane">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>Applies length symmetrically to sketch plane</string>
</property>
<property name="text">
<string>Symmetric to plane</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBoxReversed">
<property name="text">
<string>Reversed</string>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
@@ -244,26 +308,6 @@ measured along the specified direction</string>
</layout>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBoxMidplane">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>Applies length symmetrically to sketch plane</string>
</property>
<property name="text">
<string>Symmetric to plane</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBoxReversed">
<property name="text">
<string>Reversed</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
@@ -288,27 +332,6 @@ measured along the specified direction</string>
</item>
</layout>
</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="keyboardTracking">
<bool>false</bool>
</property>
<property name="unit" stdset="0">
<string notr="true">mm</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
@@ -333,33 +356,6 @@ measured along the specified direction</string>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<widget class="QToolButton" name="buttonFace">
<property name="minimumSize">
<size>
<width>0</width>
<height>22</height>
</size>
</property>
<property name="text">
<string>Select face</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineFaceName">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation">
@@ -399,20 +395,20 @@ measured along the specified direction</string>
<tabstops>
<tabstop>changeMode</tabstop>
<tabstop>lengthEdit</tabstop>
<tabstop>lengthEdit2</tabstop>
<tabstop>offsetEdit</tabstop>
<tabstop>buttonFace</tabstop>
<tabstop>lineFaceName</tabstop>
<tabstop>checkBoxMidplane</tabstop>
<tabstop>checkBoxReversed</tabstop>
<tabstop>directionCB</tabstop>
<tabstop>checkBoxDirection</tabstop>
<tabstop>XDirectionEdit</tabstop>
<tabstop>YDirectionEdit</tabstop>
<tabstop>ZDirectionEdit</tabstop>
<tabstop>checkBoxAlongDirection</tabstop>
<tabstop>checkBoxMidplane</tabstop>
<tabstop>checkBoxReversed</tabstop>
<tabstop>taperEdit</tabstop>
<tabstop>lengthEdit2</tabstop>
<tabstop>taperEdit2</tabstop>
<tabstop>buttonFace</tabstop>
<tabstop>lineFaceName</tabstop>
<tabstop>checkBoxUpdateView</tabstop>
</tabstops>
<resources/>