|
10 | 10 | QVBoxLayout, |
11 | 11 | QWidget, |
12 | 12 | ) |
13 | | -from qgis.gui import QgsMapLayerComboBox |
| 13 | +from qgis.gui import QgsMapLayerComboBox, QgsCollapsibleGroupBox |
| 14 | + |
14 | 15 | from qgis.utils import plugins |
15 | 16 | from .layer_selection_table import LayerSelectionTable |
16 | 17 | from .splot import SPlotDialog |
@@ -81,22 +82,26 @@ def __init__(self, parent=None, *, feature=None, model_manager=None, data_manage |
81 | 82 |
|
82 | 83 | self.n_elements_spinbox.valueChanged.connect(self.updateNelements) |
83 | 84 |
|
| 85 | + table_group_box = QgsCollapsibleGroupBox('Data Layers') |
84 | 86 | self.layer_table = LayerSelectionTable( |
85 | 87 | data_manager=self.data_manager, |
86 | 88 | feature_name_provider=lambda: self.feature.name, |
87 | 89 | name_validator=lambda: (True, ''), # Always valid in this context |
88 | 90 | ) |
| 91 | + table_layout = QVBoxLayout() |
| 92 | + table_layout.addWidget(self.layer_table) |
| 93 | + table_group_box.setLayout(table_layout) |
89 | 94 | # Form layout for better organization |
90 | 95 | form_layout = QFormLayout() |
91 | 96 | form_layout.addRow(self.interpolator_type_label, self.interpolator_type_combo) |
92 | 97 | form_layout.addRow("Number of Elements:", self.n_elements_spinbox) |
93 | 98 | form_layout.addRow('Regularisation', self.regularisation_spin_box) |
94 | 99 | form_layout.addRow('Contact points weight', self.cpw_spin_box) |
95 | 100 | form_layout.addRow('Orientation point weight', self.npw_spin_box) |
96 | | - QgsCollapsibleGroupBox = QWidget() |
97 | | - QgsCollapsibleGroupBox.setLayout(form_layout) |
98 | | - self.layout.addWidget(QgsCollapsibleGroupBox) |
99 | | - self.layout.addWidget(self.layer_table) |
| 101 | + group_box = QgsCollapsibleGroupBox('Interpolator Settings') |
| 102 | + group_box.setLayout(form_layout) |
| 103 | + self.layout.addWidget(group_box) |
| 104 | + self.layout.addWidget(table_group_box) |
100 | 105 | self.addMidBlock() |
101 | 106 | self.addExportBlock() |
102 | 107 | def addMidBlock(self): |
@@ -127,7 +132,7 @@ def addExportBlock(self): |
127 | 132 | # imports may fail outside QGIS environment; we'll handle at runtime |
128 | 133 | pass |
129 | 134 |
|
130 | | - export_widget = QWidget() |
| 135 | + export_widget = QgsCollapsibleGroupBox('Export Feature') |
131 | 136 | export_layout = QFormLayout(export_widget) |
132 | 137 |
|
133 | 138 | # Scalar selector (support scalar and gradient) |
@@ -204,10 +209,6 @@ def _on_evaluate_target_changed(index): |
204 | 209 | block.setObjectName(f"export_block_{getattr(feat, 'name', 'feature')}") |
205 | 210 | block_layout = QVBoxLayout(block) |
206 | 211 | block_layout.setContentsMargins(0, 0, 0, 0) |
207 | | - # Placeholder label — disabled until controls are added |
208 | | - lbl = QLabel(getattr(feat, 'name', '')) |
209 | | - lbl.setEnabled(False) |
210 | | - block_layout.addWidget(lbl) |
211 | 212 | self.export_eval_layout.addWidget(block) |
212 | 213 | self.export_blocks[getattr(feat, 'name', f"feature_{len(self.export_blocks)}")] = block |
213 | 214 |
|
@@ -594,9 +595,9 @@ def addMidBlock(self): |
594 | 595 | lambda: self.model_manager.convert_feature_to_structural_frame(self.feature.name) |
595 | 596 | ) |
596 | 597 | form_layout.addRow(convert_to_frame_button) |
597 | | - QgsCollapsibleGroupBox = QWidget() |
598 | | - QgsCollapsibleGroupBox.setLayout(form_layout) |
599 | | - self.layout.addWidget(QgsCollapsibleGroupBox) |
| 598 | + group_box = QgsCollapsibleGroupBox('Fold Settings') |
| 599 | + group_box.setLayout(form_layout) |
| 600 | + self.layout.addWidget(group_box) |
600 | 601 |
|
601 | 602 | # Remove redundant layout setting |
602 | 603 | self.setLayout(self.layout) |
@@ -713,9 +714,9 @@ def addMidBlock(self): |
713 | 714 | # lambda: self.open_splot_dialog() |
714 | 715 | # ) |
715 | 716 | # form_layout.addRow(splot_button) |
716 | | - QgsCollapsibleGroupBox = QWidget() |
717 | | - QgsCollapsibleGroupBox.setLayout(form_layout) |
718 | | - self.layout.addWidget(QgsCollapsibleGroupBox) |
| 717 | + group_box = QgsCollapsibleGroupBox() |
| 718 | + group_box.setLayout(form_layout) |
| 719 | + self.layout.addWidget(group_box) |
719 | 720 | # Remove redundant layout setting |
720 | 721 | self.setLayout(self.layout) |
721 | 722 | def open_splot_dialog(self): |
|
0 commit comments