-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain_ui.py
237 lines (207 loc) · 10.5 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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui/main_ui.ui'
# 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.
import PyQt5.QtCore as ptcore
import PyQt5.QtGui as ptgui
import PyQt5.QtWidgets as ptwidg
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(960, 620)
font = ptgui.QFont()
font.setFamily("Segoe UI")
MainWindow.setFont(font)
icon = ptgui.QIcon()
icon.addPixmap(ptgui.QPixmap(":/icons/ui/icons/32x32.png"), ptgui.QIcon.Normal, ptgui.QIcon.Off)
MainWindow.setWindowIcon(icon)
self.centralwidget = ptwidg.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.gridLayout = ptwidg.QGridLayout(self.centralwidget)
self.gridLayout.setObjectName("gridLayout")
self.codeBox = ptwidg.QComboBox(self.centralwidget)
font = ptgui.QFont()
font.setFamily("Segoe UI")
self.codeBox.setFont(font)
self.codeBox.setIconSize(ptcore.QSize(20, 20))
self.codeBox.setObjectName("codeBox")
self.codeBox.addItem("")
self.codeBox.addItem("")
self.codeBox.addItem("")
self.codeBox.addItem("")
self.codeBox.addItem("")
self.codeBox.addItem("")
self.codeBox.addItem("")
self.codeBox.addItem("")
self.gridLayout.addWidget(self.codeBox, 0, 0, 1, 1)
self.inputclearButton = ptwidg.QPushButton(self.centralwidget)
font = ptgui.QFont()
font.setFamily("MS Shell Dlg 2")
self.inputclearButton.setFont(font)
self.inputclearButton.setObjectName("inputclearButton")
self.gridLayout.addWidget(self.inputclearButton, 0, 2, 1, 1)
self.inputTextEdit = ptwidg.QTextEdit(self.centralwidget)
font = ptgui.QFont()
font.setFamily("Segoe UI")
font.setPointSize(11)
self.inputTextEdit.setFont(font)
self.inputTextEdit.setObjectName("inputTextEdit")
self.inputTextEdit.setAcceptRichText(False)
self.gridLayout.addWidget(self.inputTextEdit, 1, 0, 1, 3)
self.decodeButton = ptwidg.QPushButton(self.centralwidget)
font = ptgui.QFont()
font.setFamily("MS Shell Dlg 2")
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.decodeButton.setFont(font)
self.decodeButton.setIconSize(ptcore.QSize(20, 20))
self.decodeButton.setFlat(False)
self.decodeButton.setObjectName("decodeButton")
self.gridLayout.addWidget(self.decodeButton, 0, 1, 1, 1)
MainWindow.setCentralWidget(self.centralwidget)
self.toolBar = ptwidg.QToolBar(MainWindow)
font = ptgui.QFont()
font.setFamily("Segoe UI")
self.toolBar.setFont(font)
self.toolBar.setMovable(False)
self.toolBar.setIconSize(ptcore.QSize(30, 20))
self.toolBar.setToolButtonStyle(ptcore.Qt.ToolButtonTextUnderIcon)
self.toolBar.setFloatable(True)
self.toolBar.setContextMenuPolicy(ptcore.Qt.PreventContextMenu)
self.toolBar.setObjectName("toolBar")
MainWindow.addToolBar(ptcore.Qt.TopToolBarArea, self.toolBar)
self.menubar = ptwidg.QMenuBar(MainWindow)
self.menubar.setGeometry(ptcore.QRect(0, 0, 960, 26))
self.menubar.setContextMenuPolicy(ptcore.Qt.PreventContextMenu)
self.menubar.setObjectName("menubar")
self.menuFile = ptwidg.QMenu(self.menubar)
self.menuFile.setToolTipsVisible(False)
self.menuFile.setObjectName("menuFile")
self.menuEdit = ptwidg.QMenu(self.menubar)
self.menuEdit.setObjectName("menuEdit")
self.menuAbout = ptwidg.QMenu(self.menubar)
self.menuAbout.setObjectName("menuAbout")
MainWindow.setMenuBar(self.menubar)
self.action_Open = ptwidg.QAction(MainWindow)
icon2 = ptgui.QIcon()
icon2.addPixmap(ptgui.QPixmap(":/icons/ui/icons/folder.png"), ptgui.QIcon.Normal, ptgui.QIcon.Off)
self.action_Open.setIcon(icon2)
font = ptgui.QFont()
font.setFamily("Segoe UI")
self.action_Open.setFont(font)
self.action_Open.setObjectName("action_Open")
self.action_Quit = ptwidg.QAction(MainWindow)
icon4 = ptgui.QIcon()
icon4.addPixmap(ptgui.QPixmap(":/icons/ui/icons/cross-script.png"), ptgui.QIcon.Normal, ptgui.QIcon.Off)
self.action_Quit.setIcon(icon4)
font = ptgui.QFont()
font.setFamily("Segoe UI")
self.action_Quit.setFont(font)
self.action_Quit.setObjectName("action_Quit")
self.action_Cut = ptwidg.QAction(MainWindow)
icon8 = ptgui.QIcon()
icon8.addPixmap(ptgui.QPixmap(":/icons/ui/icons/scissors-blue.png"), ptgui.QIcon.Normal, ptgui.QIcon.Off)
self.action_Cut.setIcon(icon8)
font = ptgui.QFont()
font.setFamily("Segoe UI")
self.action_Cut.setFont(font)
self.action_Cut.setObjectName("action_Cut")
self.action_Copy = ptwidg.QAction(MainWindow)
icon9 = ptgui.QIcon()
icon9.addPixmap(ptgui.QPixmap(":/icons/ui/icons/document-copy.png"), ptgui.QIcon.Normal, ptgui.QIcon.Off)
self.action_Copy.setIcon(icon9)
font = ptgui.QFont()
font.setFamily("Segoe UI")
self.action_Copy.setFont(font)
self.action_Copy.setObjectName("action_Copy")
self.action_Paste = ptwidg.QAction(MainWindow)
icon10 = ptgui.QIcon()
icon10.addPixmap(ptgui.QPixmap(":/icons/ui/icons/clipboard-paste-document-text.png"), ptgui.QIcon.Normal, ptgui.QIcon.Off)
self.action_Paste.setIcon(icon10)
font = ptgui.QFont()
font.setFamily("Segoe UI")
self.action_Paste.setFont(font)
self.action_Paste.setObjectName("action_Paste")
self.action_Clear = ptwidg.QAction(MainWindow)
icon11 = ptgui.QIcon()
icon11.addPixmap(ptgui.QPixmap(":/icons/ui/icons/bin-metal.png"), ptgui.QIcon.Normal, ptgui.QIcon.Off)
self.action_Clear.setIcon(icon11)
font = ptgui.QFont()
font.setFamily("Segoe UI")
self.action_Clear.setFont(font)
self.action_Clear.setObjectName("action_Clear")
self.action_Information = ptwidg.QAction(MainWindow)
icon14 = ptgui.QIcon()
icon14.addPixmap(ptgui.QPixmap(":/icons/ui/icons/information.png"), ptgui.QIcon.Normal, ptgui.QIcon.Off)
self.action_Information.setIcon(icon14)
font = ptgui.QFont()
font.setFamily("Segoe UI")
self.action_Information.setFont(font)
self.action_Information.setObjectName("action_Information")
self.toolBar.addAction(self.action_Open)
self.toolBar.addAction(self.action_Cut)
self.toolBar.addAction(self.action_Copy)
self.toolBar.addAction(self.action_Paste)
self.toolBar.addAction(self.action_Information)
self.menuFile.addAction(self.action_Open)
self.menuFile.addAction(self.action_Quit)
self.menuEdit.addAction(self.action_Cut)
self.menuEdit.addAction(self.action_Copy)
self.menuEdit.addAction(self.action_Paste)
self.menuEdit.addAction(self.action_Clear)
self.menuEdit.addSeparator()
self.menuAbout.addAction(self.action_Information)
self.menubar.addAction(self.menuFile.menuAction())
self.menubar.addAction(self.menuEdit.menuAction())
self.menubar.addAction(self.menuAbout.menuAction())
self.retranslateUi(MainWindow)
ptcore.QMetaObject.connectSlotsByName(MainWindow)
MainWindow.setTabOrder(self.codeBox, self.inputTextEdit)
MainWindow.setTabOrder(self.inputTextEdit, self.decodeButton)
MainWindow.setTabOrder(self.decodeButton, self.inputclearButton)
def retranslateUi(self, MainWindow):
_translate = ptcore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
self.codeBox.setItemText(0, _translate("MainWindow", "TTAA"))
self.codeBox.setItemText(1, _translate("MainWindow", "TTBB"))
self.codeBox.setItemText(2, _translate("MainWindow", "TTCC"))
self.codeBox.setItemText(3, _translate("MainWindow", "TTDD"))
self.codeBox.setItemText(4, _translate("MainWindow", "PPAA"))
self.codeBox.setItemText(5, _translate("MainWindow", "PPBB"))
self.codeBox.setItemText(6, _translate("MainWindow", "PPCC"))
self.codeBox.setItemText(7, _translate("MainWindow", "PPDD"))
self.inputclearButton.setText(_translate("MainWindow", "CLEAR"))
self.decodeButton.setText(_translate("MainWindow", "DECODE"))
self.toolBar.setWindowTitle(_translate("MainWindow", "toolBar"))
self.menuFile.setTitle(_translate("MainWindow", "File"))
self.menuEdit.setTitle(_translate("MainWindow", "Edit"))
self.menuAbout.setTitle(_translate("MainWindow", "About"))
self.action_Open.setText(_translate("MainWindow", "&Open..."))
self.action_Open.setToolTip(_translate("MainWindow", "Open a text file."))
self.action_Open.setShortcut(_translate("MainWindow", "Ctrl+O"))
self.action_Quit.setText(_translate("MainWindow", "Quit..."))
self.action_Quit.setToolTip(_translate("MainWindow", "Quit application."))
self.action_Quit.setShortcut(_translate("MainWindow", "Ctrl+Q"))
self.action_Cut.setText(_translate("MainWindow", "Cut"))
self.action_Cut.setToolTip(_translate("MainWindow", "Cut selected text."))
self.action_Cut.setShortcut(_translate("MainWindow", "Ctrl+X"))
self.action_Copy.setText(_translate("MainWindow", "Copy"))
self.action_Copy.setToolTip(_translate("MainWindow", "Copy selected text."))
self.action_Copy.setShortcut(_translate("MainWindow", "Ctrl+C"))
self.action_Paste.setText(_translate("MainWindow", "Paste"))
self.action_Paste.setToolTip(_translate("MainWindow", "Paste clipboard."))
self.action_Paste.setShortcut(_translate("MainWindow", "Ctrl+V"))
self.action_Clear.setText(_translate("MainWindow", "Clear"))
self.action_Clear.setToolTip(_translate("MainWindow", "Clear field."))
self.action_Information.setText(_translate("MainWindow", "Information"))
self.action_Information.setToolTip(_translate("MainWindow", "About Sonde."))
import resource
if __name__ == "__main__":
import sys
app = ptwidg.QApplication(sys.argv)
MainWindow = ptwidg.QMainWindow()
ui = Ui_MainWindow()
ui.setupUi(MainWindow)
MainWindow.show()
sys.exit(app.exec_())