Compare commits

...

1 Commits

Author SHA1 Message Date
bb508c6e88 Control Panel: CtrlPanel -> ParameterTree
The entire GUI itself is named the Thermostat Control Panel, avoid
confusion by renaming CtrlPanel into ParameterTree, since it is more
descriptive.
2025-03-31 17:51:26 +08:00
4 changed files with 11 additions and 11 deletions

View File

@ -1,4 +1,4 @@
graft examples
include pythermostat/gui/resources/artiq.svg
include pythermostat/gui/view/param_tree.json
include pythermostat/gui/view/parameter_tree.json
include pythermostat/gui/view/MainWindow.ui

View File

@ -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.parameter_tree import ParameterTree
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
@ -39,8 +39,8 @@ def get_argparser():
)
parser.add_argument(
"-p",
"--param_tree",
default=importlib.resources.files("pythermostat.gui.view").joinpath("param_tree.json"),
"--parameter_tree",
default=importlib.resources.files("pythermostat.gui.view").joinpath("parameter_tree.json"),
help="Param Tree Description JSON File",
)
@ -87,16 +87,16 @@ class MainWindow(QtWidgets.QMainWindow):
self._thermostat.connection_error.connect(handle_connection_error)
# Control Panel
def get_ctrl_panel_config(args):
with open(args.param_tree, "r", encoding="utf-8") as f:
return json.load(f)["ctrl_panel"]
def get_parameter_tree_config(args):
with open(args.parameter_tree, "r", encoding="utf-8") as f:
return json.load(f)["parameter_tree"]
self._ctrl_panel_view = CtrlPanel(
self._parameter_tree_view = ParameterTree(
self._thermostat,
self._autotuners,
self._info_box,
[self.ch0_tree, self.ch1_tree],
get_ctrl_panel_config(args),
get_parameter_tree_config(args),
)
# Graphs

View File

@ -1,5 +1,5 @@
{
"ctrl_panel": [
"parameter_tree": [
{
"name": "Temperature",
"type": "float",

View File

@ -45,7 +45,7 @@ class MutexParameter(pTypes.ListParameter):
registerParameterType("mutex", MutexParameter)
class CtrlPanel(QObject):
class ParameterTree(QObject):
def __init__(
self,
thermostat,