Draft: Introduce 1-axis mode for ortho array (#21602)

* Draft: Introduce 1-axis mode for ortho array

As the title says - the 1 axis mode allows to switch between all of the
axises mode and allows to modify only 1 axis at the time that user can
select with the checkbox.

* Draft: Rename to Linear Mode and remove redundant comments

* Draft: Display only one interval for the selected axis

* Draft: Cache selected variables in user.cfg - axis mode, intervals, etc...

* Draft: Make sure the checkboxes in OrthoArray are exclusively selected

* Draft: Apply review comments

Changed a couple of things according to review:
* linear mode is now being used as default during first startup (it
  wasn't before)
* applied Roy's comments about coding style, etc.
* grouped everything into separate QGroupBox which is dedicated for
  Linear Mode and has it's own labels, although spinboxes are shared so
  during mode switch we reparent them now
* removed Orthogonal Array's icon
* in the QGroup applied naming suggested in the review, X Intervals ->
  interval, etc.
* changed to radio buttons since we want exclusivity in selection
This commit is contained in:
tetektoza
2025-06-09 17:33:51 +02:00
committed by GitHub
parent a38689b6fb
commit 29ca81b64f
3 changed files with 293 additions and 16 deletions

View File

@@ -39,10 +39,59 @@
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QLabel" name="label_icon">
<property name="text">
<string notr="true">(Placeholder for the icon)</string>
<widget class="QGroupBox" name="group_axis_mode">
<property name="toolTip">
<string>Toggle between Orthogonal mode and Linear mode. In Linear mode, you can select which axis to use.</string>
</property>
<property name="title">
<string>Axis mode</string>
</property>
<layout class="QGridLayout" name="gridLayout_axis_mode">
<item row="0" column="0">
<widget class="QPushButton" name="button_linear_mode">
<property name="text">
<string>Switch to linear mode</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<layout class="QGridLayout" name="grid_axis_select">
<item row="0" column="0">
<widget class="QRadioButton" name="radiobutton_x_axis">
<property name="text">
<string>X Axis</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="radiobutton_y_axis">
<property name="text">
<string>Y Axis</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QRadioButton" name="radiobutton_z_axis">
<property name="text">
<string>Z Axis</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
@@ -122,6 +171,18 @@ The number must be at least 1 in each direction.</string>
</layout>
</widget>
</item>
<item row="2" column="0">
<widget class="QGroupBox" name="group_linearmode">
<property name="toolTip">
<string>Currently selected axis</string>
</property>
<property name="title">
<string></string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
</layout>
</widget>
</item>
<item row="4" column="0">
<widget class="QGroupBox" name="group_X">
<property name="toolTip">