mirror of https://gitlab.com/pamhyr/pamhyr2
Geometry: Meshing: Update windows with radiobutton instead of checkbox.
parent
e6178525d7
commit
387d462c2c
|
|
@ -36,13 +36,15 @@ class MeshingDialog(PamhyrDialog):
|
|||
_pamhyr_ui = "MeshingOptions"
|
||||
_pamhyr_name = "Meshing"
|
||||
|
||||
def __init__(self, parent=None):
|
||||
def __init__(self, reach, parent=None):
|
||||
super(MeshingDialog, self).__init__(
|
||||
title=self._pamhyr_name,
|
||||
options=[],
|
||||
parent=parent
|
||||
)
|
||||
|
||||
self._reach = reach
|
||||
|
||||
self._init_default_values()
|
||||
|
||||
def _init_default_values(self):
|
||||
|
|
@ -55,8 +57,10 @@ class MeshingDialog(PamhyrDialog):
|
|||
self._space_step
|
||||
)
|
||||
|
||||
self.set_check_box("checkBox_lplan", self._lplan)
|
||||
self.set_check_box("checkBox_linear", self._linear)
|
||||
if self._linear:
|
||||
self.set_radio_button("radioButton_linear", True)
|
||||
else:
|
||||
self.set_radio_button("radioButton_spline", True)
|
||||
|
||||
@property
|
||||
def space_step(self):
|
||||
|
|
@ -74,8 +78,7 @@ class MeshingDialog(PamhyrDialog):
|
|||
self._space_step = self.get_double_spin_box(
|
||||
"doubleSpinBox_space_step",
|
||||
)
|
||||
self._lplan = self.get_check_box("checkBox_lplan")
|
||||
self._linear = self.get_check_box("checkBox_linear")
|
||||
self._linear = self.get_radio_button("radioButton_linear")
|
||||
|
||||
super().accept()
|
||||
|
||||
|
|
|
|||
|
|
@ -261,7 +261,10 @@ class GeometryWindow(PamhyrWindow):
|
|||
|
||||
def edit_meshing(self):
|
||||
try:
|
||||
dlg = MeshingDialog(parent=self)
|
||||
dlg = MeshingDialog(
|
||||
reach=self._reach,
|
||||
parent=self
|
||||
)
|
||||
if dlg.exec():
|
||||
data = {
|
||||
"step": dlg.space_step,
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>First cross section</string>
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
<item>
|
||||
<widget class="QComboBox" name="comboBox_begin_kp">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Last cross section</string>
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
<item>
|
||||
<widget class="QComboBox" name="comboBox_end_kp">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
@ -67,7 +67,7 @@
|
|||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>First guide line</string>
|
||||
|
|
@ -77,7 +77,7 @@
|
|||
<item>
|
||||
<widget class="QComboBox" name="comboBox_begin_kp_2">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
@ -88,7 +88,7 @@
|
|||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Last guide line</string>
|
||||
|
|
@ -98,7 +98,7 @@
|
|||
<item>
|
||||
<widget class="QComboBox" name="comboBox_end_kp_2">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
@ -138,17 +138,17 @@
|
|||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>lm</string>
|
||||
<string>Distance computation guild line</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox_lm">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
@ -168,26 +168,40 @@
|
|||
</layout>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_lplan">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_spline">
|
||||
<property name="text">
|
||||
<string>Lplan</string>
|
||||
<string>Spline</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_linear">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_linear">
|
||||
<property name="text">
|
||||
<string>Linear</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
|
|
|
|||
Loading…
Reference in New Issue