Give proper names to settings buttons

This commit is contained in:
atse 2023-07-31 13:22:35 +08:00
parent fa8f1ebf10
commit 1ae44d6b82
3 changed files with 7 additions and 7 deletions

View File

@ -342,7 +342,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
self.plot_menu.addAction(limit_samples)
self.plot_menu.limit_samples = limit_samples
self.toolButton_2.setMenu(self.plot_menu)
self.plot_settings.setMenu(self.plot_menu)
@pyqtSlot(int)
def set_max_samples(self, samples: int):

View File

@ -257,7 +257,7 @@
</widget>
</item>
<item>
<widget class="QToolButton" name="toolButton_2">
<widget class="QToolButton" name="plot_settings">
<property name="text">
<string>...</string>
</property>

View File

@ -121,10 +121,10 @@ class Ui_MainWindow(object):
self.thermostat_settings.setPopupMode(QtWidgets.QToolButton.ToolButtonPopupMode.InstantPopup)
self.thermostat_settings.setObjectName("thermostat_settings")
self.settings_layout.addWidget(self.thermostat_settings)
self.toolButton_2 = QtWidgets.QToolButton(parent=self.bottom_settings_group)
self.toolButton_2.setPopupMode(QtWidgets.QToolButton.ToolButtonPopupMode.InstantPopup)
self.toolButton_2.setObjectName("toolButton_2")
self.settings_layout.addWidget(self.toolButton_2)
self.plot_settings = QtWidgets.QToolButton(parent=self.bottom_settings_group)
self.plot_settings.setPopupMode(QtWidgets.QToolButton.ToolButtonPopupMode.InstantPopup)
self.plot_settings.setObjectName("plot_settings")
self.settings_layout.addWidget(self.plot_settings)
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
self.settings_layout.addItem(spacerItem)
self.report_group = QtWidgets.QWidget(parent=self.bottom_settings_group)
@ -226,7 +226,7 @@ class Ui_MainWindow(object):
self.ch1_i_graph.setTitle(_translate("MainWindow", "Channel 1 Current"))
self.connect_btn.setText(_translate("MainWindow", "Connect"))
self.status_lbl.setText(_translate("MainWindow", "Disconnected"))
self.toolButton_2.setText(_translate("MainWindow", "..."))
self.plot_settings.setText(_translate("MainWindow", "..."))
self.report_lbl.setText(_translate("MainWindow", "Poll every: "))
self.report_refresh_spin.setSuffix(_translate("MainWindow", " s"))
self.report_box.setText(_translate("MainWindow", "Report"))