-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain_ui.py
269 lines (262 loc) · 15.9 KB
/
main_ui.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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '..\main.ui'
#
# Created by: PyQt5 UI code generator 5.15.0
#
# 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.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(325, 272)
MainWindow.setMaximumSize(QtCore.QSize(16777215, 16777215))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/logo/kurokesu3.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
MainWindow.setWindowIcon(icon)
MainWindow.setStyleSheet("")
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)
self.verticalLayout.setObjectName("verticalLayout")
self.push_run = QtWidgets.QPushButton(self.centralwidget)
self.push_run.setEnabled(True)
self.push_run.setMinimumSize(QtCore.QSize(0, 60))
font = QtGui.QFont()
font.setPointSize(16)
font.setBold(True)
font.setWeight(75)
self.push_run.setFont(font)
self.push_run.setStyleSheet("")
self.push_run.setFlat(False)
self.push_run.setObjectName("push_run")
self.verticalLayout.addWidget(self.push_run)
self.label_gcode_comment = QtWidgets.QLabel(self.centralwidget)
self.label_gcode_comment.setObjectName("label_gcode_comment")
self.verticalLayout.addWidget(self.label_gcode_comment)
self.progress_program = QtWidgets.QProgressBar(self.centralwidget)
self.progress_program.setEnabled(True)
self.progress_program.setMaximum(1000)
self.progress_program.setProperty("value", 0)
self.progress_program.setAlignment(QtCore.Qt.AlignCenter)
self.progress_program.setObjectName("progress_program")
self.verticalLayout.addWidget(self.progress_program)
spacerItem = QtWidgets.QSpacerItem(20, 17, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.verticalLayout.addItem(spacerItem)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.push_emergency_stop = QtWidgets.QPushButton(self.centralwidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.push_emergency_stop.sizePolicy().hasHeightForWidth())
self.push_emergency_stop.setSizePolicy(sizePolicy)
self.push_emergency_stop.setMinimumSize(QtCore.QSize(0, 40))
self.push_emergency_stop.setStyleSheet("")
self.push_emergency_stop.setFlat(False)
self.push_emergency_stop.setObjectName("push_emergency_stop")
self.horizontalLayout_2.addWidget(self.push_emergency_stop)
self.push_restart = QtWidgets.QPushButton(self.centralwidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.push_restart.sizePolicy().hasHeightForWidth())
self.push_restart.setSizePolicy(sizePolicy)
self.push_restart.setMinimumSize(QtCore.QSize(0, 40))
self.push_restart.setStyleSheet("")
self.push_restart.setObjectName("push_restart")
self.horizontalLayout_2.addWidget(self.push_restart)
self.push_pause_resume = QtWidgets.QPushButton(self.centralwidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.push_pause_resume.sizePolicy().hasHeightForWidth())
self.push_pause_resume.setSizePolicy(sizePolicy)
self.push_pause_resume.setMinimumSize(QtCore.QSize(0, 40))
self.push_pause_resume.setStyleSheet("")
self.push_pause_resume.setObjectName("push_pause_resume")
self.horizontalLayout_2.addWidget(self.push_pause_resume)
self.verticalLayout.addLayout(self.horizontalLayout_2)
self.line = QtWidgets.QFrame(self.centralwidget)
self.line.setFrameShape(QtWidgets.QFrame.HLine)
self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line.setObjectName("line")
self.verticalLayout.addWidget(self.line)
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.combo_comports = QtWidgets.QComboBox(self.centralwidget)
self.combo_comports.setMinimumSize(QtCore.QSize(0, 24))
self.combo_comports.setObjectName("combo_comports")
self.combo_comports.addItem("")
self.combo_comports.addItem("")
self.combo_comports.addItem("")
self.horizontalLayout_3.addWidget(self.combo_comports)
self.button_com_refresh = QtWidgets.QPushButton(self.centralwidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.button_com_refresh.sizePolicy().hasHeightForWidth())
self.button_com_refresh.setSizePolicy(sizePolicy)
self.button_com_refresh.setText("")
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/logo/restart.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.button_com_refresh.setIcon(icon1)
self.button_com_refresh.setObjectName("button_com_refresh")
self.horizontalLayout_3.addWidget(self.button_com_refresh)
self.button_connect = QtWidgets.QPushButton(self.centralwidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.button_connect.sizePolicy().hasHeightForWidth())
self.button_connect.setSizePolicy(sizePolicy)
self.button_connect.setMinimumSize(QtCore.QSize(0, 24))
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.button_connect.setFont(font)
self.button_connect.setObjectName("button_connect")
self.horizontalLayout_3.addWidget(self.button_connect)
self.button_disconnect = QtWidgets.QPushButton(self.centralwidget)
self.button_disconnect.setMinimumSize(QtCore.QSize(0, 24))
self.button_disconnect.setObjectName("button_disconnect")
self.horizontalLayout_3.addWidget(self.button_disconnect)
self.verticalLayout.addLayout(self.horizontalLayout_3)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 325, 21))
self.menubar.setObjectName("menubar")
self.menuFile = QtWidgets.QMenu(self.menubar)
self.menuFile.setObjectName("menuFile")
self.menuAbout = QtWidgets.QMenu(self.menubar)
self.menuAbout.setObjectName("menuAbout")
self.menuEdit = QtWidgets.QMenu(self.menubar)
self.menuEdit.setObjectName("menuEdit")
self.menuControl = QtWidgets.QMenu(self.menubar)
self.menuControl.setObjectName("menuControl")
self.menuMotion_control = QtWidgets.QMenu(self.menubar)
self.menuMotion_control.setObjectName("menuMotion_control")
MainWindow.setMenuBar(self.menubar)
self.statusBar = QtWidgets.QStatusBar(MainWindow)
self.statusBar.setObjectName("statusBar")
MainWindow.setStatusBar(self.statusBar)
self.action_load_script = QtWidgets.QAction(MainWindow)
self.action_load_script.setObjectName("action_load_script")
self.action_save_script = QtWidgets.QAction(MainWindow)
self.action_save_script.setEnabled(False)
self.action_save_script.setObjectName("action_save_script")
self.actionRemember_last_profile = QtWidgets.QAction(MainWindow)
self.actionRemember_last_profile.setObjectName("actionRemember_last_profile")
self.actionRemember_last_com_port = QtWidgets.QAction(MainWindow)
self.actionRemember_last_com_port.setObjectName("actionRemember_last_com_port")
self.action_compact_view = QtWidgets.QAction(MainWindow)
self.action_compact_view.setObjectName("action_compact_view")
self.action_full_view = QtWidgets.QAction(MainWindow)
self.action_full_view.setObjectName("action_full_view")
self.actionLoad_G_code = QtWidgets.QAction(MainWindow)
self.actionLoad_G_code.setEnabled(False)
self.actionLoad_G_code.setObjectName("actionLoad_G_code")
self.actionSave_G_code = QtWidgets.QAction(MainWindow)
self.actionSave_G_code.setObjectName("actionSave_G_code")
self.action_save_as_script = QtWidgets.QAction(MainWindow)
self.action_save_as_script.setEnabled(False)
self.action_save_as_script.setObjectName("action_save_as_script")
self.actionSave_G_code_as = QtWidgets.QAction(MainWindow)
self.actionSave_G_code_as.setEnabled(False)
self.actionSave_G_code_as.setObjectName("actionSave_G_code_as")
self.actionNew = QtWidgets.QAction(MainWindow)
self.actionNew.setObjectName("actionNew")
self.action_settings = QtWidgets.QAction(MainWindow)
self.action_settings.setObjectName("action_settings")
self.action_about = QtWidgets.QAction(MainWindow)
self.action_about.setObjectName("action_about")
self.action_manual_control = QtWidgets.QAction(MainWindow)
self.action_manual_control.setObjectName("action_manual_control")
self.actionShow_g_code = QtWidgets.QAction(MainWindow)
self.actionShow_g_code.setObjectName("actionShow_g_code")
self.actionHide_g_code = QtWidgets.QAction(MainWindow)
self.actionHide_g_code.setObjectName("actionHide_g_code")
self.action_edit_motion_script = QtWidgets.QAction(MainWindow)
self.action_edit_motion_script.setObjectName("action_edit_motion_script")
self.actionWebcam_control = QtWidgets.QAction(MainWindow)
self.actionWebcam_control.setEnabled(False)
self.actionWebcam_control.setObjectName("actionWebcam_control")
self.actionDSLR_control = QtWidgets.QAction(MainWindow)
self.actionDSLR_control.setEnabled(False)
self.actionDSLR_control.setObjectName("actionDSLR_control")
self.action_motion_behavior = QtWidgets.QAction(MainWindow)
self.action_motion_behavior.setEnabled(False)
self.action_motion_behavior.setObjectName("action_motion_behavior")
self.action_presets = QtWidgets.QAction(MainWindow)
self.action_presets.setEnabled(False)
self.action_presets.setObjectName("action_presets")
self.action_monitor = QtWidgets.QAction(MainWindow)
self.action_monitor.setObjectName("action_monitor")
self.menuFile.addAction(self.action_load_script)
self.menuFile.addSeparator()
self.menuFile.addAction(self.action_save_script)
self.menuFile.addAction(self.action_save_as_script)
self.menuAbout.addAction(self.action_about)
self.menuEdit.addAction(self.action_settings)
self.menuControl.addAction(self.action_manual_control)
self.menuControl.addAction(self.action_motion_behavior)
self.menuControl.addAction(self.action_presets)
self.menuControl.addAction(self.action_monitor)
self.menuControl.addSeparator()
self.menuControl.addAction(self.actionWebcam_control)
self.menuControl.addAction(self.actionDSLR_control)
self.menuMotion_control.addAction(self.action_edit_motion_script)
self.menubar.addAction(self.menuFile.menuAction())
self.menubar.addAction(self.menuMotion_control.menuAction())
self.menubar.addAction(self.menuEdit.menuAction())
self.menubar.addAction(self.menuControl.menuAction())
self.menubar.addAction(self.menuAbout.menuAction())
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "RSB1 360° photography"))
self.push_run.setToolTip(_translate("MainWindow", "Run loaded script"))
self.push_run.setText(_translate("MainWindow", "RUN"))
self.label_gcode_comment.setText(_translate("MainWindow", "---"))
self.progress_program.setFormat(_translate("MainWindow", "Script progress: %p%"))
self.push_emergency_stop.setText(_translate("MainWindow", "STOP"))
self.push_restart.setText(_translate("MainWindow", "RESTART"))
self.push_pause_resume.setText(_translate("MainWindow", "PAUSE\n"
"RESUME"))
self.combo_comports.setToolTip(_translate("MainWindow", "Communication port where controller is connected"))
self.combo_comports.setItemText(0, _translate("MainWindow", "COM1"))
self.combo_comports.setItemText(1, _translate("MainWindow", "COM2"))
self.combo_comports.setItemText(2, _translate("MainWindow", "COM320"))
self.button_com_refresh.setToolTip(_translate("MainWindow", "Refresh com port list"))
self.button_connect.setToolTip(_translate("MainWindow", "Connect to controller"))
self.button_connect.setText(_translate("MainWindow", "CONNECT"))
self.button_disconnect.setToolTip(_translate("MainWindow", "Disconnect from controller"))
self.button_disconnect.setText(_translate("MainWindow", "DISCONNECT"))
self.menuFile.setTitle(_translate("MainWindow", "&File"))
self.menuAbout.setTitle(_translate("MainWindow", "&Help"))
self.menuEdit.setTitle(_translate("MainWindow", "&Settings"))
self.menuControl.setTitle(_translate("MainWindow", "&Control"))
self.menuMotion_control.setTitle(_translate("MainWindow", "Motion"))
self.action_load_script.setText(_translate("MainWindow", "Open..."))
self.action_save_script.setText(_translate("MainWindow", "Save"))
self.actionRemember_last_profile.setText(_translate("MainWindow", "Remember last profile"))
self.actionRemember_last_com_port.setText(_translate("MainWindow", "Remember last com port"))
self.action_compact_view.setText(_translate("MainWindow", "Compact view"))
self.action_full_view.setText(_translate("MainWindow", "Full view"))
self.actionLoad_G_code.setText(_translate("MainWindow", "Load G-code..."))
self.actionSave_G_code.setText(_translate("MainWindow", "Save G-code..."))
self.action_save_as_script.setText(_translate("MainWindow", "Save as..."))
self.actionSave_G_code_as.setText(_translate("MainWindow", "Save G-code as..."))
self.actionNew.setText(_translate("MainWindow", "New..."))
self.action_settings.setText(_translate("MainWindow", "Settings..."))
self.action_about.setText(_translate("MainWindow", "About"))
self.action_manual_control.setText(_translate("MainWindow", "Manual motor control..."))
self.actionShow_g_code.setText(_translate("MainWindow", "Show g-code"))
self.actionHide_g_code.setText(_translate("MainWindow", "Hide g-code"))
self.action_edit_motion_script.setText(_translate("MainWindow", "Edit motion script"))
self.actionWebcam_control.setText(_translate("MainWindow", "Webcam control..."))
self.actionDSLR_control.setText(_translate("MainWindow", "DSLR control..."))
self.action_motion_behavior.setText(_translate("MainWindow", "Motion behavior..."))
self.action_presets.setText(_translate("MainWindow", "Presets..."))
self.action_monitor.setText(_translate("MainWindow", "Monitor..."))
import images_rc