From 38e92c40424bb2e075e08fdf07c2dcb23fd6fc9d Mon Sep 17 00:00:00 2001 From: knacktick Date: Mon, 25 Aug 2025 11:04:15 +0800 Subject: [PATCH] Rename ctrl_panel to settings_tree_view --- pythermostat/pythermostat/control_panel.py | 12 ++++++------ pythermostat/pythermostat/gui/view/param_tree.json | 2 +- .../view/{ctrl_panel.py => settings_tree_view.py} | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) rename pythermostat/pythermostat/gui/view/{ctrl_panel.py => settings_tree_view.py} (99%) diff --git a/pythermostat/pythermostat/control_panel.py b/pythermostat/pythermostat/control_panel.py index 547fa58..9ae99f9 100755 --- a/pythermostat/pythermostat/control_panel.py +++ b/pythermostat/pythermostat/control_panel.py @@ -12,7 +12,7 @@ from qasync import asyncSlot, asyncClose from pythermostat.autotune import PIDAutotuneState from pythermostat.gui.model.thermostat import Thermostat, ThermostatConnectionState from pythermostat.gui.model.pid_autotuner import PIDAutoTuner -from pythermostat.gui.view.ctrl_panel import CtrlPanel +from pythermostat.gui.view.settings_tree_view import SettingsTreeView from pythermostat.gui.view.info_box import InfoBox from pythermostat.gui.view.menus import PlotOptionsMenu, ThermostatSettingsMenu, ConnectionDetailsMenu from pythermostat.gui.view.live_plot_view import LiveDataPlotter @@ -86,17 +86,17 @@ class MainWindow(QtWidgets.QMainWindow): self._thermostat.connection_error.connect(handle_connection_error) - # Control Panel - def get_ctrl_panel_config(args): + # Settings tree view + def get_settings_tree_view_config(args): with open(args.param_tree, "r", encoding="utf-8") as f: - return json.load(f)["ctrl_panel"] + return json.load(f)["settings_tree"] - self._ctrl_panel_view = CtrlPanel( + self._settings_tree_view = SettingsTreeView( self._thermostat, self._autotuners, self._info_box, [self.ch0_tree, self.ch1_tree], - get_ctrl_panel_config(args), + get_settings_tree_view_config(args), ) # Graphs diff --git a/pythermostat/pythermostat/gui/view/param_tree.json b/pythermostat/pythermostat/gui/view/param_tree.json index 317a814..90a3d4c 100644 --- a/pythermostat/pythermostat/gui/view/param_tree.json +++ b/pythermostat/pythermostat/gui/view/param_tree.json @@ -1,5 +1,5 @@ { - "ctrl_panel": [ + "settings_tree": [ { "name": "readings", "title": "Readings", diff --git a/pythermostat/pythermostat/gui/view/ctrl_panel.py b/pythermostat/pythermostat/gui/view/settings_tree_view.py similarity index 99% rename from pythermostat/pythermostat/gui/view/ctrl_panel.py rename to pythermostat/pythermostat/gui/view/settings_tree_view.py index 4a8f91f..9d1b174 100644 --- a/pythermostat/pythermostat/gui/view/ctrl_panel.py +++ b/pythermostat/pythermostat/gui/view/settings_tree_view.py @@ -45,7 +45,7 @@ class MutexParameter(pTypes.ListParameter): registerParameterType("mutex", MutexParameter) -class CtrlPanel(QObject): +class SettingsTreeView(QObject): def __init__( self, thermostat,