forked from M-Labs/thermostat
Get rid of all translation things for now
This commit is contained in:
parent
933e1726c1
commit
9e96be30e9
@ -270,6 +270,11 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||||||
|
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
|
|
||||||
|
self.ch0_t_graph.setTitle("Channel 0 Temperature")
|
||||||
|
self.ch0_i_graph.setTitle("Channel 0 Current")
|
||||||
|
self.ch1_t_graph.setTitle("Channel 1 Temperature")
|
||||||
|
self.ch1_i_graph.setTitle("Channel 1 Current")
|
||||||
|
|
||||||
self.max_samples = self.DEFAULT_MAX_SAMPLES
|
self.max_samples = self.DEFAULT_MAX_SAMPLES
|
||||||
|
|
||||||
self._set_up_connection_menu()
|
self._set_up_connection_menu()
|
||||||
@ -317,8 +322,6 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||||||
self.connect_btn.click()
|
self.connect_btn.click()
|
||||||
|
|
||||||
def _set_up_connection_menu(self):
|
def _set_up_connection_menu(self):
|
||||||
_translate = QtCore.QCoreApplication.translate
|
|
||||||
|
|
||||||
self.connection_menu = QtWidgets.QMenu()
|
self.connection_menu = QtWidgets.QMenu()
|
||||||
self.connection_menu.setTitle('Connection Settings')
|
self.connection_menu.setTitle('Connection Settings')
|
||||||
|
|
||||||
@ -329,7 +332,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||||||
self.host_set_line.setClearButtonEnabled(True)
|
self.host_set_line.setClearButtonEnabled(True)
|
||||||
|
|
||||||
self.host_set_line.setText("192.168.1.26")
|
self.host_set_line.setText("192.168.1.26")
|
||||||
self.host_set_line.setPlaceholderText(_translate("MainWindow", "IP for the Thermostat"))
|
self.host_set_line.setPlaceholderText("IP for the Thermostat")
|
||||||
|
|
||||||
host = QtWidgets.QWidgetAction(self.connection_menu)
|
host = QtWidgets.QWidgetAction(self.connection_menu)
|
||||||
host.setDefaultWidget(self.host_set_line)
|
host.setDefaultWidget(self.host_set_line)
|
||||||
@ -350,8 +353,6 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||||||
self.connect_btn.setMenu(self.connection_menu)
|
self.connect_btn.setMenu(self.connection_menu)
|
||||||
|
|
||||||
def _set_up_thermostat_menu(self):
|
def _set_up_thermostat_menu(self):
|
||||||
_translate = QtCore.QCoreApplication.translate
|
|
||||||
|
|
||||||
self.thermostat_menu = QtWidgets.QMenu()
|
self.thermostat_menu = QtWidgets.QMenu()
|
||||||
self.thermostat_menu.setTitle('Thermostat settings')
|
self.thermostat_menu.setTitle('Thermostat settings')
|
||||||
|
|
||||||
@ -383,9 +384,9 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||||||
self.fan_power_slider.valueChanged.connect(self.fan_set)
|
self.fan_power_slider.valueChanged.connect(self.fan_set)
|
||||||
self.fan_auto_box.stateChanged.connect(self.fan_auto_set)
|
self.fan_auto_box.stateChanged.connect(self.fan_auto_set)
|
||||||
|
|
||||||
self.fan_lbl.setToolTip(_translate("MainWindow", "Adjust the fan"))
|
self.fan_lbl.setToolTip("Adjust the fan")
|
||||||
self.fan_lbl.setText(_translate("MainWindow", "Fan:"))
|
self.fan_lbl.setText("Fan:")
|
||||||
self.fan_auto_box.setText(_translate("MainWindow", "Auto"))
|
self.fan_auto_box.setText("Auto")
|
||||||
|
|
||||||
fan = QtWidgets.QWidgetAction(self.thermostat_menu)
|
fan = QtWidgets.QWidgetAction(self.thermostat_menu)
|
||||||
fan.setDefaultWidget(self.fan_group)
|
fan.setDefaultWidget(self.fan_group)
|
||||||
@ -416,14 +417,14 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||||||
@asyncSlot(bool)
|
@asyncSlot(bool)
|
||||||
async def network_settings(_):
|
async def network_settings(_):
|
||||||
ask_network = QtWidgets.QInputDialog(self)
|
ask_network = QtWidgets.QInputDialog(self)
|
||||||
ask_network.setWindowTitle(_translate("MainWindow", "Network Settings"))
|
ask_network.setWindowTitle("Network Settings")
|
||||||
ask_network.setLabelText(_translate("MainWindow", "Set the Thermostat's IPv4 address, netmask and gateway (optional)"))
|
ask_network.setLabelText("Set the Thermostat's IPv4 address, netmask and gateway (optional)")
|
||||||
ask_network.setTextValue((await self.client.ipv4())['addr'])
|
ask_network.setTextValue((await self.client.ipv4())['addr'])
|
||||||
|
|
||||||
@pyqtSlot(str)
|
@pyqtSlot(str)
|
||||||
def set_ipv4(ipv4_settings):
|
def set_ipv4(ipv4_settings):
|
||||||
sure = QtWidgets.QMessageBox(self)
|
sure = QtWidgets.QMessageBox(self)
|
||||||
sure.setWindowTitle(_translate("MainWindow", "Set network?"))
|
sure.setWindowTitle("Set network?")
|
||||||
sure.setText(f"Setting this as network and disconnecting:<br>{ipv4_settings}")
|
sure.setText(f"Setting this as network and disconnecting:<br>{ipv4_settings}")
|
||||||
|
|
||||||
@asyncSlot(object)
|
@asyncSlot(object)
|
||||||
@ -458,7 +459,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||||||
def about_thermostat():
|
def about_thermostat():
|
||||||
QtWidgets.QMessageBox.about(
|
QtWidgets.QMessageBox.about(
|
||||||
self,
|
self,
|
||||||
_translate("MainWindow","About Thermostat"),
|
"About Thermostat",
|
||||||
f"""
|
f"""
|
||||||
<h1>Sinara 8451 Thermostat v{self.hw_rev_data['rev']['major']}.{self.hw_rev_data['rev']['minor']}</h1>
|
<h1>Sinara 8451 Thermostat v{self.hw_rev_data['rev']['major']}.{self.hw_rev_data['rev']['minor']}</h1>
|
||||||
|
|
||||||
@ -487,8 +488,6 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||||||
self.thermostat_settings.setMenu(self.thermostat_menu)
|
self.thermostat_settings.setMenu(self.thermostat_menu)
|
||||||
|
|
||||||
def _set_up_plot_menu(self):
|
def _set_up_plot_menu(self):
|
||||||
_translate = QtCore.QCoreApplication.translate
|
|
||||||
|
|
||||||
self.plot_menu = QtWidgets.QMenu()
|
self.plot_menu = QtWidgets.QMenu()
|
||||||
self.plot_menu.setTitle("Plot Settings")
|
self.plot_menu.setTitle("Plot Settings")
|
||||||
|
|
||||||
@ -784,16 +783,6 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||||||
else:
|
else:
|
||||||
self.params[channel].child("Postfilter Config", "Postfilter Rate").setValue(('rate', postfilter_params["rate"]))
|
self.params[channel].child("Postfilter Config", "Postfilter Rate").setValue(('rate', postfilter_params["rate"]))
|
||||||
|
|
||||||
def retranslateUi(self, MainWindow):
|
|
||||||
super().retranslateUi(MainWindow)
|
|
||||||
|
|
||||||
_translate = QtCore.QCoreApplication.translate
|
|
||||||
|
|
||||||
self.ch0_t_graph.setTitle(_translate("MainWindow", "Channel 0 Temperature"))
|
|
||||||
self.ch0_i_graph.setTitle(_translate("MainWindow", "Channel 0 Current"))
|
|
||||||
self.ch1_t_graph.setTitle(_translate("MainWindow", "Channel 1 Temperature"))
|
|
||||||
self.ch1_i_graph.setTitle(_translate("MainWindow", "Channel 1 Current"))
|
|
||||||
|
|
||||||
|
|
||||||
async def coro_main():
|
async def coro_main():
|
||||||
args = get_argparser().parse_args()
|
args = get_argparser().parse_args()
|
||||||
|
Loading…
Reference in New Issue
Block a user