forked from hastagAB/Awesome-Python-Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.py
383 lines (378 loc) · 19.7 KB
/
MainWindow.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
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'mainwindow.ui'
# Created by: PyQt5 UI code generator 5.10.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(360, 390)
MainWindow.setMinimumSize(QtCore.QSize(360, 390))
MainWindow.setMaximumSize(QtCore.QSize(360, 390))
self.label = QtWidgets.QLabel(MainWindow)
self.label.setGeometry(QtCore.QRect(160, 10, 41, 71))
font = QtGui.QFont()
font.setPointSize(16)
self.label.setFont(font)
self.label.setAlignment(QtCore.Qt.AlignCenter)
self.label.setObjectName("label")
self.pushButton_n1 = QtWidgets.QPushButton(MainWindow)
self.pushButton_n1.setEnabled(True)
self.pushButton_n1.setGeometry(QtCore.QRect(70, 90, 60, 50))
self.pushButton_n1.setMinimumSize(QtCore.QSize(60, 50))
self.pushButton_n1.setMaximumSize(QtCore.QSize(60, 50))
font = QtGui.QFont()
font.setPointSize(15)
self.pushButton_n1.setFont(font)
self.pushButton_n1.setIconSize(QtCore.QSize(20, 20))
self.pushButton_n1.setFlat(False)
self.pushButton_n1.setObjectName("pushButton_n1")
self.pushButton_convert = QtWidgets.QPushButton(MainWindow)
self.pushButton_convert.setEnabled(True)
self.pushButton_convert.setGeometry(QtCore.QRect(70, 330, 220, 50))
self.pushButton_convert.setMinimumSize(QtCore.QSize(220, 50))
self.pushButton_convert.setMaximumSize(QtCore.QSize(220, 50))
font = QtGui.QFont()
font.setPointSize(13)
font.setItalic(True)
self.pushButton_convert.setFont(font)
self.pushButton_convert.setStyleSheet("background-color: rgb(138, 226, 52);")
self.pushButton_convert.setObjectName("pushButton_convert")
self.pushButton_del = QtWidgets.QPushButton(MainWindow)
self.pushButton_del.setGeometry(QtCore.QRect(230, 270, 60, 50))
self.pushButton_del.setMinimumSize(QtCore.QSize(60, 50))
self.pushButton_del.setMaximumSize(QtCore.QSize(60, 50))
font = QtGui.QFont()
font.setPointSize(13)
self.pushButton_del.setFont(font)
self.pushButton_del.setStyleSheet("background-color: rgb(239, 41, 41);")
self.pushButton_del.setObjectName("pushButton_del")
self.pushButton_n3 = QtWidgets.QPushButton(MainWindow)
self.pushButton_n3.setEnabled(True)
self.pushButton_n3.setGeometry(QtCore.QRect(230, 90, 60, 50))
self.pushButton_n3.setMinimumSize(QtCore.QSize(60, 50))
self.pushButton_n3.setMaximumSize(QtCore.QSize(60, 50))
font = QtGui.QFont()
font.setPointSize(15)
self.pushButton_n3.setFont(font)
self.pushButton_n3.setIconSize(QtCore.QSize(20, 20))
self.pushButton_n3.setFlat(False)
self.pushButton_n3.setObjectName("pushButton_n3")
self.pushButton_n2 = QtWidgets.QPushButton(MainWindow)
self.pushButton_n2.setEnabled(True)
self.pushButton_n2.setGeometry(QtCore.QRect(150, 90, 60, 50))
self.pushButton_n2.setMinimumSize(QtCore.QSize(60, 50))
self.pushButton_n2.setMaximumSize(QtCore.QSize(60, 50))
font = QtGui.QFont()
font.setPointSize(15)
self.pushButton_n2.setFont(font)
self.pushButton_n2.setIconSize(QtCore.QSize(20, 20))
self.pushButton_n2.setFlat(False)
self.pushButton_n2.setObjectName("pushButton_n2")
self.pushButton_n9 = QtWidgets.QPushButton(MainWindow)
self.pushButton_n9.setEnabled(True)
self.pushButton_n9.setGeometry(QtCore.QRect(230, 210, 60, 50))
self.pushButton_n9.setMinimumSize(QtCore.QSize(60, 50))
self.pushButton_n9.setMaximumSize(QtCore.QSize(60, 50))
font = QtGui.QFont()
font.setPointSize(15)
self.pushButton_n9.setFont(font)
self.pushButton_n9.setIconSize(QtCore.QSize(20, 20))
self.pushButton_n9.setFlat(False)
self.pushButton_n9.setObjectName("pushButton_n9")
self.pushButton_n8 = QtWidgets.QPushButton(MainWindow)
self.pushButton_n8.setEnabled(True)
self.pushButton_n8.setGeometry(QtCore.QRect(150, 210, 60, 50))
self.pushButton_n8.setMinimumSize(QtCore.QSize(60, 50))
self.pushButton_n8.setMaximumSize(QtCore.QSize(60, 50))
font = QtGui.QFont()
font.setPointSize(15)
self.pushButton_n8.setFont(font)
self.pushButton_n8.setIconSize(QtCore.QSize(20, 20))
self.pushButton_n8.setFlat(False)
self.pushButton_n8.setObjectName("pushButton_n8")
self.pushButton_n7 = QtWidgets.QPushButton(MainWindow)
self.pushButton_n7.setEnabled(True)
self.pushButton_n7.setGeometry(QtCore.QRect(70, 210, 60, 50))
self.pushButton_n7.setMinimumSize(QtCore.QSize(60, 50))
self.pushButton_n7.setMaximumSize(QtCore.QSize(60, 50))
font = QtGui.QFont()
font.setPointSize(15)
self.pushButton_n7.setFont(font)
self.pushButton_n7.setIconSize(QtCore.QSize(20, 20))
self.pushButton_n7.setFlat(False)
self.pushButton_n7.setObjectName("pushButton_n7")
self.pushButton_n6 = QtWidgets.QPushButton(MainWindow)
self.pushButton_n6.setEnabled(True)
self.pushButton_n6.setGeometry(QtCore.QRect(230, 150, 60, 50))
self.pushButton_n6.setMinimumSize(QtCore.QSize(60, 50))
self.pushButton_n6.setMaximumSize(QtCore.QSize(60, 50))
font = QtGui.QFont()
font.setPointSize(15)
self.pushButton_n6.setFont(font)
self.pushButton_n6.setIconSize(QtCore.QSize(20, 20))
self.pushButton_n6.setFlat(False)
self.pushButton_n6.setObjectName("pushButton_n6")
self.pushButton_n5 = QtWidgets.QPushButton(MainWindow)
self.pushButton_n5.setEnabled(True)
self.pushButton_n5.setGeometry(QtCore.QRect(150, 150, 60, 50))
self.pushButton_n5.setMinimumSize(QtCore.QSize(60, 50))
self.pushButton_n5.setMaximumSize(QtCore.QSize(60, 50))
font = QtGui.QFont()
font.setPointSize(15)
self.pushButton_n5.setFont(font)
self.pushButton_n5.setIconSize(QtCore.QSize(20, 20))
self.pushButton_n5.setFlat(False)
self.pushButton_n5.setObjectName("pushButton_n5")
self.pushButton_n4 = QtWidgets.QPushButton(MainWindow)
self.pushButton_n4.setEnabled(True)
self.pushButton_n4.setGeometry(QtCore.QRect(70, 150, 60, 50))
self.pushButton_n4.setMinimumSize(QtCore.QSize(60, 50))
self.pushButton_n4.setMaximumSize(QtCore.QSize(60, 50))
font = QtGui.QFont()
font.setPointSize(15)
self.pushButton_n4.setFont(font)
self.pushButton_n4.setIconSize(QtCore.QSize(20, 20))
self.pushButton_n4.setFlat(False)
self.pushButton_n4.setObjectName("pushButton_n4")
self.pushButton_n0 = QtWidgets.QPushButton(MainWindow)
self.pushButton_n0.setEnabled(True)
self.pushButton_n0.setGeometry(QtCore.QRect(150, 270, 60, 50))
self.pushButton_n0.setMinimumSize(QtCore.QSize(60, 50))
self.pushButton_n0.setMaximumSize(QtCore.QSize(60, 50))
font = QtGui.QFont()
font.setPointSize(15)
self.pushButton_n0.setFont(font)
self.pushButton_n0.setIconSize(QtCore.QSize(20, 20))
self.pushButton_n0.setFlat(False)
self.pushButton_n0.setObjectName("pushButton_n0")
self.label_1 = QtWidgets.QLabel(MainWindow)
self.label_1.setGeometry(QtCore.QRect(10, 50, 140, 30))
self.label_1.setMinimumSize(QtCore.QSize(140, 30))
self.label_1.setMaximumSize(QtCore.QSize(140, 30))
self.label_1.setStyleSheet("background-color: rgb(245, 121, 0, 65);")
self.label_1.setInputMethodHints(QtCore.Qt.ImhNone)
self.label_1.setIndent(-1)
self.label_1.setMargin(5)
self.label_1.setObjectName("label_1")
self.label_2 = QtWidgets.QLabel(MainWindow)
self.label_2.setGeometry(QtCore.QRect(210, 50, 140, 30))
self.label_2.setMinimumSize(QtCore.QSize(140, 30))
self.label_2.setMaximumSize(QtCore.QSize(140, 30))
self.label_2.setStyleSheet("background-color: rgb(52, 101, 164, 65);")
self.label_2.setText("")
self.label_2.setIndent(-1)
self.label_2.setMargin(5)
self.label_2.setObjectName("label_2")
self.pushButton_n10 = QtWidgets.QPushButton(MainWindow)
self.pushButton_n10.setEnabled(True)
self.pushButton_n10.setGeometry(QtCore.QRect(70, 270, 60, 50))
self.pushButton_n10.setMinimumSize(QtCore.QSize(60, 50))
self.pushButton_n10.setMaximumSize(QtCore.QSize(60, 50))
font = QtGui.QFont()
font.setPointSize(15)
self.pushButton_n10.setFont(font)
self.pushButton_n10.setIconSize(QtCore.QSize(20, 20))
self.pushButton_n10.setFlat(False)
self.pushButton_n10.setObjectName("pushButton_n10")
self.comboBox_2 = QtWidgets.QComboBox(MainWindow)
self.comboBox_2.setEnabled(True)
self.comboBox_2.setGeometry(QtCore.QRect(210, 10, 140, 30))
self.comboBox_2.setMinimumSize(QtCore.QSize(140, 30))
self.comboBox_2.setMaximumSize(QtCore.QSize(140, 30))
self.comboBox_2.setMaxVisibleItems(6)
self.comboBox_2.setObjectName("comboBox_2")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox = QtWidgets.QComboBox(MainWindow)
self.comboBox.setEnabled(True)
self.comboBox.setGeometry(QtCore.QRect(10, 10, 140, 30))
self.comboBox.setMinimumSize(QtCore.QSize(140, 30))
self.comboBox.setMaximumSize(QtCore.QSize(140, 30))
self.comboBox.setMaxVisibleItems(6)
self.comboBox.setObjectName("comboBox")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.retranslateUi(MainWindow)
self.comboBox.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "Cryptocurrency Converter"))
self.label.setText(_translate("MainWindow", "<html><head/><body><p><span >To</span></p></body></html>"))
self.pushButton_n1.setText(_translate("MainWindow", "1"))
self.pushButton_convert.setText(_translate("MainWindow", "Convert"))
self.pushButton_del.setText(_translate("MainWindow", "del"))
self.pushButton_n3.setText(_translate("MainWindow", "3"))
self.pushButton_n2.setText(_translate("MainWindow", "2"))
self.pushButton_n9.setText(_translate("MainWindow", "9"))
self.pushButton_n8.setText(_translate("MainWindow", "8"))
self.pushButton_n7.setText(_translate("MainWindow", "7"))
self.pushButton_n6.setText(_translate("MainWindow", "6"))
self.pushButton_n5.setText(_translate("MainWindow", "5"))
self.pushButton_n4.setText(_translate("MainWindow", "4"))
self.pushButton_n0.setText(_translate("MainWindow", "0"))
self.label_1.setToolTip(_translate("MainWindow", "Enter a value to convert it."))
self.label_1.setText(_translate("MainWindow", "0"))
self.label_2.setToolTip(_translate("MainWindow", "Converted value"))
self.label_2.setText(_translate("MainWindow", "0"))
self.pushButton_n10.setText(_translate("MainWindow", "."))
self.comboBox_2.setItemText(0, _translate("MainWindow", "USD"))
self.comboBox_2.setItemText(1, _translate("MainWindow", "EUR"))
self.comboBox_2.setItemText(2, _translate("MainWindow", "------"))
self.comboBox_2.setItemText(3, _translate("MainWindow", "BTC"))
self.comboBox_2.setItemText(4, _translate("MainWindow", "ETH"))
self.comboBox_2.setItemText(5, _translate("MainWindow", "XRP"))
self.comboBox_2.setItemText(6, _translate("MainWindow", "BCH"))
self.comboBox_2.setItemText(7, _translate("MainWindow", "EOS"))
self.comboBox_2.setItemText(8, _translate("MainWindow", "XLM"))
self.comboBox_2.setItemText(9, _translate("MainWindow", "LTC"))
self.comboBox_2.setItemText(10, _translate("MainWindow", "USDT"))
self.comboBox_2.setItemText(11, _translate("MainWindow", "ADA"))
self.comboBox_2.setItemText(12, _translate("MainWindow", "XMR"))
self.comboBox_2.setItemText(13, _translate("MainWindow", "DASH"))
self.comboBox_2.setItemText(14, _translate("MainWindow", "MIOTA"))
self.comboBox_2.setItemText(15, _translate("MainWindow", "TRX"))
self.comboBox_2.setItemText(16, _translate("MainWindow", "ETC"))
self.comboBox_2.setItemText(17, _translate("MainWindow", "NEO"))
self.comboBox_2.setItemText(18, _translate("MainWindow", "XTZ"))
self.comboBox_2.setItemText(19, _translate("MainWindow", "BNB"))
self.comboBox_2.setItemText(20, _translate("MainWindow", "XEM"))
self.comboBox_2.setItemText(21, _translate("MainWindow", "VET"))
self.comboBox_2.setItemText(22, _translate("MainWindow", "DOGE"))
self.comboBox_2.setItemText(23, _translate("MainWindow", "ZEC"))
self.comboBox_2.setItemText(24, _translate("MainWindow", "OMG"))
self.comboBox_2.setItemText(25, _translate("MainWindow", "LSK"))
self.comboBox_2.setItemText(26, _translate("MainWindow", "BTG"))
self.comboBox_2.setItemText(27, _translate("MainWindow", "BCN"))
self.comboBox_2.setItemText(28, _translate("MainWindow", "ONT"))
self.comboBox_2.setItemText(29, _translate("MainWindow", "NANO"))
self.comboBox_2.setItemText(30, _translate("MainWindow", "BTC"))
self.comboBox_2.setItemText(31, _translate("MainWindow", "DCR"))
self.comboBox_2.setItemText(32, _translate("MainWindow", "QTUM"))
self.comboBox_2.setItemText(33, _translate("MainWindow", "MKR"))
self.comboBox_2.setItemText(34, _translate("MainWindow", "ZRX"))
self.comboBox_2.setItemText(35, _translate("MainWindow", "DGB"))
self.comboBox_2.setItemText(36, _translate("MainWindow", "BCD"))
self.comboBox_2.setItemText(37, _translate("MainWindow", "ZIL"))
self.comboBox_2.setItemText(38, _translate("MainWindow", "ICX"))
self.comboBox_2.setItemText(39, _translate("MainWindow", "STEEM"))
self.comboBox.setCurrentText(_translate("MainWindow", "BTC"))
self.comboBox.setItemText(0, _translate("MainWindow", "BTC"))
self.comboBox.setItemText(1, _translate("MainWindow", "------"))
self.comboBox.setItemText(2, _translate("MainWindow", "USD"))
self.comboBox.setItemText(3, _translate("MainWindow", "EUR"))
self.comboBox.setItemText(4, _translate("MainWindow", "------"))
self.comboBox.setItemText(5, _translate("MainWindow", "ETH"))
self.comboBox.setItemText(6, _translate("MainWindow", "XRP"))
self.comboBox.setItemText(7, _translate("MainWindow", "BCH"))
self.comboBox.setItemText(8, _translate("MainWindow", "EOS"))
self.comboBox.setItemText(9, _translate("MainWindow", "XLM"))
self.comboBox.setItemText(10, _translate("MainWindow", "LTC"))
self.comboBox.setItemText(11, _translate("MainWindow", "USDT"))
self.comboBox.setItemText(12, _translate("MainWindow", "ADA"))
self.comboBox.setItemText(13, _translate("MainWindow", "XMR"))
self.comboBox.setItemText(14, _translate("MainWindow", "DASH"))
self.comboBox.setItemText(15, _translate("MainWindow", "MIOTA"))
self.comboBox.setItemText(16, _translate("MainWindow", "TRX"))
self.comboBox.setItemText(17, _translate("MainWindow", "ETC"))
self.comboBox.setItemText(18, _translate("MainWindow", "NEO"))
self.comboBox.setItemText(19, _translate("MainWindow", "XTZ"))
self.comboBox.setItemText(20, _translate("MainWindow", "BNB"))
self.comboBox.setItemText(21, _translate("MainWindow", "XEM"))
self.comboBox.setItemText(22, _translate("MainWindow", "VET"))
self.comboBox.setItemText(23, _translate("MainWindow", "DOGE"))
self.comboBox.setItemText(24, _translate("MainWindow", "ZEC"))
self.comboBox.setItemText(25, _translate("MainWindow", "OMG"))
self.comboBox.setItemText(26, _translate("MainWindow", "LSK"))
self.comboBox.setItemText(27, _translate("MainWindow", "BTG"))
self.comboBox.setItemText(28, _translate("MainWindow", "BCN"))
self.comboBox.setItemText(29, _translate("MainWindow", "ONT"))
self.comboBox.setItemText(30, _translate("MainWindow", "NANO"))
self.comboBox.setItemText(31, _translate("MainWindow", "BTC"))
self.comboBox.setItemText(32, _translate("MainWindow", "DCR"))
self.comboBox.setItemText(33, _translate("MainWindow", "QTUM"))
self.comboBox.setItemText(34, _translate("MainWindow", "MKR"))
self.comboBox.setItemText(35, _translate("MainWindow", "ZRX"))
self.comboBox.setItemText(36, _translate("MainWindow", "DGB"))
self.comboBox.setItemText(37, _translate("MainWindow", "BCD"))
self.comboBox.setItemText(38, _translate("MainWindow", "ZIL"))
self.comboBox.setItemText(39, _translate("MainWindow", "ICX"))
self.comboBox.setItemText(40, _translate("MainWindow", "STEEM"))