-
Notifications
You must be signed in to change notification settings - Fork 2
/
ui_pyqt_ros2.py
209 lines (202 loc) · 10.7 KB
/
ui_pyqt_ros2.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui_pyqt_ros2.ui'
#
# Created by: PyQt5 UI code generator 5.14.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(665, 356)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
self.tabWidget.setGeometry(QtCore.QRect(20, 50, 611, 241))
self.tabWidget.setObjectName("tabWidget")
self.tab = QtWidgets.QWidget()
self.tab.setObjectName("tab")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.tab)
self.horizontalLayout.setObjectName("horizontalLayout")
self.gridLayout = QtWidgets.QGridLayout()
self.gridLayout.setObjectName("gridLayout")
self.label_ros2_state_float = QtWidgets.QLabel(self.tab)
self.label_ros2_state_float.setEnabled(True)
self.label_ros2_state_float.setMaximumSize(QtCore.QSize(130, 30))
self.label_ros2_state_float.setSizeIncrement(QtCore.QSize(0, 0))
font = QtGui.QFont()
font.setPointSize(12)
self.label_ros2_state_float.setFont(font)
self.label_ros2_state_float.setLayoutDirection(QtCore.Qt.LeftToRight)
self.label_ros2_state_float.setText("")
self.label_ros2_state_float.setAlignment(QtCore.Qt.AlignCenter)
self.label_ros2_state_float.setIndent(3)
self.label_ros2_state_float.setObjectName("label_ros2_state_float")
self.gridLayout.addWidget(self.label_ros2_state_float, 0, 2, 2, 1, QtCore.Qt.AlignVCenter)
self.checkBox_float_02 = QtWidgets.QCheckBox(self.tab)
self.checkBox_float_02.setText("")
self.checkBox_float_02.setObjectName("checkBox_float_02")
self.gridLayout.addWidget(self.checkBox_float_02, 2, 0, 1, 1)
self.label_msg_float = QtWidgets.QLabel(self.tab)
font = QtGui.QFont()
font.setPointSize(12)
self.label_msg_float.setFont(font)
self.label_msg_float.setObjectName("label_msg_float")
self.gridLayout.addWidget(self.label_msg_float, 2, 1, 1, 1)
self.label_topic_changed_float = QtWidgets.QLabel(self.tab)
font = QtGui.QFont()
font.setPointSize(12)
self.label_topic_changed_float.setFont(font)
self.label_topic_changed_float.setObjectName("label_topic_changed_float")
self.gridLayout.addWidget(self.label_topic_changed_float, 5, 1, 1, 1)
self.label_data_num_float = QtWidgets.QLabel(self.tab)
font = QtGui.QFont()
font.setPointSize(12)
font.setBold(True)
font.setWeight(75)
self.label_data_num_float.setFont(font)
self.label_data_num_float.setText("")
self.label_data_num_float.setIndent(3)
self.label_data_num_float.setObjectName("label_data_num_float")
self.gridLayout.addWidget(self.label_data_num_float, 2, 2, 1, 1)
self.lineEdit_topic_float = QtWidgets.QLineEdit(self.tab)
font = QtGui.QFont()
font.setPointSize(12)
self.lineEdit_topic_float.setFont(font)
self.lineEdit_topic_float.setObjectName("lineEdit_topic_float")
self.gridLayout.addWidget(self.lineEdit_topic_float, 5, 2, 1, 1)
self.checkBox_float_01 = QtWidgets.QCheckBox(self.tab)
self.checkBox_float_01.setText("")
self.checkBox_float_01.setObjectName("checkBox_float_01")
self.gridLayout.addWidget(self.checkBox_float_01, 0, 0, 2, 1)
self.label_ros2_float = QtWidgets.QLabel(self.tab)
font = QtGui.QFont()
font.setFamily("aakar")
font.setPointSize(13)
self.label_ros2_float.setFont(font)
self.label_ros2_float.setObjectName("label_ros2_float")
self.gridLayout.addWidget(self.label_ros2_float, 0, 1, 2, 1)
self.label_topic_name_float = QtWidgets.QLabel(self.tab)
font = QtGui.QFont()
font.setPointSize(12)
self.label_topic_name_float.setFont(font)
self.label_topic_name_float.setObjectName("label_topic_name_float")
self.gridLayout.addWidget(self.label_topic_name_float, 3, 1, 2, 1)
self.label_topic_setting_float = QtWidgets.QLabel(self.tab)
font = QtGui.QFont()
font.setPointSize(12)
self.label_topic_setting_float.setFont(font)
self.label_topic_setting_float.setText("")
self.label_topic_setting_float.setIndent(3)
self.label_topic_setting_float.setObjectName("label_topic_setting_float")
self.gridLayout.addWidget(self.label_topic_setting_float, 3, 2, 2, 1)
self.horizontalLayout.addLayout(self.gridLayout)
self.tabWidget.addTab(self.tab, "")
self.tab_2 = QtWidgets.QWidget()
self.tab_2.setObjectName("tab_2")
self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.tab_2)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.gridLayout_2 = QtWidgets.QGridLayout()
self.gridLayout_2.setObjectName("gridLayout_2")
self.lineEdit_topic_int = QtWidgets.QLineEdit(self.tab_2)
font = QtGui.QFont()
font.setPointSize(12)
self.lineEdit_topic_int.setFont(font)
self.lineEdit_topic_int.setObjectName("lineEdit_topic_int")
self.gridLayout_2.addWidget(self.lineEdit_topic_int, 5, 2, 1, 1)
self.label_topic_name_int = QtWidgets.QLabel(self.tab_2)
font = QtGui.QFont()
font.setPointSize(12)
self.label_topic_name_int.setFont(font)
self.label_topic_name_int.setObjectName("label_topic_name_int")
self.gridLayout_2.addWidget(self.label_topic_name_int, 3, 1, 2, 1)
self.label_data_num_int = QtWidgets.QLabel(self.tab_2)
font = QtGui.QFont()
font.setPointSize(12)
font.setBold(True)
font.setWeight(75)
self.label_data_num_int.setFont(font)
self.label_data_num_int.setText("")
self.label_data_num_int.setObjectName("label_data_num_int")
self.gridLayout_2.addWidget(self.label_data_num_int, 2, 2, 1, 1)
self.checkBox_int_01 = QtWidgets.QCheckBox(self.tab_2)
self.checkBox_int_01.setText("")
self.checkBox_int_01.setObjectName("checkBox_int_01")
self.gridLayout_2.addWidget(self.checkBox_int_01, 0, 0, 2, 1)
self.label_topic_setting_int = QtWidgets.QLabel(self.tab_2)
font = QtGui.QFont()
font.setPointSize(12)
self.label_topic_setting_int.setFont(font)
self.label_topic_setting_int.setText("")
self.label_topic_setting_int.setObjectName("label_topic_setting_int")
self.gridLayout_2.addWidget(self.label_topic_setting_int, 3, 2, 2, 1)
self.checkBox_int_02 = QtWidgets.QCheckBox(self.tab_2)
self.checkBox_int_02.setText("")
self.checkBox_int_02.setObjectName("checkBox_int_02")
self.gridLayout_2.addWidget(self.checkBox_int_02, 2, 0, 1, 1)
self.label_msg_int = QtWidgets.QLabel(self.tab_2)
font = QtGui.QFont()
font.setPointSize(12)
self.label_msg_int.setFont(font)
self.label_msg_int.setObjectName("label_msg_int")
self.gridLayout_2.addWidget(self.label_msg_int, 2, 1, 1, 1)
self.label_topic_changed_int = QtWidgets.QLabel(self.tab_2)
font = QtGui.QFont()
font.setPointSize(12)
self.label_topic_changed_int.setFont(font)
self.label_topic_changed_int.setObjectName("label_topic_changed_int")
self.gridLayout_2.addWidget(self.label_topic_changed_int, 5, 1, 1, 1)
self.label_ros2_int = QtWidgets.QLabel(self.tab_2)
font = QtGui.QFont()
font.setFamily("aakar")
font.setPointSize(13)
self.label_ros2_int.setFont(font)
self.label_ros2_int.setObjectName("label_ros2_int")
self.gridLayout_2.addWidget(self.label_ros2_int, 0, 1, 2, 1)
self.label_ros2_state_int = QtWidgets.QLabel(self.tab_2)
self.label_ros2_state_int.setEnabled(True)
self.label_ros2_state_int.setMaximumSize(QtCore.QSize(130, 30))
self.label_ros2_state_int.setSizeIncrement(QtCore.QSize(0, 0))
font = QtGui.QFont()
font.setPointSize(12)
self.label_ros2_state_int.setFont(font)
self.label_ros2_state_int.setLayoutDirection(QtCore.Qt.LeftToRight)
self.label_ros2_state_int.setText("")
self.label_ros2_state_int.setAlignment(QtCore.Qt.AlignCenter)
self.label_ros2_state_int.setIndent(3)
self.label_ros2_state_int.setObjectName("label_ros2_state_int")
self.gridLayout_2.addWidget(self.label_ros2_state_int, 0, 2, 2, 1)
self.horizontalLayout_2.addLayout(self.gridLayout_2)
self.tabWidget.addTab(self.tab_2, "")
self.label_main = QtWidgets.QLabel(self.centralwidget)
self.label_main.setGeometry(QtCore.QRect(20, 20, 621, 17))
font = QtGui.QFont()
font.setPointSize(13)
font.setItalic(False)
self.label_main.setFont(font)
self.label_main.setObjectName("label_main")
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 665, 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.tabWidget.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "PyQt5 ROS2 APP"))
self.label_msg_float.setText(_translate("MainWindow", "Float64 msg"))
self.label_topic_changed_float.setText(_translate("MainWindow", "Topic Changed:"))
self.label_ros2_float.setText(_translate("MainWindow", "ROS2 Connection"))
self.label_topic_name_float.setText(_translate("MainWindow", "Topic Name:"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "Float_msg"))
self.label_topic_name_int.setText(_translate("MainWindow", "Topic Name:"))
self.label_msg_int.setText(_translate("MainWindow", "Int64 msg"))
self.label_topic_changed_int.setText(_translate("MainWindow", "Topic Changed:"))
self.label_ros2_int.setText(_translate("MainWindow", "ROS2 Connection"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "Int_msg"))
self.label_main.setText(_translate("MainWindow", "Subscribe ROS2 Data"))