-
Notifications
You must be signed in to change notification settings - Fork 0
/
interface.py
153 lines (146 loc) · 8.76 KB
/
interface.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
# © Designed and Developed by Mehmet Güdük.
# © Licensed with GPL-3.0 License, Author is Mehmet Güdük.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(400, 270)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Ignored)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
MainWindow.setSizePolicy(sizePolicy)
MainWindow.setMinimumSize(QtCore.QSize(400, 270))
MainWindow.setMaximumSize(QtCore.QSize(400, 270))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/newPrefix/images/spotifyadblockericon.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
MainWindow.setWindowIcon(icon)
MainWindow.setStyleSheet("#MainWindow {\n"
" background-color: rgb(249, 249, 249);\n"
" }\n"
"\n"
"\n"
"\n"
"")
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.groupbox_settings = QtWidgets.QGroupBox(self.centralwidget)
self.groupbox_settings.setGeometry(QtCore.QRect(10, 200, 381, 41))
self.groupbox_settings.setStyleSheet(" background-color: rgb(235, 235, 235);")
self.groupbox_settings.setTitle("")
self.groupbox_settings.setCheckable(False)
self.groupbox_settings.setObjectName("groupbox_settings")
self.horizontalLayoutWidget = QtWidgets.QWidget(self.groupbox_settings)
self.horizontalLayoutWidget.setGeometry(QtCore.QRect(30, 10, 329, 21))
self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout.setObjectName("horizontalLayout")
self.checkbox = QtWidgets.QCheckBox(self.horizontalLayoutWidget)
self.checkbox.setMinimumSize(QtCore.QSize(0, 0))
self.checkbox.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.checkbox.setText("")
self.checkbox.setChecked(False)
self.checkbox.setTristate(False)
self.checkbox.setObjectName("checkbox")
self.horizontalLayout.addWidget(self.checkbox)
self.lbl_checkbox = QtWidgets.QLabel(self.horizontalLayoutWidget)
self.lbl_checkbox.setFrameShape(QtWidgets.QFrame.NoFrame)
self.lbl_checkbox.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.lbl_checkbox.setObjectName("lbl_checkbox")
self.horizontalLayout.addWidget(self.lbl_checkbox)
self.horizontalLayout.setStretch(0, 3)
self.horizontalLayout.setStretch(1, 97)
self.groupbox_stats = QtWidgets.QGroupBox(self.centralwidget)
self.groupbox_stats.setGeometry(QtCore.QRect(10, 100, 381, 91))
self.groupbox_stats.setStyleSheet("#groupbox_stats{\n"
" background-color: rgb(235, 235, 235);\n"
"}")
self.groupbox_stats.setTitle("")
self.groupbox_stats.setObjectName("groupbox_stats")
self.lbl_lasttime = QtWidgets.QLabel(self.groupbox_stats)
self.lbl_lasttime.setGeometry(QtCore.QRect(160, 10, 211, 31))
self.lbl_lasttime.setStyleSheet("background-color: rgb(243, 245, 255);")
self.lbl_lasttime.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.lbl_lasttime.setFrameShadow(QtWidgets.QFrame.Raised)
self.lbl_lasttime.setAlignment(QtCore.Qt.AlignCenter)
self.lbl_lasttime.setObjectName("lbl_lasttime")
self.lbl_counter = QtWidgets.QLabel(self.groupbox_stats)
self.lbl_counter.setGeometry(QtCore.QRect(160, 50, 211, 31))
self.lbl_counter.setStyleSheet("background-color: rgb(243, 245, 255);")
self.lbl_counter.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.lbl_counter.setFrameShadow(QtWidgets.QFrame.Raised)
self.lbl_counter.setAlignment(QtCore.Qt.AlignCenter)
self.lbl_counter.setObjectName("lbl_counter")
self.lbl_title_one = QtWidgets.QLabel(self.groupbox_stats)
self.lbl_title_one.setGeometry(QtCore.QRect(10, 10, 151, 31))
self.lbl_title_one.setStyleSheet("background-color: rgb(243, 245, 255);")
self.lbl_title_one.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.lbl_title_one.setFrameShadow(QtWidgets.QFrame.Raised)
self.lbl_title_one.setAlignment(QtCore.Qt.AlignCenter)
self.lbl_title_one.setObjectName("lbl_title_one")
self.lbl_title_two = QtWidgets.QLabel(self.groupbox_stats)
self.lbl_title_two.setGeometry(QtCore.QRect(10, 50, 151, 31))
self.lbl_title_two.setStyleSheet("background-color: rgb(243, 245, 255);")
self.lbl_title_two.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.lbl_title_two.setFrameShadow(QtWidgets.QFrame.Raised)
self.lbl_title_two.setAlignment(QtCore.Qt.AlignCenter)
self.lbl_title_two.setObjectName("lbl_title_two")
self.groupbox_song = QtWidgets.QGroupBox(self.centralwidget)
self.groupbox_song.setGeometry(QtCore.QRect(10, 10, 381, 81))
self.groupbox_song.setStyleSheet("#groupbox_song{\n"
" background-color: rgb(235, 235, 235);\n"
"}\n"
"\n"
"")
self.groupbox_song.setTitle("")
self.groupbox_song.setObjectName("groupbox_song")
self.lbl_nowplaying = QtWidgets.QLabel(self.groupbox_song)
self.lbl_nowplaying.setGeometry(QtCore.QRect(10, 10, 361, 21))
font = QtGui.QFont()
font.setBold(True)
font.setUnderline(False)
font.setWeight(75)
self.lbl_nowplaying.setFont(font)
self.lbl_nowplaying.setStyleSheet("background-color: rgb(204, 204, 204);")
self.lbl_nowplaying.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.lbl_nowplaying.setFrameShadow(QtWidgets.QFrame.Raised)
self.lbl_nowplaying.setAlignment(QtCore.Qt.AlignCenter)
self.lbl_nowplaying.setObjectName("lbl_nowplaying")
self.lbl_song = QtWidgets.QLabel(self.groupbox_song)
self.lbl_song.setGeometry(QtCore.QRect(10, 30, 361, 41))
self.lbl_song.setStyleSheet("background-color: rgb(243, 245, 255);")
self.lbl_song.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.lbl_song.setFrameShadow(QtWidgets.QFrame.Raised)
self.lbl_song.setAlignment(QtCore.Qt.AlignCenter)
self.lbl_song.setWordWrap(True)
self.lbl_song.setObjectName("lbl_song")
self.lbl_copyright = QtWidgets.QLabel(self.centralwidget)
self.lbl_copyright.setGeometry(QtCore.QRect(0, 240, 401, 31))
self.lbl_copyright.setStyleSheet("color: rgb(0, 0, 0);")
self.lbl_copyright.setAlignment(QtCore.Qt.AlignCenter)
self.lbl_copyright.setObjectName("lbl_copyright")
self.combobox = QtWidgets.QComboBox(self.centralwidget)
self.combobox.setGeometry(QtCore.QRect(10, 240, 31, 20))
self.combobox.setObjectName("combobox")
self.combobox.addItem("")
self.combobox.addItem("")
self.combobox.addItem("")
MainWindow.setCentralWidget(self.centralwidget)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "Spotify Adblocker"))
self.lbl_checkbox.setText(_translate("MainWindow", "<html><head/><body><p>Start <span style=\" font-weight:600; color:#1ab650;\">Spotify</span> too while starting <span style=\" font-weight:600; color:#ff9e01;\">Spotify Adblocker </span>next time.</p></body></html>"))
self.lbl_lasttime.setText(_translate("MainWindow", "-"))
self.lbl_counter.setText(_translate("MainWindow", "-"))
self.lbl_title_one.setText(_translate("MainWindow", "Last blocked time :"))
self.lbl_title_two.setText(_translate("MainWindow", "Total count of blocked ads :"))
self.lbl_nowplaying.setText(_translate("MainWindow", "Now Playing"))
self.lbl_song.setText(_translate("MainWindow", "Nothing"))
self.lbl_copyright.setText(_translate("MainWindow", "<html><head/><body><p><span style=\" font-size:7pt; color:#000000;\">© Designed and Developed by </span><a href=\"https://github.com/mehmetguduk\"><span style=\" font-size:7pt; text-decoration: underline; color:#0000ff;\">Mehmet Güdük</span></a></p></body></html>"))
self.combobox.setItemText(0, _translate("MainWindow", "a"))
self.combobox.setItemText(1, _translate("MainWindow", "b"))
self.combobox.setItemText(2, _translate("MainWindow", "c"))
import images