From 3c20c1c01479fe0cf2d5ac645443e4ef7dcabeb6 Mon Sep 17 00:00:00 2001 From: livefish Date: Fri, 20 Dec 2024 21:40:58 +0300 Subject: [PATCH] Added first working version with qt --- .idea/misc.xml | 7 + main.py | 23 ++ new_ui.py | 33 ++ ui.py | 210 ++++++++++ ui/ControllerUI/ControllerUI.pyproject | 8 + ui/ControllerUI/ControllerUI.pyproject.user | 178 +++++++++ ui/ControllerUI/currents.ui | 418 ++++++++++++++++++++ ui/ControllerUI/mainwindow.py | 25 ++ ui/ControllerUI/power.ui | 418 ++++++++++++++++++++ ui/ControllerUI/power.ui.autosave | 418 ++++++++++++++++++++ ui/ControllerUI/question mark.png | Bin 0 -> 708 bytes ui/ControllerUI/requirements.txt | 1 + ui/ControllerUI/ui_currents.py | 289 ++++++++++++++ ui/ControllerUI/ui_form.py | 289 ++++++++++++++ ui/ControllerUI/ui_power.py | 289 ++++++++++++++ 15 files changed, 2606 insertions(+) create mode 100644 .idea/misc.xml create mode 100644 main.py create mode 100644 new_ui.py create mode 100644 ui.py create mode 100644 ui/ControllerUI/ControllerUI.pyproject create mode 100644 ui/ControllerUI/ControllerUI.pyproject.user create mode 100644 ui/ControllerUI/currents.ui create mode 100644 ui/ControllerUI/mainwindow.py create mode 100644 ui/ControllerUI/power.ui create mode 100644 ui/ControllerUI/power.ui.autosave create mode 100644 ui/ControllerUI/question mark.png create mode 100644 ui/ControllerUI/requirements.txt create mode 100644 ui/ControllerUI/ui_currents.py create mode 100644 ui/ControllerUI/ui_form.py create mode 100644 ui/ControllerUI/ui_power.py diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..dc71d4a --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..e71df04 --- /dev/null +++ b/main.py @@ -0,0 +1,23 @@ +from PyQt6 import QtCore, QtGui, QtWidgets +from ui import Ui_Controller + +class Window(QtWidgets.QMainWindow): + def __init__(self): + QtWidgets.QMainWindow.__init__(self) + self.ui = Ui_Controller() + self.ui.setupUi(self) + + self.ui.Read.clicked.connect(self.handleCalculate) + + def connectMethods(self): + pass + + def handleCalculate(self): + self.ui.Status.setText("Goool") + +if __name__ == '__main__': + import sys + app = QtWidgets.QApplication(sys.argv) + window = Window() + window.show() + sys.exit(app.exec()) \ No newline at end of file diff --git a/new_ui.py b/new_ui.py new file mode 100644 index 0000000..5e56296 --- /dev/null +++ b/new_ui.py @@ -0,0 +1,33 @@ +import PySide6 +from PySide6.QtCore import QFile, QIODevice +from PySide6.QtUiTools import QUiLoader +from PySide6.QtWidgets import QApplication + +import sys + +# Base source: https://doc.qt.io/qt-6/designer-using-a-ui-file-python.html +def load_ui(filename: str) -> tuple[PySide6.QtWidgets.QWidget, QApplication]: + app = QApplication(sys.argv) + ui_file = QFile(filename) + if not ui_file.open(QIODevice.ReadOnly): + print("Cannot open {}: {}".format(filename, ui_file.errorString())) + sys.exit(-1) + + loader = QUiLoader() + widget = loader.load(ui_file, None) + ui_file.close() + + if not widget: + print(loader.errorString()) + sys.exit(-1) + + return widget, app + + +if __name__ == '__main__': + widget, app = load_ui('ui/ControllerUI/currents.ui') + widget.show() + + print(widget) + + sys.exit(app.exec()) diff --git a/ui.py b/ui.py new file mode 100644 index 0000000..7b50464 --- /dev/null +++ b/ui.py @@ -0,0 +1,210 @@ +# Form implementation generated from reading ui file './ui/ControllerUI/power.ui' +# +# Created by: PyQt6 UI code generator 6.6.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_Controller(object): + def setupUi(self, Controller): + Controller.setObjectName("Controller") + Controller.resize(273, 350) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(Controller.sizePolicy().hasHeightForWidth()) + Controller.setSizePolicy(sizePolicy) + Controller.setMinimumSize(QtCore.QSize(273, 350)) + Controller.setMaximumSize(QtCore.QSize(273, 350)) + self.centralwidget = QtWidgets.QWidget(parent=Controller) + self.centralwidget.setObjectName("centralwidget") + self.formLayoutWidget = QtWidgets.QWidget(parent=self.centralwidget) + self.formLayoutWidget.setGeometry(QtCore.QRect(0, 0, 284, 251)) + self.formLayoutWidget.setObjectName("formLayoutWidget") + self.formLayout = QtWidgets.QFormLayout(self.formLayoutWidget) + self.formLayout.setRowWrapPolicy(QtWidgets.QFormLayout.RowWrapPolicy.DontWrapRows) + self.formLayout.setLabelAlignment(QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignTrailing|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.formLayout.setContentsMargins(10, 10, 0, 0) + self.formLayout.setVerticalSpacing(8) + self.formLayout.setObjectName("formLayout") + self.ComPort = QtWidgets.QLabel(parent=self.formLayoutWidget) + font = QtGui.QFont() + font.setFamily("Ubuntu Sans") + self.ComPort.setFont(font) + self.ComPort.setObjectName("ComPort") + self.formLayout.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.ComPort) + self.DeviceSelection = QtWidgets.QComboBox(parent=self.formLayoutWidget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.DeviceSelection.sizePolicy().hasHeightForWidth()) + self.DeviceSelection.setSizePolicy(sizePolicy) + self.DeviceSelection.setMaximumSize(QtCore.QSize(110, 16777215)) + font = QtGui.QFont() + font.setFamily("Arial") + font.setPointSize(10) + self.DeviceSelection.setFont(font) + self.DeviceSelection.setObjectName("DeviceSelection") + self.DeviceSelection.addItem("") + self.formLayout.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.DeviceSelection) + self.DmxAddress = QtWidgets.QLabel(parent=self.formLayoutWidget) + self.DmxAddress.setObjectName("DmxAddress") + self.formLayout.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.DmxAddress) + self.DmxAddressField = QtWidgets.QLineEdit(parent=self.formLayoutWidget) + self.DmxAddressField.setMaximumSize(QtCore.QSize(45, 16777215)) + self.DmxAddressField.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.DmxAddressField.setObjectName("DmxAddressField") + self.formLayout.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.DmxAddressField) + self.Personality = QtWidgets.QLabel(parent=self.formLayoutWidget) + self.Personality.setObjectName("Personality") + self.formLayout.setWidget(2, QtWidgets.QFormLayout.ItemRole.LabelRole, self.Personality) + self.Current1 = QtWidgets.QLabel(parent=self.formLayoutWidget) + self.Current1.setObjectName("Current1") + self.formLayout.setWidget(3, QtWidgets.QFormLayout.ItemRole.LabelRole, self.Current1) + self.horizontalLayout_2 = QtWidgets.QHBoxLayout() + self.horizontalLayout_2.setObjectName("horizontalLayout_2") + self.Current1Field = QtWidgets.QLineEdit(parent=self.formLayoutWidget) + self.Current1Field.setMaximumSize(QtCore.QSize(45, 16777215)) + self.Current1Field.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.Current1Field.setObjectName("Current1Field") + self.horizontalLayout_2.addWidget(self.Current1Field) + self.ma1 = QtWidgets.QLabel(parent=self.formLayoutWidget) + self.ma1.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.ma1.setObjectName("ma1") + self.horizontalLayout_2.addWidget(self.ma1) + self.formLayout.setLayout(3, QtWidgets.QFormLayout.ItemRole.FieldRole, self.horizontalLayout_2) + self.Current2 = QtWidgets.QLabel(parent=self.formLayoutWidget) + self.Current2.setObjectName("Current2") + self.formLayout.setWidget(4, QtWidgets.QFormLayout.ItemRole.LabelRole, self.Current2) + self.horizontalLayout_3 = QtWidgets.QHBoxLayout() + self.horizontalLayout_3.setObjectName("horizontalLayout_3") + self.Current2Field = QtWidgets.QLineEdit(parent=self.formLayoutWidget) + self.Current2Field.setMaximumSize(QtCore.QSize(45, 16777215)) + self.Current2Field.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.Current2Field.setObjectName("Current2Field") + self.horizontalLayout_3.addWidget(self.Current2Field) + self.ma2 = QtWidgets.QLabel(parent=self.formLayoutWidget) + self.ma2.setObjectName("ma2") + self.horizontalLayout_3.addWidget(self.ma2) + self.formLayout.setLayout(4, QtWidgets.QFormLayout.ItemRole.FieldRole, self.horizontalLayout_3) + self.Current3 = QtWidgets.QLabel(parent=self.formLayoutWidget) + self.Current3.setObjectName("Current3") + self.formLayout.setWidget(5, QtWidgets.QFormLayout.ItemRole.LabelRole, self.Current3) + self.horizontalLayout_4 = QtWidgets.QHBoxLayout() + self.horizontalLayout_4.setObjectName("horizontalLayout_4") + self.Current3Field = QtWidgets.QLineEdit(parent=self.formLayoutWidget) + self.Current3Field.setMaximumSize(QtCore.QSize(45, 16777215)) + self.Current3Field.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.Current3Field.setObjectName("Current3Field") + self.horizontalLayout_4.addWidget(self.Current3Field) + self.ma3 = QtWidgets.QLabel(parent=self.formLayoutWidget) + self.ma3.setObjectName("ma3") + self.horizontalLayout_4.addWidget(self.ma3) + self.formLayout.setLayout(5, QtWidgets.QFormLayout.ItemRole.FieldRole, self.horizontalLayout_4) + self.Current4 = QtWidgets.QLabel(parent=self.formLayoutWidget) + self.Current4.setObjectName("Current4") + self.formLayout.setWidget(6, QtWidgets.QFormLayout.ItemRole.LabelRole, self.Current4) + self.horizontalLayout_5 = QtWidgets.QHBoxLayout() + self.horizontalLayout_5.setObjectName("horizontalLayout_5") + self.Current4Field = QtWidgets.QLineEdit(parent=self.formLayoutWidget) + self.Current4Field.setMaximumSize(QtCore.QSize(45, 16777215)) + self.Current4Field.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.Current4Field.setObjectName("Current4Field") + self.horizontalLayout_5.addWidget(self.Current4Field) + self.ma4 = QtWidgets.QLabel(parent=self.formLayoutWidget) + self.ma4.setObjectName("ma4") + self.horizontalLayout_5.addWidget(self.ma4) + self.formLayout.setLayout(6, QtWidgets.QFormLayout.ItemRole.FieldRole, self.horizontalLayout_5) + self.horizontalLayout = QtWidgets.QHBoxLayout() + self.horizontalLayout.setContentsMargins(-1, -1, 0, -1) + self.horizontalLayout.setSpacing(0) + self.horizontalLayout.setObjectName("horizontalLayout") + self.ModeSelection = QtWidgets.QComboBox(parent=self.formLayoutWidget) + self.ModeSelection.setMaximumSize(QtCore.QSize(131, 32)) + font = QtGui.QFont() + font.setFamily("Arial") + font.setPointSize(9) + self.ModeSelection.setFont(font) + self.ModeSelection.setFrame(True) + self.ModeSelection.setObjectName("ModeSelection") + self.ModeSelection.addItem("") + self.horizontalLayout.addWidget(self.ModeSelection) + self.ModeInfo = QtWidgets.QPushButton(parent=self.formLayoutWidget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.ModeInfo.sizePolicy().hasHeightForWidth()) + self.ModeInfo.setSizePolicy(sizePolicy) + self.ModeInfo.setMaximumSize(QtCore.QSize(32, 32)) + self.ModeInfo.setText("") + icon = QtGui.QIcon.fromTheme("dialog-question") + self.ModeInfo.setIcon(icon) + self.ModeInfo.setIconSize(QtCore.QSize(20, 20)) + self.ModeInfo.setCheckable(False) + self.ModeInfo.setObjectName("ModeInfo") + self.horizontalLayout.addWidget(self.ModeInfo) + self.formLayout.setLayout(2, QtWidgets.QFormLayout.ItemRole.FieldRole, self.horizontalLayout) + self.verticalLayoutWidget = QtWidgets.QWidget(parent=self.centralwidget) + self.verticalLayoutWidget.setGeometry(QtCore.QRect(0, 250, 271, 101)) + self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") + self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget) + self.verticalLayout.setContentsMargins(0, 0, 0, 0) + self.verticalLayout.setObjectName("verticalLayout") + self.horizontalLayout_6 = QtWidgets.QHBoxLayout() + self.horizontalLayout_6.setContentsMargins(10, -1, 10, -1) + self.horizontalLayout_6.setSpacing(50) + self.horizontalLayout_6.setObjectName("horizontalLayout_6") + self.Read = QtWidgets.QPushButton(parent=self.verticalLayoutWidget) + self.Read.setObjectName("Read") + self.horizontalLayout_6.addWidget(self.Read) + self.Write = QtWidgets.QPushButton(parent=self.verticalLayoutWidget) + self.Write.setObjectName("Write") + self.horizontalLayout_6.addWidget(self.Write) + self.verticalLayout.addLayout(self.horizontalLayout_6) + self.horizontalLayout_7 = QtWidgets.QHBoxLayout() + self.horizontalLayout_7.setContentsMargins(0, -1, -1, -1) + self.horizontalLayout_7.setObjectName("horizontalLayout_7") + self.Check = QtWidgets.QCheckBox(parent=self.verticalLayoutWidget) + self.Check.setMaximumSize(QtCore.QSize(97, 16777215)) + self.Check.setObjectName("Check") + self.horizontalLayout_7.addWidget(self.Check) + self.verticalLayout.addLayout(self.horizontalLayout_7) + self.Status = QtWidgets.QLabel(parent=self.verticalLayoutWidget) + self.Status.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.Status.setObjectName("Status") + self.verticalLayout.addWidget(self.Status) + Controller.setCentralWidget(self.centralwidget) + + self.retranslateUi(Controller) + QtCore.QMetaObject.connectSlotsByName(Controller) + + def retranslateUi(self, Controller): + _translate = QtCore.QCoreApplication.translate + Controller.setWindowTitle(_translate("Controller", "Controller")) + self.ComPort.setText(_translate("Controller", "COM Порт:")) + self.DeviceSelection.setItemText(0, _translate("Controller", "/dev/ttyUSB0")) + self.DmxAddress.setText(_translate("Controller", "DMX Адрес:")) + self.DmxAddressField.setText(_translate("Controller", "10")) + self.DmxAddressField.setPlaceholderText(_translate("Controller", "no data")) + self.Personality.setText(_translate("Controller", "Personality:")) + self.Current1.setText(_translate("Controller", " I1")) + self.Current1Field.setText(_translate("Controller", "1000")) + self.ma1.setText(_translate("Controller", " mA")) + self.Current2.setText(_translate("Controller", " I2")) + self.Current2Field.setText(_translate("Controller", "450")) + self.ma2.setText(_translate("Controller", " mA")) + self.Current3.setText(_translate("Controller", " I3")) + self.Current3Field.setText(_translate("Controller", "520")) + self.ma3.setText(_translate("Controller", " mA")) + self.Current4.setText(_translate("Controller", " I4")) + self.Current4Field.setText(_translate("Controller", "780")) + self.ma4.setText(_translate("Controller", " mA")) + self.ModeSelection.setItemText(0, _translate("Controller", "28:CH RGB45 SLO")) + self.Read.setText(_translate("Controller", "Чтение")) + self.Write.setText(_translate("Controller", "Запись")) + self.Check.setText(_translate("Controller", "Проверить")) + self.Status.setText(_translate("Controller", "Выбранный порт: /dev/ttyUSB0")) diff --git a/ui/ControllerUI/ControllerUI.pyproject b/ui/ControllerUI/ControllerUI.pyproject new file mode 100644 index 0000000..08627f3 --- /dev/null +++ b/ui/ControllerUI/ControllerUI.pyproject @@ -0,0 +1,8 @@ +{ + "files": [ + "mainwindow.py", + "currents.ui", + "question mark.png", + "power.ui" + ] +} diff --git a/ui/ControllerUI/ControllerUI.pyproject.user b/ui/ControllerUI/ControllerUI.pyproject.user new file mode 100644 index 0000000..4a4fc15 --- /dev/null +++ b/ui/ControllerUI/ControllerUI.pyproject.user @@ -0,0 +1,178 @@ + + + + + + EnvironmentId + {36919190-efb7-4c8a-aed8-95d37a08a85c} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + 0 + false + true + false + 2 + true + true + 0 + 8 + true + false + 1 + true + true + true + *.md, *.MD, Makefile + false + true + true + + + + ProjectExplorer.Project.PluginSettings + + + true + false + true + true + true + true + + + 0 + true + + true + true + Builtin.DefaultTidyAndClazy + 2 + true + + + + true + + + + + + ProjectExplorer.Project.Target.0 + + Desktop + Python 3.12.3 + Python 3.12.3 + {81fa0cfd-796c-4d93-b88e-8dfac87f7741} + 0 + 0 + 0 + + /home/livefish/Dev/Vadimus/PowerUI_QT/.venv + + + true + Python.PysideBuildStep + /home/livefish/Dev/Vadimus/PowerUI_QT/.venv/bin/pyside6-project + /home/livefish/Dev/Vadimus/PowerUI_QT/.venv/bin/pyside6-uic + + 1 + Build + Build + ProjectExplorer.BuildSteps.Build + + + 0 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Python 3.12.3 Virtual Environment + Python.PySideBuildConfiguration + /home/livefish/Dev/Vadimus/PowerUI_QT/.venv/bin/python + /home/livefish/Dev/Vadimus/PowerUI_QT/.venv + + 1 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + true + true + 0 + true + + 2 + + false + -e cpu-cycles --call-graph dwarf,4096 -F 250 + mainwindow.py + PythonEditor.RunConfiguration./home/livefish/Dev/Vadimus/PowerUI_QT/ui/ControllerUI/mainwindow.py + /home/livefish/Dev/Vadimus/PowerUI_QT/ui/ControllerUI/mainwindow.py + true + /home/livefish/Dev/Vadimus/PowerUI_QT/ui/ControllerUI/mainwindow.py + true + true + /home/livefish/Dev/Vadimus/PowerUI_QT/ui/ControllerUI + :0 + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/ui/ControllerUI/currents.ui b/ui/ControllerUI/currents.ui new file mode 100644 index 0000000..db8d171 --- /dev/null +++ b/ui/ControllerUI/currents.ui @@ -0,0 +1,418 @@ + + + Controller + + + + 0 + 0 + 273 + 350 + + + + + 0 + 0 + + + + + 273 + 350 + + + + + 273 + 350 + + + + Controller + + + + + + 0 + 0 + 284 + 251 + + + + + QFormLayout::DontWrapRows + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 8 + + + 10 + + + 10 + + + 0 + + + + + + Ubuntu Sans + + + + COM Порт: + + + + + + + + 0 + 0 + + + + + 110 + 16777215 + + + + + Arial + 10 + + + + + /dev/ttyUSB0 + + + + + + + + DMX Адрес: + + + + + + + + 45 + 16777215 + + + + 10 + + + Qt::AlignCenter + + + no data + + + + + + + Personality: + + + + + + + I1 + + + + + + + + + + 45 + 16777215 + + + + 1000 + + + Qt::AlignCenter + + + + + + + + 16777215 + 16777215 + + + + mA + + + + + + + + + I2 + + + + + + + + + + 45 + 16777215 + + + + 450 + + + Qt::AlignCenter + + + + + + + mA + + + + + + + + + I3 + + + + + + + + + + 45 + 16777215 + + + + 520 + + + Qt::AlignCenter + + + + + + + mA + + + + + + + + + I4 + + + + + + + + + + 45 + 16777215 + + + + 780 + + + Qt::AlignCenter + + + + + + + mA + + + + + + + + + 0 + + + 0 + + + + + + 131 + 32 + + + + + Arial + 9 + + + + true + + + + 28:CH RGB45 SLO + + + + + + + + + 0 + 0 + + + + + 32 + 32 + + + + + + + + .. + + + + 20 + 20 + + + + false + + + + + + + + + + + 0 + 250 + 271 + 101 + + + + + + + 50 + + + 10 + + + 10 + + + + + Чтение + + + + + + + Запись + + + + + + + + + 0 + + + + + + 97 + 16777215 + + + + Проверить + + + + + + + + + Выбранный порт: /dev/ttyUSB0 + + + Qt::AlignCenter + + + + + + + + + + diff --git a/ui/ControllerUI/mainwindow.py b/ui/ControllerUI/mainwindow.py new file mode 100644 index 0000000..49c1a62 --- /dev/null +++ b/ui/ControllerUI/mainwindow.py @@ -0,0 +1,25 @@ +# This Python file uses the following encoding: utf-8 +import sys + +from PySide6.QtWidgets import QApplication, QMainWindow + +# Important: +# You need to run the following command to generate the ui_form.py file +# pyside6-uic form.ui -o ui_form.py, or +# pyside2-uic form.ui -o ui_form.py +from ui_form import Ui_Controller +from PySide6 import QtCore + +class MainWindow(QMainWindow): + def __init__(self, parent=None): + super().__init__(parent) + self.setWindowFlags(QtCore.Qt.WindowMinimizeButtonHint) + self.ui = Ui_Controller() + self.ui.setupUi(self) + + +if __name__ == "__main__": + app = QApplication(sys.argv) + widget = MainWindow() + widget.show() + sys.exit(app.exec()) diff --git a/ui/ControllerUI/power.ui b/ui/ControllerUI/power.ui new file mode 100644 index 0000000..db8d171 --- /dev/null +++ b/ui/ControllerUI/power.ui @@ -0,0 +1,418 @@ + + + Controller + + + + 0 + 0 + 273 + 350 + + + + + 0 + 0 + + + + + 273 + 350 + + + + + 273 + 350 + + + + Controller + + + + + + 0 + 0 + 284 + 251 + + + + + QFormLayout::DontWrapRows + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 8 + + + 10 + + + 10 + + + 0 + + + + + + Ubuntu Sans + + + + COM Порт: + + + + + + + + 0 + 0 + + + + + 110 + 16777215 + + + + + Arial + 10 + + + + + /dev/ttyUSB0 + + + + + + + + DMX Адрес: + + + + + + + + 45 + 16777215 + + + + 10 + + + Qt::AlignCenter + + + no data + + + + + + + Personality: + + + + + + + I1 + + + + + + + + + + 45 + 16777215 + + + + 1000 + + + Qt::AlignCenter + + + + + + + + 16777215 + 16777215 + + + + mA + + + + + + + + + I2 + + + + + + + + + + 45 + 16777215 + + + + 450 + + + Qt::AlignCenter + + + + + + + mA + + + + + + + + + I3 + + + + + + + + + + 45 + 16777215 + + + + 520 + + + Qt::AlignCenter + + + + + + + mA + + + + + + + + + I4 + + + + + + + + + + 45 + 16777215 + + + + 780 + + + Qt::AlignCenter + + + + + + + mA + + + + + + + + + 0 + + + 0 + + + + + + 131 + 32 + + + + + Arial + 9 + + + + true + + + + 28:CH RGB45 SLO + + + + + + + + + 0 + 0 + + + + + 32 + 32 + + + + + + + + .. + + + + 20 + 20 + + + + false + + + + + + + + + + + 0 + 250 + 271 + 101 + + + + + + + 50 + + + 10 + + + 10 + + + + + Чтение + + + + + + + Запись + + + + + + + + + 0 + + + + + + 97 + 16777215 + + + + Проверить + + + + + + + + + Выбранный порт: /dev/ttyUSB0 + + + Qt::AlignCenter + + + + + + + + + + diff --git a/ui/ControllerUI/power.ui.autosave b/ui/ControllerUI/power.ui.autosave new file mode 100644 index 0000000..db8d171 --- /dev/null +++ b/ui/ControllerUI/power.ui.autosave @@ -0,0 +1,418 @@ + + + Controller + + + + 0 + 0 + 273 + 350 + + + + + 0 + 0 + + + + + 273 + 350 + + + + + 273 + 350 + + + + Controller + + + + + + 0 + 0 + 284 + 251 + + + + + QFormLayout::DontWrapRows + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 8 + + + 10 + + + 10 + + + 0 + + + + + + Ubuntu Sans + + + + COM Порт: + + + + + + + + 0 + 0 + + + + + 110 + 16777215 + + + + + Arial + 10 + + + + + /dev/ttyUSB0 + + + + + + + + DMX Адрес: + + + + + + + + 45 + 16777215 + + + + 10 + + + Qt::AlignCenter + + + no data + + + + + + + Personality: + + + + + + + I1 + + + + + + + + + + 45 + 16777215 + + + + 1000 + + + Qt::AlignCenter + + + + + + + + 16777215 + 16777215 + + + + mA + + + + + + + + + I2 + + + + + + + + + + 45 + 16777215 + + + + 450 + + + Qt::AlignCenter + + + + + + + mA + + + + + + + + + I3 + + + + + + + + + + 45 + 16777215 + + + + 520 + + + Qt::AlignCenter + + + + + + + mA + + + + + + + + + I4 + + + + + + + + + + 45 + 16777215 + + + + 780 + + + Qt::AlignCenter + + + + + + + mA + + + + + + + + + 0 + + + 0 + + + + + + 131 + 32 + + + + + Arial + 9 + + + + true + + + + 28:CH RGB45 SLO + + + + + + + + + 0 + 0 + + + + + 32 + 32 + + + + + + + + .. + + + + 20 + 20 + + + + false + + + + + + + + + + + 0 + 250 + 271 + 101 + + + + + + + 50 + + + 10 + + + 10 + + + + + Чтение + + + + + + + Запись + + + + + + + + + 0 + + + + + + 97 + 16777215 + + + + Проверить + + + + + + + + + Выбранный порт: /dev/ttyUSB0 + + + Qt::AlignCenter + + + + + + + + + + diff --git a/ui/ControllerUI/question mark.png b/ui/ControllerUI/question mark.png new file mode 100644 index 0000000000000000000000000000000000000000..312f78e612491ea9184bc6df7785202a0c34342f GIT binary patch literal 708 zcmV;#0z3VQP)Px%d`Uz>R5(wilTAofK@`XTb7$s$J`IDgg`!CYfnvBQL`tN{RRlq3p{pbj`=YJO z3fojfRE9(n2yJTBqD_&BqNybmK?{j$ky(E9eENL%V@}+;^3pz59qzp_bI$)a|8r-C z;Xi}@OMmdp2nEW3iWCR|Ufgc@YwaJCP3I9O%WBpm_ro+Iy?W9E5n=S=HpUt{M`$T@v9J^(RM0|U3f=de&SK;Og_He1 zuoN5(x~2G>OzU<;VGK!GPfQowWsOiSo|>>>_hHG@Z|OB2A3ql2`