Wire Sud upload/download into the brewpi_gui client
Adds File menu actions to save the running Sud's schedule to a local sud.json and to replace it from one, via the Sud websocket channel's new Download/Upload messages. File dialogs are opened up front on the GUI thread; the actual read/write happens off the websocket recv callback, which runs on a worker thread and must not touch Qt itself. main_window.py is regenerated from brewpi.ui via pyuic5 5.15.11, which also picks up an unrelated pre-existing drift (the default URI had fallen out of sync with the .ui source).
This commit is contained in:
+12
-2
@@ -2,7 +2,7 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'brewpi.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.15.10
|
||||
# Created by: PyQt5 UI code generator 5.15.11
|
||||
#
|
||||
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
|
||||
# run again. Do not edit this file unless you know what you are doing.
|
||||
@@ -1240,6 +1240,12 @@ class Ui_MainWindow(object):
|
||||
self.actionPause.setObjectName("actionPause")
|
||||
self.actionStop = QtWidgets.QAction(MainWindow)
|
||||
self.actionStop.setObjectName("actionStop")
|
||||
self.actionSudDownload = QtWidgets.QAction(MainWindow)
|
||||
self.actionSudDownload.setObjectName("actionSudDownload")
|
||||
self.actionSudUpload = QtWidgets.QAction(MainWindow)
|
||||
self.actionSudUpload.setObjectName("actionSudUpload")
|
||||
self.menu_File.addAction(self.actionSudDownload)
|
||||
self.menu_File.addAction(self.actionSudUpload)
|
||||
self.menubar.addAction(self.menu_File.menuAction())
|
||||
self.menubar.addAction(self.menu_Help.menuAction())
|
||||
self.toolBar.addAction(self.actionStart)
|
||||
@@ -1272,7 +1278,7 @@ class Ui_MainWindow(object):
|
||||
self.label_5.setText(_translate("MainWindow", "Power [W]"))
|
||||
self.label_7.setText(_translate("MainWindow", "State"))
|
||||
self.label_state.setText(_translate("MainWindow", "State"))
|
||||
self.plainTextUri.setPlainText(_translate("MainWindow", "ws://localhost:8765"))
|
||||
self.plainTextUri.setPlainText(_translate("MainWindow", "ws://brewpi:8765"))
|
||||
self.label_8.setText(_translate("MainWindow", "Host"))
|
||||
self.menu_File.setTitle(_translate("MainWindow", "&File"))
|
||||
self.menu_Help.setTitle(_translate("MainWindow", "&Help"))
|
||||
@@ -1284,3 +1290,7 @@ class Ui_MainWindow(object):
|
||||
self.actionPause.setToolTip(_translate("MainWindow", "Pause"))
|
||||
self.actionStop.setText(_translate("MainWindow", "Stop"))
|
||||
self.actionStop.setToolTip(_translate("MainWindow", "Stop"))
|
||||
self.actionSudDownload.setText(_translate("MainWindow", "&Download Sud..."))
|
||||
self.actionSudDownload.setToolTip(_translate("MainWindow", "Save the running Sud\'s schedule to a local sud.json"))
|
||||
self.actionSudUpload.setText(_translate("MainWindow", "&Upload Sud..."))
|
||||
self.actionSudUpload.setToolTip(_translate("MainWindow", "Replace the running Sud\'s schedule with a local sud.json"))
|
||||
|
||||
Reference in New Issue
Block a user