Загрузил(а) файлы в 'Project/ui'

This commit is contained in:
Дмитрий Пунов 2022-11-28 01:54:54 +03:00
parent ad54866a04
commit 2402a96f2b
2 changed files with 288 additions and 0 deletions

110
Project/ui/device.py Normal file
View File

@ -0,0 +1,110 @@
# Form implementation generated from reading ui file 'device.ui'
#
# Created by: PyQt6 UI code generator 6.4.0
#
# 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_Device(object):
def setupUi(self, Device):
Device.setObjectName("Device")
Device.resize(506, 374)
font = QtGui.QFont()
font.setFamily("Ubuntu")
font.setPointSize(-1)
font.setBold(False)
font.setWeight(50)
Device.setFont(font)
Device.setAutoFillBackground(False)
Device.setStyleSheet("background-color:rgb(35,39,42);\n"
"color:white;\n"
"font-size:16px;\n"
"label{\n"
"font:bold}")
self.gridLayoutWidget = QtWidgets.QWidget(Device)
self.gridLayoutWidget.setGeometry(QtCore.QRect(40, 20, 431, 341))
self.gridLayoutWidget.setObjectName("gridLayoutWidget")
self.device_params_grid = QtWidgets.QGridLayout(self.gridLayoutWidget)
self.device_params_grid.setContentsMargins(0, 0, 0, 0)
self.device_params_grid.setObjectName("device_params_grid")
self.device_params_label = QtWidgets.QLabel(self.gridLayoutWidget)
self.device_params_label.setStyleSheet("font-size:20px;\n"
"font:bold;\n"
"border:1px solid white;\n"
"border-radius:10px;")
self.device_params_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
self.device_params_label.setObjectName("device_params_label")
self.device_params_grid.addWidget(self.device_params_label, 0, 0, 1, 2)
self.status_label = QtWidgets.QLabel(self.gridLayoutWidget)
self.status_label.setStyleSheet("font:bold;\n"
" font-size:16px;")
self.status_label.setObjectName("status_label")
self.device_params_grid.addWidget(self.status_label, 1, 0, 1, 1)
self.device_status = QtWidgets.QLabel(self.gridLayoutWidget)
self.device_status.setToolTip("")
self.device_status.setStyleSheet("font-size:16px;")
self.device_status.setObjectName("device_status")
self.device_params_grid.addWidget(self.device_status, 1, 1, 1, 1)
self.baud_rate_label = QtWidgets.QLabel(self.gridLayoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed)
sizePolicy.setHorizontalStretch(235)
sizePolicy.setVerticalStretch(57)
sizePolicy.setHeightForWidth(self.baud_rate_label.sizePolicy().hasHeightForWidth())
self.baud_rate_label.setSizePolicy(sizePolicy)
self.baud_rate_label.setStyleSheet("font:bold;")
self.baud_rate_label.setObjectName("baud_rate_label")
self.device_params_grid.addWidget(self.baud_rate_label, 6, 0, 1, 1)
self.device_name = QtWidgets.QLabel(self.gridLayoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.device_name.sizePolicy().hasHeightForWidth())
self.device_name.setSizePolicy(sizePolicy)
self.device_name.setStyleSheet("font-size:16px;")
self.device_name.setObjectName("device_name")
self.device_params_grid.addWidget(self.device_name, 3, 1, 1, 1)
self.name_label = QtWidgets.QLabel(self.gridLayoutWidget)
self.name_label.setStyleSheet("font:bold;\n"
"font-size:16px;")
self.name_label.setObjectName("name_label")
self.device_params_grid.addWidget(self.name_label, 3, 0, 1, 1)
self.baud_rate_edit = QtWidgets.QLineEdit(self.gridLayoutWidget)
self.baud_rate_edit.setFocusPolicy(QtCore.Qt.FocusPolicy.ClickFocus)
self.baud_rate_edit.setStyleSheet("color:white; \n"
"font-size:16px;\n"
"border:none;\n"
"")
self.baud_rate_edit.setObjectName("baud_rate_edit")
self.device_params_grid.addWidget(self.baud_rate_edit, 6, 1, 1, 1)
self.id_label = QtWidgets.QLabel(self.gridLayoutWidget)
self.id_label.setStyleSheet("font:bold;")
self.id_label.setObjectName("id_label")
self.device_params_grid.addWidget(self.id_label, 2, 0, 1, 1)
self.id_edit = QtWidgets.QLineEdit(self.gridLayoutWidget)
self.id_edit.setFocusPolicy(QtCore.Qt.FocusPolicy.ClickFocus)
self.id_edit.setStyleSheet("QLineEdit\n"
"{color:white; \n"
"font-size:16px;\n"
"border:none;\n"
"}\n"
"")
self.id_edit.setObjectName("id_edit")
self.device_params_grid.addWidget(self.id_edit, 2, 1, 1, 1)
self.retranslateUi(Device)
QtCore.QMetaObject.connectSlotsByName(Device)
def retranslateUi(self, Device):
_translate = QtCore.QCoreApplication.translate
Device.setWindowTitle(_translate("Device", "none"))
self.device_params_label.setText(_translate("Device", "<html><head/><body><p>Параметры устройства</p></body></html>"))
self.status_label.setText(_translate("Device", "Статус устройства"))
self.device_status.setText(_translate("Device", "none"))
self.baud_rate_label.setText(_translate("Device", "Скорость передачи данных (ред.)"))
self.device_name.setText(_translate("Device", "none"))
self.name_label.setText(_translate("Device", "Название устройства"))
self.id_label.setText(_translate("Device", "ID (ред.)"))

