This repository has been archived by the owner on Nov 18, 2022. It is now read-only.
forked from SMU-CAA/yiban-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathybqtmainui.py
232 lines (225 loc) · 16 KB
/
ybqtmainui.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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui/main.ui'
#
# Created by: PyQt5 UI code generator 5.13.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(501, 523)
mainWindow.setMinimumSize(QtCore.QSize(451, 301))
mainWindow.setTabletTracking(False)
self.centralwidget = QtWidgets.QWidget(mainWindow)
self.centralwidget.setObjectName("centralwidget")
self.gridLayout_3 = QtWidgets.QGridLayout(self.centralwidget)
self.gridLayout_3.setObjectName("gridLayout_3")
self.plainTextEdit = QtWidgets.QPlainTextEdit(self.centralwidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.plainTextEdit.sizePolicy().hasHeightForWidth())
self.plainTextEdit.setSizePolicy(sizePolicy)
self.plainTextEdit.setToolTip("")
self.plainTextEdit.setReadOnly(True)
self.plainTextEdit.setCenterOnScroll(False)
self.plainTextEdit.setObjectName("plainTextEdit")
self.gridLayout_3.addWidget(self.plainTextEdit, 0, 1, 1, 1)
self.gridLayout_2 = QtWidgets.QGridLayout()
self.gridLayout_2.setObjectName("gridLayout_2")
self.voteformLayout = QtWidgets.QFormLayout()
self.voteformLayout.setObjectName("voteformLayout")
self.add_vote_countLabel = QtWidgets.QLabel(self.centralwidget)
self.add_vote_countLabel.setToolTip("")
self.add_vote_countLabel.setObjectName("add_vote_countLabel")
self.voteformLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.add_vote_countLabel)
self.add_vote_countSpinbox = QtWidgets.QSpinBox(self.centralwidget)
self.add_vote_countSpinbox.setMaximum(9999)
self.add_vote_countSpinbox.setProperty("value", 1)
self.add_vote_countSpinbox.setObjectName("add_vote_countSpinbox")
self.voteformLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.add_vote_countSpinbox)
self.vote_control_countLabel = QtWidgets.QLabel(self.centralwidget)
self.vote_control_countLabel.setToolTip("")
self.vote_control_countLabel.setObjectName("vote_control_countLabel")
self.voteformLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.vote_control_countLabel)
self.vote_control_countSpinbox = QtWidgets.QSpinBox(self.centralwidget)
self.vote_control_countSpinbox.setMaximum(9999)
self.vote_control_countSpinbox.setProperty("value", 2)
self.vote_control_countSpinbox.setObjectName("vote_control_countSpinbox")
self.voteformLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.vote_control_countSpinbox)
self.vote_reply_countLabel = QtWidgets.QLabel(self.centralwidget)
self.vote_reply_countLabel.setToolTip("")
self.vote_reply_countLabel.setObjectName("vote_reply_countLabel")
self.voteformLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.vote_reply_countLabel)
self.vote_reply_countSpinbox = QtWidgets.QSpinBox(self.centralwidget)
self.vote_reply_countSpinbox.setMaximum(9999)
self.vote_reply_countSpinbox.setProperty("value", 1)
self.vote_reply_countSpinbox.setObjectName("vote_reply_countSpinbox")
self.voteformLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.vote_reply_countSpinbox)
self.gridLayout_2.addLayout(self.voteformLayout, 0, 0, 1, 1)
self.choiceverticalLayout = QtWidgets.QVBoxLayout()
self.choiceverticalLayout.setObjectName("choiceverticalLayout")
self.voteCheckbox = QtWidgets.QCheckBox(self.centralwidget)
self.voteCheckbox.setIconSize(QtCore.QSize(10, 10))
self.voteCheckbox.setChecked(True)
self.voteCheckbox.setObjectName("voteCheckbox")
self.choiceverticalLayout.addWidget(self.voteCheckbox, 0, QtCore.Qt.AlignHCenter)
self.vote_upCheckbox = QtWidgets.QCheckBox(self.centralwidget)
self.vote_upCheckbox.setTabletTracking(False)
self.vote_upCheckbox.setChecked(True)
self.vote_upCheckbox.setObjectName("vote_upCheckbox")
self.choiceverticalLayout.addWidget(self.vote_upCheckbox, 0, QtCore.Qt.AlignHCenter)
self.vote_replyCheckbox = QtWidgets.QCheckBox(self.centralwidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.vote_replyCheckbox.sizePolicy().hasHeightForWidth())
self.vote_replyCheckbox.setSizePolicy(sizePolicy)
self.vote_replyCheckbox.setChecked(True)
self.vote_replyCheckbox.setObjectName("vote_replyCheckbox")
self.choiceverticalLayout.addWidget(self.vote_replyCheckbox, 0, QtCore.Qt.AlignHCenter)
self.line = QtWidgets.QFrame(self.centralwidget)
self.line.setFrameShape(QtWidgets.QFrame.HLine)
self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line.setObjectName("line")
self.choiceverticalLayout.addWidget(self.line)
self.topic_upCheckbox = QtWidgets.QCheckBox(self.centralwidget)
self.topic_upCheckbox.setChecked(True)
self.topic_upCheckbox.setObjectName("topic_upCheckbox")
self.choiceverticalLayout.addWidget(self.topic_upCheckbox, 0, QtCore.Qt.AlignHCenter)
self.topic_replyCheckbox = QtWidgets.QCheckBox(self.centralwidget)
self.topic_replyCheckbox.setChecked(True)
self.topic_replyCheckbox.setObjectName("topic_replyCheckbox")
self.choiceverticalLayout.addWidget(self.topic_replyCheckbox, 0, QtCore.Qt.AlignHCenter)
self.gridLayout_2.addLayout(self.choiceverticalLayout, 0, 2, 1, 1)
self.topicformLayout = QtWidgets.QFormLayout()
self.topicformLayout.setObjectName("topicformLayout")
self.add_topic_countLabel = QtWidgets.QLabel(self.centralwidget)
self.add_topic_countLabel.setToolTip("")
self.add_topic_countLabel.setObjectName("add_topic_countLabel")
self.topicformLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.add_topic_countLabel)
self.add_topic_countSpinbox = QtWidgets.QSpinBox(self.centralwidget)
self.add_topic_countSpinbox.setMaximum(9999)
self.add_topic_countSpinbox.setProperty("value", 1)
self.add_topic_countSpinbox.setObjectName("add_topic_countSpinbox")
self.topicformLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.add_topic_countSpinbox)
self.topic_control_countLabel = QtWidgets.QLabel(self.centralwidget)
self.topic_control_countLabel.setToolTip("")
self.topic_control_countLabel.setObjectName("topic_control_countLabel")
self.topicformLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.topic_control_countLabel)
self.topic_control_countSpinbox = QtWidgets.QSpinBox(self.centralwidget)
self.topic_control_countSpinbox.setMaximum(9999)
self.topic_control_countSpinbox.setProperty("value", 2)
self.topic_control_countSpinbox.setObjectName("topic_control_countSpinbox")
self.topicformLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.topic_control_countSpinbox)
self.topic_reply_countSpinbox = QtWidgets.QSpinBox(self.centralwidget)
self.topic_reply_countSpinbox.setMaximum(9999)
self.topic_reply_countSpinbox.setProperty("value", 1)
self.topic_reply_countSpinbox.setObjectName("topic_reply_countSpinbox")
self.topicformLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.topic_reply_countSpinbox)
self.topic_reply_countLabel = QtWidgets.QLabel(self.centralwidget)
self.topic_reply_countLabel.setToolTip("")
self.topic_reply_countLabel.setObjectName("topic_reply_countLabel")
self.topicformLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.topic_reply_countLabel)
self.gridLayout_2.addLayout(self.topicformLayout, 0, 1, 1, 1)
self.gridLayout_3.addLayout(self.gridLayout_2, 1, 0, 1, 2)
self.progressBar = QtWidgets.QProgressBar(self.centralwidget)
self.progressBar.setProperty("value", 0)
self.progressBar.setObjectName("progressBar")
self.gridLayout_3.addWidget(self.progressBar, 2, 0, 1, 2)
self.formLayout_4 = QtWidgets.QFormLayout()
self.formLayout_4.setSpacing(4)
self.formLayout_4.setObjectName("formLayout_4")
self.tokenLabel = QtWidgets.QLabel(self.centralwidget)
self.tokenLabel.setToolTip("")
self.tokenLabel.setWhatsThis("")
self.tokenLabel.setObjectName("tokenLabel")
self.formLayout_4.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.tokenLabel)
self.tokenLineedit = QtWidgets.QLineEdit(self.centralwidget)
self.tokenLineedit.setText("")
self.tokenLineedit.setObjectName("tokenLineedit")
self.formLayout_4.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.tokenLineedit)
self.urlLabel = QtWidgets.QLabel(self.centralwidget)
self.urlLabel.setToolTip("")
self.urlLabel.setWhatsThis("")
self.urlLabel.setObjectName("urlLabel")
self.formLayout_4.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.urlLabel)
self.waitLabel = QtWidgets.QLabel(self.centralwidget)
self.waitLabel.setToolTip("")
self.waitLabel.setObjectName("waitLabel")
self.formLayout_4.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.waitLabel)
self.doubleSpinBox = QtWidgets.QDoubleSpinBox(self.centralwidget)
self.doubleSpinBox.setDecimals(2)
self.doubleSpinBox.setMinimum(0.1)
self.doubleSpinBox.setMaximum(9999.99)
self.doubleSpinBox.setSingleStep(0.1)
self.doubleSpinBox.setProperty("value", 3.6)
self.doubleSpinBox.setObjectName("doubleSpinBox")
self.formLayout_4.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.doubleSpinBox)
self.loginButton = QtWidgets.QPushButton(self.centralwidget)
self.loginButton.setObjectName("loginButton")
self.formLayout_4.setWidget(0, QtWidgets.QFormLayout.SpanningRole, self.loginButton)
self.lauchButton = QtWidgets.QPushButton(self.centralwidget)
self.lauchButton.setObjectName("lauchButton")
self.formLayout_4.setWidget(4, QtWidgets.QFormLayout.SpanningRole, self.lauchButton)
self.NotePad = QtWidgets.QPlainTextEdit(self.centralwidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.NotePad.sizePolicy().hasHeightForWidth())
self.NotePad.setSizePolicy(sizePolicy)
self.NotePad.setObjectName("NotePad")
self.formLayout_4.setWidget(5, QtWidgets.QFormLayout.SpanningRole, self.NotePad)
self.urlLineedit = QtWidgets.QLineEdit(self.centralwidget)
self.urlLineedit.setObjectName("urlLineedit")
self.formLayout_4.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.urlLineedit)
self.gridLayout_3.addLayout(self.formLayout_4, 0, 0, 1, 1)
mainWindow.setCentralWidget(self.centralwidget)
self.statusbar = QtWidgets.QStatusBar(mainWindow)
self.statusbar.setObjectName("statusbar")
mainWindow.setStatusBar(self.statusbar)
self.retranslateUi(mainWindow)
QtCore.QMetaObject.connectSlotsByName(mainWindow)
def retranslateUi(self, mainWindow):
_translate = QtCore.QCoreApplication.translate
mainWindow.setWindowTitle(_translate("mainWindow", "易班 EGPA"))
self.plainTextEdit.setStatusTip(_translate("mainWindow", "程序输出日志,如出错请咨询开发者"))
self.plainTextEdit.setPlainText(_translate("mainWindow", "Made by Simon Shi\n"
"在左侧使用账号/密码登录,填入 Token 后,点击启动即可刷EGPA。"))
self.add_vote_countLabel.setStatusTip(_translate("mainWindow", "发起投票数量,如不需要请改为0关闭自动发起投票"))
self.add_vote_countLabel.setText(_translate("mainWindow", "发起投票数量"))
self.add_vote_countSpinbox.setStatusTip(_translate("mainWindow", "发起投票数量,如不需要请改为0关闭自动发起投票"))
self.vote_control_countLabel.setStatusTip(_translate("mainWindow", "操作控制投票帖子数量,如不需要请改为0关闭操作控制投票帖子"))
self.vote_control_countLabel.setText(_translate("mainWindow", "投票互动数量"))
self.vote_control_countSpinbox.setStatusTip(_translate("mainWindow", "操作控制投票帖子数量,如不需要请改为0关闭操作控制投票帖子"))
self.vote_reply_countLabel.setStatusTip(_translate("mainWindow", "回复投票次数,如不需要请改为0关闭回复投票"))
self.vote_reply_countLabel.setText(_translate("mainWindow", "回复投票次数"))
self.vote_reply_countSpinbox.setStatusTip(_translate("mainWindow", "回复投票次数,如不需要请改为0关闭回复投票"))
self.voteCheckbox.setText(_translate("mainWindow", "开启参与投票"))
self.vote_upCheckbox.setText(_translate("mainWindow", "开启投票点赞"))
self.vote_replyCheckbox.setText(_translate("mainWindow", "开启回复投票"))
self.topic_upCheckbox.setText(_translate("mainWindow", "开启话题点赞"))
self.topic_replyCheckbox.setText(_translate("mainWindow", "开启回复话题"))
self.add_topic_countLabel.setStatusTip(_translate("mainWindow", "发起话题数量,如不需要请改为0关闭自动发起话题"))
self.add_topic_countLabel.setText(_translate("mainWindow", "发起话题数量"))
self.add_topic_countSpinbox.setStatusTip(_translate("mainWindow", "发起话题数量,如不需要请改为0关闭自动发起话题"))
self.topic_control_countLabel.setStatusTip(_translate("mainWindow", "操作控制话题帖子数量,如不需要请改为0关闭操作控制话题帖子"))
self.topic_control_countLabel.setText(_translate("mainWindow", "话题互动数量"))
self.topic_control_countSpinbox.setStatusTip(_translate("mainWindow", "操作控制话题帖子数量,如不需要请改为0关闭操作控制话题帖子"))
self.topic_reply_countSpinbox.setStatusTip(_translate("mainWindow", "回复话题次数,如不需要请改为0关闭回复话题"))
self.topic_reply_countLabel.setStatusTip(_translate("mainWindow", "回复话题次数,如不需要请改为0关闭回复话题"))
self.topic_reply_countLabel.setText(_translate("mainWindow", "回复话题次数"))
self.tokenLabel.setStatusTip(_translate("mainWindow", "Token是易班账号密码验证的优秀替代方式,可用于访问易班服务,重新登录将重置Token"))
self.tokenLabel.setText(_translate("mainWindow", "Token"))
self.tokenLineedit.setStatusTip(_translate("mainWindow", "Token是易班账号密码验证的优秀替代方式,可用于访问易班服务,重新登录将重置Token"))
self.urlLabel.setStatusTip(_translate("mainWindow", "填入文本内容生成的链接"))
self.urlLabel.setText(_translate("mainWindow", "文本生成链接"))
self.waitLabel.setStatusTip(_translate("mainWindow", "每个操作之间的间隔,填入浮点数"))
self.waitLabel.setText(_translate("mainWindow", "等待时间间隔"))
self.doubleSpinBox.setStatusTip(_translate("mainWindow", "每个操作之间的间隔,填入浮点数"))
self.loginButton.setText(_translate("mainWindow", "账号/密码登录"))
self.lauchButton.setText(_translate("mainWindow", "启动"))
self.NotePad.setPlainText(_translate("mainWindow", "这里可以填写备忘录"))
self.urlLineedit.setStatusTip(_translate("mainWindow", "填入文本内容生成的链接"))
self.urlLineedit.setText(_translate("mainWindow", "https://v1.hitokoto.cn/?encode=text"))