mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-14 03:31:50 +02:00
refactor: changed order of columns
This commit is contained in:
@ -506,6 +506,34 @@
|
||||
<string>Coordinates</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Entries Mode:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_individual">
|
||||
<property name="text">
|
||||
<string>Individuals</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_start_stop">
|
||||
<property name="text">
|
||||
<string>Start/Stop</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTableWidget" name="tableWidget_coordinates">
|
||||
<property name="selectionMode">
|
||||
@ -524,6 +552,11 @@
|
||||
<string>Show</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Tag</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>X</string>
|
||||
@ -534,11 +567,6 @@
|
||||
<string>Y</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Tag</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -560,7 +560,7 @@ class MotorApp(QWidget):
|
||||
lambda state, widget=checkBox: self.toggle_point_visibility(state, widget)
|
||||
)
|
||||
|
||||
table.setItem(current_row_count, 4, QtWidgets.QTableWidgetItem(str(tag)))
|
||||
table.setItem(current_row_count, 2, QtWidgets.QTableWidgetItem(str(tag)))
|
||||
table.setCellWidget(current_row_count, 1, checkBox)
|
||||
|
||||
# Apply validator to x and y coordinate QTableWidgetItem
|
||||
@ -570,10 +570,10 @@ class MotorApp(QWidget):
|
||||
item_y.setFlags(item_y.flags() | Qt.ItemIsEditable)
|
||||
|
||||
table.setItem(
|
||||
current_row_count, 2, QtWidgets.QTableWidgetItem(str(f"{coordinates[0]:.{precision}f}"))
|
||||
current_row_count, 3, QtWidgets.QTableWidgetItem(str(f"{coordinates[0]:.{precision}f}"))
|
||||
)
|
||||
table.setItem(
|
||||
current_row_count, 3, QtWidgets.QTableWidgetItem(str(f"{coordinates[1]:.{precision}f}"))
|
||||
current_row_count, 4, QtWidgets.QTableWidgetItem(str(f"{coordinates[1]:.{precision}f}"))
|
||||
)
|
||||
|
||||
table.setCellWidget(current_row_count, 0, button)
|
||||
@ -699,13 +699,13 @@ class MotorApp(QWidget):
|
||||
|
||||
for row in range(rows):
|
||||
x = (
|
||||
float(self.tableWidget_coordinates.item(row, 2).text())
|
||||
if self.tableWidget_coordinates.item(row, 2) is not None
|
||||
float(self.tableWidget_coordinates.item(row, 3).text())
|
||||
if self.tableWidget_coordinates.item(row, 3) is not None
|
||||
else None
|
||||
)
|
||||
y = (
|
||||
float(self.tableWidget_coordinates.item(row, 3).text())
|
||||
if self.tableWidget_coordinates.item(row, 3) is not None
|
||||
float(self.tableWidget_coordinates.item(row, 4).text())
|
||||
if self.tableWidget_coordinates.item(row, 4) is not None
|
||||
else None
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user