178
Project/ui/device.ui Normal file
View File

@ -0,0 +1,178 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Device</class>
<widget class="QWidget" name="Device">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>506</width>
<height>374</height>
</rect>
</property>
<property name="font">
<font>
<family>Ubuntu</family>
<pointsize>-1</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="windowTitle">
<string>none</string>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">background-color:rgb(35,39,42);
color:white;
font-size:16px;
label{
font:bold}</string>
</property>
<widget class="QWidget" name="gridLayoutWidget">
<property name="geometry">
<rect>
<x>40</x>
<y>20</y>
<width>431</width>
<height>341</height>
</rect>
</property>
<layout class="QGridLayout" name="device_params_grid">
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="device_params_label">
<property name="styleSheet">
<string notr="true">font-size:20px;
font:bold;
border:1px solid white;
border-radius:10px;</string>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Параметры устройства&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="status_label">
<property name="styleSheet">
<string notr="true">font:bold;
font-size:16px;</string>
</property>
<property name="text">
<string>Статус устройства</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="device_status">
<property name="toolTip">
<string/>
</property>
<property name="styleSheet">
<string notr="true">font-size:16px;</string>
</property>
<property name="text">
<string>none</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="baud_rate_label">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>235</horstretch>
<verstretch>57</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">font:bold;</string>
</property>
<property name="text">
<string>Скорость передачи данных (ред.)</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="device_name">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">font-size:16px;</string>
</property>
<property name="text">
<string>none</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="name_label">
<property name="styleSheet">
<string notr="true">font:bold;
font-size:16px;</string>
</property>
<property name="text">
<string>Название устройства</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLineEdit" name="baud_rate_edit">
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<property name="styleSheet">
<string notr="true">color:white;
font-size:16px;
border:none;
</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="id_label">
<property name="font">
<font>
<pointsize>-1</pointsize>
<weight>75</weight>
<italic>false</italic>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">font:bold;</string>
</property>
<property name="text">
<string>ID (ред.)</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="id_edit">
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<property name="styleSheet">
<string notr="true">QLineEdit
{color:white;
font-size:16px;
border:none;
}
</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections/>
</ui>