UI design
This commit is contained in:
parent
181a625243
commit
b719b3bdda
@ -86,55 +86,25 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="device_groupBox">
|
||||
<property name="title">
|
||||
<string>Выбор устройства</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<widget class="QRadioButton" name="device1_radioButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>31</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
<widget class="QComboBox" name="device">
|
||||
<property name="currentText">
|
||||
<string extracomment="Выбор COM-порта">1 устройство</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QRadioButton" name="device2_radioButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>30</y>
|
||||
<width>31</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
<string>1 устройство</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QRadioButton" name="device3_radioButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>20</y>
|
||||
<width>31</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
<string>2 устройство</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
<string>3 устройство</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
||||
@ -282,11 +282,11 @@ class Ui(QtWidgets.QMainWindow):
|
||||
self.serial.setPortName(self.Port_ch.currentText())
|
||||
self.serial.open(QIODevice.ReadWrite)
|
||||
self.serial.flush()
|
||||
if self.device1_radioButton.isChecked():
|
||||
if self.device.currentIndex() == 0:
|
||||
self.serial.write(mes1.encode())
|
||||
if self.device2_radioButton.isChecked():
|
||||
if self.device.currentIndex() == 1:
|
||||
self.serial.write(mes2.encode())
|
||||
if self.device3_radioButton.isChecked():
|
||||
if self.device.currentIndex() == 2:
|
||||
self.serial.write(mes3.encode())
|
||||
self.on_close()
|
||||
MODE_COM_PORT = True
|
||||
@ -603,7 +603,7 @@ class Ui(QtWidgets.QMainWindow):
|
||||
self.Close_file.setVisible(True)
|
||||
self.Restart.setVisible(True)
|
||||
self.horizontalScrollBar.setVisible(False)
|
||||
self.device_groupBox.setVisible(True)
|
||||
self.device.setVisible(True)
|
||||
else:
|
||||
self.on_stop()
|
||||
self.OpenB.setVisible(True)
|
||||
@ -619,7 +619,7 @@ class Ui(QtWidgets.QMainWindow):
|
||||
self.Close_file.setVisible(False)
|
||||
self.Restart.setVisible(False)
|
||||
self.horizontalScrollBar.setVisible(True)
|
||||
self.device_groupBox.setVisible(False)
|
||||
self.device.setVisible(False)
|
||||
|
||||
def set_send_mode(self):
|
||||
"""Установка режима передачи данных (Bluetooth/433)"""
|
||||
|
||||
BIN
viewer.exe
BIN
viewer.exe
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user