-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui_main.py
352 lines (345 loc) · 16.9 KB
/
ui_main.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
from PySide2.QtCore import *
from PySide2.QtGui import *
from PySide2.QtWidgets import *
class Ui_Home(object):
def setupUi(self, Home):
if not Home.objectName():
Home.setObjectName(u"Home")
Home.resize(934, 643)
icon1 = QIcon()
icon1.addFile(u"../../../../../../Downloads/untitled.png", QSize(), QIcon.Normal, QIcon.Off)
Home.setWindowIcon(icon1)
Home.setIconSize(QSize(64, 64))
self.centralwidget = QWidget(Home)
self.centralwidget.setObjectName(u"centralwidget")
sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.centralwidget.sizePolicy().hasHeightForWidth())
self.centralwidget.setSizePolicy(sizePolicy)
self.drop = QFrame(self.centralwidget)
self.drop.setObjectName(u"drop")
self.drop.setGeometry(QRect(10, 10, 891, 620))
font = QFont()
font.setFamily(u"Bahnschrift")
self.drop.setFont(font)
self.drop.setStyleSheet(u"background-color: qlineargradient(spread:pad, x1:1, y1:0.102, x2:1, y2:1, stop:0 rgba(255, 255, 25, 255), stop:1 rgba(255, 191, 0, 255));\n"
"border-radius:10px;")
self.drop.setFrameShape(QFrame.NoFrame)
self.drop.setFrameShadow(QFrame.Raised)
self.exit = QPushButton(self.drop)
self.exit.setObjectName(u"exit")
self.exit.setGeometry(QRect(860, 10, 20, 20))
font1 = QFont()
font1.setFamily(u"MS Sans Serif")
self.exit.setFont(font1)
self.exit.setStyleSheet(u"QPushButton {\n"
" border:none;\n"
" border-radius:10px;\n"
" \n"
" background-color: rgb(255, 0, 0);\n"
"}\n"
"\n"
"QPushButton:hover {\n"
" background-color: rgb(190, 0, 0);\n"
"}")
self.title = QLabel(self.drop)
self.title.setObjectName(u"title")
self.title.setGeometry(QRect(40, 10, 131, 21))
font2 = QFont()
font2.setFamily(u"Bahnschrift Light")
font2.setPointSize(10)
self.title.setFont(font2)
self.title.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 255,255);")
self.minmax = QPushButton(self.drop)
self.minmax.setObjectName(u"minmax")
self.minmax.setGeometry(QRect(830, 10, 20, 20))
self.minmax.setFont(font1)
self.minmax.setStyleSheet(u"QPushButton {\n"
" border:none;\n"
" border-radius:10px;\n"
" \n"
" background-color: rgb(255, 255, 255);\n"
"}\n"
"\n"
"QPushButton:hover {\n"
" \n"
" background-color: rgb(206, 206, 206);\n"
"}")
self.Page = QFrame(self.drop)
self.Page.setObjectName(u"Page")
self.Page.setGeometry(QRect(40, 50, 811, 541))
self.Page.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"border-radius:0px;")
self.Page.setFrameShape(QFrame.StyledPanel)
self.Page.setFrameShadow(QFrame.Raised)
self.Deg = QFrame(self.Page)
self.Deg.setObjectName(u"Deg")
self.Deg.setGeometry(QRect(140, 0, 551, 221))
self.Deg.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);")
self.Deg.setFrameShape(QFrame.StyledPanel)
self.Deg.setFrameShadow(QFrame.Raised)
self.temp = QLabel(self.Deg)
self.temp.setObjectName(u"temp")
self.temp.setGeometry(QRect(190, 10, 181, 203))
font3 = QFont()
font3.setFamily(u"Segoe UI")
font3.setPointSize(115)
self.temp.setFont(font3)
self.temp.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 255, 255);")
self.temp.setAlignment(Qt.AlignCenter)
self.image = QLabel(self.Deg)
self.image.setObjectName(u"image")
self.image.setGeometry(QRect(40, 60, 120, 120))
self.image.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);")
self.image.setPixmap(QPixmap(u"../../../../../Downloads/afternoon.png"))
self.image.setScaledContents(True)
self.degree = QLabel(self.Deg)
self.degree.setObjectName(u"degree")
self.degree.setGeometry(QRect(340, 30, 29, 40))
font4 = QFont()
font4.setFamily(u"Bahnschrift")
font4.setPointSize(25)
font4.setBold(True)
font4.setWeight(75)
self.degree.setFont(font4)
self.degree.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 147, 14);")
self.frame_4 = QFrame(self.Deg)
self.frame_4.setObjectName(u"frame_4")
self.frame_4.setGeometry(QRect(370, 9, 131, 203))
self.frame_4.setFrameShape(QFrame.StyledPanel)
self.frame_4.setFrameShadow(QFrame.Raised)
self.condition = QLabel(self.frame_4)
self.condition.setObjectName(u"condition")
self.condition.setGeometry(QRect(9, 105, 121, 39))
font5 = QFont()
font5.setFamily(u"Corbel")
font5.setPointSize(24)
self.condition.setFont(font5)
self.condition.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 147, 14);")
self.city = QLabel(self.frame_4)
self.city.setObjectName(u"city")
self.city.setGeometry(QRect(10, 60, 121, 39))
self.city.setFont(font5)
self.city.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 255, 255);")
self.frame_2 = QFrame(self.Page)
self.frame_2.setObjectName(u"frame_2")
self.frame_2.setGeometry(QRect(0, 310, 381, 231))
self.frame_2.setStyleSheet(u"background-color: rgba(255, 255, 255, 100);\n"
"border-radius:10px;")
self.frame_2.setFrameShape(QFrame.StyledPanel)
self.frame_2.setFrameShadow(QFrame.Raised)
self.la1 = QLabel(self.frame_2)
self.la1.setObjectName(u"la1")
self.la1.setGeometry(QRect(20, 30, 171, 21))
font6 = QFont()
font6.setPointSize(12)
self.la1.setFont(font6)
self.la1.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 176, 66);")
self.la2 = QLabel(self.frame_2)
self.la2.setObjectName(u"la2")
self.la2.setGeometry(QRect(20, 70, 171, 21))
self.la2.setFont(font6)
self.la2.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 255,255);")
self.la3 = QLabel(self.frame_2)
self.la3.setObjectName(u"la3")
self.la3.setGeometry(QRect(20, 110, 171, 16))
self.la3.setFont(font6)
self.la3.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 255,255);")
self.la4 = QLabel(self.frame_2)
self.la4.setObjectName(u"la4")
self.la4.setGeometry(QRect(20, 150, 171, 21))
self.la4.setFont(font6)
self.la4.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 255,255);")
self.la5 = QLabel(self.frame_2)
self.la5.setObjectName(u"la5")
self.la5.setGeometry(QRect(20, 190, 171, 21))
self.la5.setFont(font6)
self.la5.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 255,255);")
self.maxtemp = QLabel(self.frame_2)
self.maxtemp.setObjectName(u"maxtemp")
self.maxtemp.setGeometry(QRect(300, 30, 61, 21))
self.maxtemp.setFont(font6)
self.maxtemp.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 255,255);")
self.maxtemp.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
self.mintemp = QLabel(self.frame_2)
self.mintemp.setObjectName(u"mintemp")
self.mintemp.setGeometry(QRect(300, 70, 61, 21))
self.mintemp.setFont(font6)
self.mintemp.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 255,255);")
self.mintemp.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
self.pressure = QLabel(self.frame_2)
self.pressure.setObjectName(u"pressure")
self.pressure.setGeometry(QRect(280, 110, 81, 31))
self.pressure.setFont(font6)
self.pressure.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 255,255);")
self.pressure.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
self.humid = QLabel(self.frame_2)
self.humid.setObjectName(u"humid")
self.humid.setGeometry(QRect(290, 150, 71, 21))
self.humid.setFont(font6)
self.humid.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 255,255);")
self.humid.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
self.visibility = QLabel(self.frame_2)
self.visibility.setObjectName(u"visibility")
self.visibility.setGeometry(QRect(270, 190, 91, 21))
self.visibility.setFont(font6)
self.visibility.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 255,255);")
self.visibility.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
self.frame_3 = QFrame(self.Page)
self.frame_3.setObjectName(u"frame_3")
self.frame_3.setGeometry(QRect(430, 310, 381, 231))
self.frame_3.setStyleSheet(u"background-color: rgba(255, 255, 255, 100);\n"
"border-radius:10px;")
self.frame_3.setFrameShape(QFrame.StyledPanel)
self.frame_3.setFrameShadow(QFrame.Raised)
self.la1_2 = QLabel(self.frame_3)
self.la1_2.setObjectName(u"la1_2")
self.la1_2.setGeometry(QRect(20, 30, 171, 16))
self.la1_2.setFont(font6)
self.la1_2.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 255,255);")
self.la1_3 = QLabel(self.frame_3)
self.la1_3.setObjectName(u"la1_3")
self.la1_3.setGeometry(QRect(20, 70, 171, 16))
self.la1_3.setFont(font6)
self.la1_3.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 255,255);\n"
"")
self.la1_4 = QLabel(self.frame_3)
self.la1_4.setObjectName(u"la1_4")
self.la1_4.setGeometry(QRect(20, 110, 171, 21))
self.la1_4.setFont(font6)
self.la1_4.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 255,255);")
self.la1_5 = QLabel(self.frame_3)
self.la1_5.setObjectName(u"la1_5")
self.la1_5.setGeometry(QRect(20, 150, 171, 16))
self.la1_5.setFont(font6)
self.la1_5.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 255,255);")
self.la1_6 = QLabel(self.frame_3)
self.la1_6.setObjectName(u"la1_6")
self.la1_6.setGeometry(QRect(20, 190, 171, 21))
self.la1_6.setFont(font6)
self.la1_6.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 255,255);")
self.timezone = QLabel(self.frame_3)
self.timezone.setObjectName(u"timezone")
self.timezone.setGeometry(QRect(170, 20, 191, 31))
self.timezone.setFont(font6)
self.timezone.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 255,255);")
self.timezone.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
self.latitude = QLabel(self.frame_3)
self.latitude.setObjectName(u"latitude")
self.latitude.setGeometry(QRect(210, 70, 151, 16))
self.latitude.setFont(font6)
self.latitude.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 255,255);")
self.latitude.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
self.longitude = QLabel(self.frame_3)
self.longitude.setObjectName(u"longitude")
self.longitude.setGeometry(QRect(230, 110, 131, 16))
self.longitude.setFont(font6)
self.longitude.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 255,255);")
self.longitude.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
self.location = QLabel(self.frame_3)
self.location.setObjectName(u"location")
self.location.setGeometry(QRect(260, 140, 101, 31))
self.location.setFont(font6)
self.location.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 255,255);")
self.location.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
self.date = QLabel(self.frame_3)
self.date.setObjectName(u"date")
self.date.setGeometry(QRect(130, 190, 231, 16))
self.date.setFont(font6)
self.date.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 255,255);")
self.date.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
self.good = QLabel(self.Page)
self.good.setObjectName(u"good")
self.good.setGeometry(QRect(340, 220, 71, 41))
font7 = QFont()
font7.setFamily(u"Bahnschrift Light")
font7.setPointSize(16)
self.good.setFont(font7)
self.good.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 255, 255);")
self.wish = QLabel(self.Page)
self.wish.setObjectName(u"wish")
self.wish.setGeometry(QRect(410, 220, 131, 41))
font8 = QFont()
font8.setFamily(u"Bahnschrift SemiBold")
font8.setPointSize(20)
font8.setBold(True)
font8.setWeight(75)
self.wish.setFont(font8)
self.wish.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 255, 255);")
self.icon = QLabel(self.drop)
self.icon.setObjectName(u"icon")
self.icon.setGeometry(QRect(10, 10, 21, 21))
self.icon.setStyleSheet(u"background-color: rgba(255, 255, 255, 0);")
self.icon.setPixmap(QPixmap(u"../assets/icons/ic.ico"))
self.icon.setScaledContents(True)
self.Page.raise_()
self.exit.raise_()
self.title.raise_()
self.minmax.raise_()
self.icon.raise_()
Home.setCentralWidget(self.centralwidget)
self.retranslateUi(Home)
QMetaObject.connectSlotsByName(Home)
# setupUi
def retranslateUi(self, Home):
Home.setWindowTitle(QCoreApplication.translate("Home", u"AirDex", None))
self.exit.setText("")
self.title.setText(QCoreApplication.translate("Home", u"AirDex Home - 1.1.b02", None))
self.minmax.setText("")
self.temp.setText(QCoreApplication.translate("Home", u"<html><head/><body><p align=\"center\"><span style=\" color:#ffffff;\">24</span></p></body></html>", None))
self.image.setText("")
self.degree.setText(QCoreApplication.translate("Home", u"\u00b0C", None))
self.condition.setText(QCoreApplication.translate("Home", u"HAZE", None))
self.city.setText(QCoreApplication.translate("Home", u"DEL", None))
self.la1.setText(QCoreApplication.translate("Home", u"<html><head/><body><p><span style=\" color:#ffffff;\">Maximum Temeprature</span></p></body></html>", None))
self.la2.setText(QCoreApplication.translate("Home", u"Minimum Temeprature", None))
self.la3.setText(QCoreApplication.translate("Home", u"Pressure", None))
self.la4.setText(QCoreApplication.translate("Home", u"Humidity", None))
self.la5.setText(QCoreApplication.translate("Home", u"Visibility", None))
self.maxtemp.setText(QCoreApplication.translate("Home", u"-", None))
self.mintemp.setText(QCoreApplication.translate("Home", u"-", None))
self.pressure.setText(QCoreApplication.translate("Home", u"-", None))
self.humid.setText(QCoreApplication.translate("Home", u"-", None))
self.visibility.setText(QCoreApplication.translate("Home", u"-", None))
self.la1_2.setText(QCoreApplication.translate("Home", u"Time Zone", None))
self.la1_3.setText(QCoreApplication.translate("Home", u"Latitude", None))
self.la1_4.setText(QCoreApplication.translate("Home", u"Longitute", None))
self.la1_5.setText(QCoreApplication.translate("Home", u"Location", None))
self.la1_6.setText(QCoreApplication.translate("Home", u"Date", None))
self.timezone.setText(QCoreApplication.translate("Home", u"-", None))
self.latitude.setText(QCoreApplication.translate("Home", u"-", None))
self.longitude.setText(QCoreApplication.translate("Home", u"-", None))
self.location.setText(QCoreApplication.translate("Home", u"-", None))
self.date.setText(QCoreApplication.translate("Home", u"-", None))
self.good.setText(QCoreApplication.translate("Home", u"<html><head/><body><p><span style=\" font-size:20pt;\">Good</span></p></body></html>", None))
self.wish.setText(QCoreApplication.translate("Home", u"<html><head/><body><p><span style=\" font-size:20pt; color:#ffffff;\">Evening!</span></p></body></html>", None))
self.icon.setText("")
# retranslateUi