Improve usability of expression dialog:

+ add signal showFormulaDialog to QuantitySpinBox in order to indicate whether the formula dialog opens or closes
+ when formula dialog opens then hide the button box in the parent dialog, show it again when the formula dialog closes
This commit is contained in:
wmayer
2018-08-23 12:22:57 +02:00
parent 0252e491d5
commit 93163b28d0
3 changed files with 40 additions and 0 deletions

View File

@@ -48,6 +48,19 @@
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
@@ -65,6 +78,9 @@
<class>Gui::PrefQuantitySpinBox</class>
<extends>QWidget</extends>
<header>Gui/PrefWidgets.h</header>
<slots>
<signal>showFormulaDialog(bool)</signal>
</slots>
</customwidget>
</customwidgets>
<resources/>
@@ -101,5 +117,21 @@
</hint>
</hints>
</connection>
<connection>
<sender>labelEdit</sender>
<signal>showFormulaDialog(bool)</signal>
<receiver>buttonBox</receiver>
<slot>setHidden(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>212</x>
<y>26</y>
</hint>
<hint type="destinationlabel">
<x>171</x>
<y>101</y>
</hint>
</hints>
</connection>
</connections>
</ui>