forked from COMoER/LCR_sjtu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Demo_v4.py
121 lines (113 loc) · 5.77 KB
/
Demo_v4.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'Demo_v4.ui'
#
# Created by: PyQt5 UI code generator 5.15.2
#
# 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.
# 这个是由PyQt5自己生成的,原始.ui文件放在tools文件夹内
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(1351, 972)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.centralwidget)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.left = QtWidgets.QVBoxLayout()
self.left.setContentsMargins(5, 5, 5, 5)
self.left.setSpacing(10)
self.left.setObjectName("left")
self.map = QtWidgets.QLabel(self.centralwidget)
self.map.setMinimumSize(QtCore.QSize(320, 600))
self.map.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.map.setFrameShape(QtWidgets.QFrame.NoFrame)
self.map.setObjectName("map")
self.left.addWidget(self.map)
self.feedback = QtWidgets.QLabel(self.centralwidget)
self.feedback.setEnabled(True)
self.feedback.setMinimumSize(QtCore.QSize(320, 240))
self.feedback.setObjectName("feed_back")
self.left.addWidget(self.feedback)
self.left.setStretch(0, 5)
self.left.setStretch(1, 1)
self.horizontalLayout.addLayout(self.left)
self.right = QtWidgets.QGridLayout()
self.right.setContentsMargins(5, 5, 5, 5)
self.right.setSpacing(10)
self.right.setObjectName("right")
self.main_demo = QtWidgets.QLabel(self.centralwidget)
self.main_demo.setMinimumSize(QtCore.QSize(960, 540))
self.main_demo.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.main_demo.setObjectName("main_demo")
self.right.addWidget(self.main_demo, 0, 0, 1, 4)
self.message_box = QtWidgets.QLabel(self.centralwidget)
self.message_box.setMinimumSize(QtCore.QSize(320, 280))
self.message_box.setMidLineWidth(3)
self.message_box.setObjectName("message_box")
self.right.addWidget(self.message_box, 1, 0, 5,2)
self.state = QtWidgets.QLabel(self.centralwidget)
self.state.setMinimumSize(QtCore.QSize(0,0))
self.state.setMidLineWidth(3)
self.state.setObjectName("state_message")
self.right.addWidget(self.state, 1, 2, 5,1)
self.btn1 = QtWidgets.QPushButton(self.centralwidget)
self.btn1.setMinimumSize(QtCore.QSize(115, 35))
self.btn1.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.btn1.setObjectName("btn1")
self.right.addWidget(self.btn1,2,3,1,1)
self.btn2 = QtWidgets.QPushButton(self.centralwidget)
self.btn2.setMinimumSize(QtCore.QSize(115, 35))
self.btn2.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.btn2.setObjectName("btn2")
self.right.addWidget(self.btn2,3,3,1,1)
self.btn3 = QtWidgets.QPushButton(self.centralwidget)
self.btn3.setMinimumSize(QtCore.QSize(115, 35))
self.btn3.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.btn3.setObjectName("btn3")
self.right.addWidget(self.btn3,4,3,1,1)
self.btn4 = QtWidgets.QPushButton(self.centralwidget)
self.btn4.setMinimumSize(QtCore.QSize(115, 35))
self.btn4.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.btn4.setObjectName("btn4")
self.right.addWidget(self.btn4,5,3,1,1)
# 缩放比例,具体参见PyQt5文档 setRowStrech
self.right.setRowStretch(0, 7)
self.right.setRowStretch(1, 1)
self.right.setRowStretch(2, 1)
self.right.setRowStretch(3, 1)
self.right.setRowStretch(4, 1)
self.right.setRowStretch(5, 1)
self.horizontalLayout.addLayout(self.right)
self.horizontalLayout.setStretch(0, 1)
self.horizontalLayout.setStretch(1, 4)
self.horizontalLayout_2.addLayout(self.horizontalLayout)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 1351, 22))
self.menubar.setObjectName("menubar")
MainWindow.setMenuBar(self.menubar)
self.statusBar = QtWidgets.QStatusBar(MainWindow)
self.statusBar.setObjectName("statusBar")
MainWindow.setStatusBar(self.statusBar)
self.retranslateUi(MainWindow)
self.btn1.clicked.connect(MainWindow.btn1_on_clicked)
self.btn2.clicked.connect(MainWindow.btn2_on_clicked)
self.btn3.clicked.connect(MainWindow.btn3_on_clicked)
self.btn4.clicked.connect(MainWindow.btn4_on_clicked)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "Radar UI"))
self.main_demo.setText(_translate("MainWindow", "main_demo"))
self.message_box.setText(_translate("MainWindow", "message_box"))
self.feedback.setText(_translate("MainWindow", "feedback"))
self.state.setText(_translate("MainWindow", "state"))
self.map.setText(_translate("MainWindow", "map"))
self.btn1.setText(_translate("MainWindow", "btn1"))
self.btn2.setText(_translate("MainWindow", "btn2"))
self.btn3.setText(_translate("MainWindow", "btn3"))
self.btn4.setText(_translate("MainWindow", "btn4"))