From 1f0e74bf9fcb4f103ac33289b976b48a3c6d98ac Mon Sep 17 00:00:00 2001 From: atse Date: Mon, 31 Jul 2023 13:25:37 +0800 Subject: [PATCH] Don't enabled thermostat settings before connect --- pytec/tec_qt.py | 1 + pytec/tec_qt.ui | 3 +++ pytec/ui_tec_qt.py | 1 + 3 files changed, 5 insertions(+) diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index a6ef65d..207f214 100644 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -382,6 +382,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow): self.graph_group.setEnabled(result) self.fan_group.setEnabled(result) self.report_group.setEnabled(result) + self.thermostat_settings.setEnabled(result) self.host_set_line.setEnabled(not result) self.port_set_spin.setEnabled(not result) diff --git a/pytec/tec_qt.ui b/pytec/tec_qt.ui index b60597c..d33c3b4 100644 --- a/pytec/tec_qt.ui +++ b/pytec/tec_qt.ui @@ -248,6 +248,9 @@ + + false + diff --git a/pytec/ui_tec_qt.py b/pytec/ui_tec_qt.py index 03fcd21..5ffcaa1 100644 --- a/pytec/ui_tec_qt.py +++ b/pytec/ui_tec_qt.py @@ -117,6 +117,7 @@ class Ui_MainWindow(object): self.status_lbl.setObjectName("status_lbl") self.settings_layout.addWidget(self.status_lbl) self.thermostat_settings = QtWidgets.QToolButton(parent=self.bottom_settings_group) + self.thermostat_settings.setEnabled(False) self.thermostat_settings.setText("⚙") self.thermostat_settings.setPopupMode(QtWidgets.QToolButton.ToolButtonPopupMode.InstantPopup) self.thermostat_settings.setObjectName("thermostat_settings")