Follow CapWords convention for class names

Re: PEP8
This commit is contained in:
atse 2024-06-20 17:08:07 +08:00
parent bc4ac43e0b
commit a16d2e9a9e
8 changed files with 21 additions and 21 deletions

View File

@ -1,11 +1,11 @@
from view.zero_limits_warning import zero_limits_warning_view
from view.net_settings_input_diag import net_settings_input_diag
from view.thermostat_ctrl_menu import thermostat_ctrl_menu
from view.conn_menu import conn_menu
from view.plot_options_menu import plot_options_menu
from view.zero_limits_warning import ZeroLimitsWarningView
from view.net_settings_input_diag import NetSettingsInputDiag
from view.thermostat_ctrl_menu import ThermostatCtrlMenu
from view.conn_menu import ConnMenu
from view.plot_options_menu import PlotOptionsMenu
from view.live_plot_view import LiveDataPlotter
from view.ctrl_panel import ctrl_panel
from view.info_box import info_box
from view.ctrl_panel import CtrlPanel
from view.info_box import InfoBox
from model.pid_autotuner import PIDAutoTuner
from model.thermostat_data_model import WrappedClient, Thermostat
import json
@ -66,7 +66,7 @@ class MainWindow(QtWidgets.QMainWindow):
self.show()
self.hw_rev_data = None
self.info_box = info_box()
self.info_box = InfoBox()
self.client = WrappedClient(self)
self.client.connection_error.connect(self.bail)
@ -94,10 +94,10 @@ class MainWindow(QtWidgets.QMainWindow):
]
self.thermostat.info_box_trigger.connect(self.info_box.display_info_box)
self.zero_limits_warning = zero_limits_warning_view(
self.zero_limits_warning = ZeroLimitsWarningView(
self.style(), self.limits_warning
)
self.ctrl_panel_view = ctrl_panel(
self.ctrl_panel_view = CtrlPanel(
[self.ch0_tree, self.ch1_tree],
get_ctrl_panel_config(args),
self.send_command,
@ -136,17 +136,17 @@ class MainWindow(QtWidgets.QMainWindow):
self.thermostat.report_update.connect(self.channel_graphs.update_report)
self.thermostat.pid_update.connect(self.channel_graphs.update_pid)
self.plot_options_menu = plot_options_menu()
self.plot_options_menu = PlotOptionsMenu()
self.plot_options_menu.clear.triggered.connect(self.clear_graphs)
self.plot_options_menu.samples_spinbox.valueChanged.connect(
self.channel_graphs.set_max_samples
)
self.plot_settings.setMenu(self.plot_options_menu)
self.conn_menu = conn_menu()
self.conn_menu = ConnMenu()
self.connect_btn.setMenu(self.conn_menu)
self.thermostat_ctrl_menu = thermostat_ctrl_menu(self.style())
self.thermostat_ctrl_menu = ThermostatCtrlMenu(self.style())
self.thermostat_ctrl_menu.fan_set_act.connect(self.fan_set_request)
self.thermostat_ctrl_menu.fan_auto_set_act.connect(self.fan_auto_set_request)
self.thermostat_ctrl_menu.reset_act.connect(self.reset_request)
@ -399,7 +399,7 @@ class MainWindow(QtWidgets.QMainWindow):
@asyncSlot(bool)
async def net_settings_request(self, _):
ipv4 = await self.thermostat.get_ipv4()
self.net_settings_input_diag = net_settings_input_diag(ipv4["addr"])
self.net_settings_input_diag = NetSettingsInputDiag(ipv4["addr"])
self.net_settings_input_diag.set_ipv4_act.connect(self.set_net_settings_request)
@asyncSlot(str)

View File

@ -1,7 +1,7 @@
from PyQt6 import QtWidgets, QtCore
class conn_menu(QtWidgets.QMenu):
class ConnMenu(QtWidgets.QMenu):
def __init__(self):
super().__init__()
self.setTitle("Connection Settings")

View File

@ -42,7 +42,7 @@ class MutexParameter(pTypes.ListParameter):
registerParameterType("mutex", MutexParameter)
class ctrl_panel(QObject):
class CtrlPanel(QObject):
set_zero_limits_warning_sig = pyqtSignal(list)
def __init__(

View File

@ -2,7 +2,7 @@ from PyQt6 import QtWidgets
from PyQt6.QtCore import pyqtSlot
class info_box(QtWidgets.QMessageBox):
class InfoBox(QtWidgets.QMessageBox):
def __init__(self):
super().__init__()
self.setIcon(QtWidgets.QMessageBox.Icon.Information)

View File

@ -3,7 +3,7 @@ from PyQt6.QtWidgets import QAbstractButton
from PyQt6.QtCore import pyqtSignal, pyqtSlot
class net_settings_input_diag(QtWidgets.QInputDialog):
class NetSettingsInputDiag(QtWidgets.QInputDialog):
set_ipv4_act = pyqtSignal(str)
def __init__(self, current_ipv4_settings):

View File

@ -1,7 +1,7 @@
from PyQt6 import QtWidgets, QtGui
class plot_options_menu(QtWidgets.QMenu):
class PlotOptionsMenu(QtWidgets.QMenu):
def __init__(self, max_samples=1000):
super().__init__()
self.setTitle("Plot Settings")

View File

@ -2,7 +2,7 @@ from PyQt6 import QtWidgets, QtGui, QtCore
from PyQt6.QtCore import pyqtSignal, pyqtSlot
class thermostat_ctrl_menu(QtWidgets.QMenu):
class ThermostatCtrlMenu(QtWidgets.QMenu):
fan_set_act = pyqtSignal(int)
fan_auto_set_act = pyqtSignal(int)

View File

@ -2,7 +2,7 @@ from PyQt6.QtCore import pyqtSlot, QObject
from PyQt6 import QtWidgets, QtGui
class zero_limits_warning_view(QObject):
class ZeroLimitsWarningView(QObject):
def __init__(self, style, limit_warning):
super().__init__()
self._lbl = limit_warning