-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwin_gui.py
209 lines (196 loc) · 10 KB
/
win_gui.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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'login.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
#
# 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.
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import Qt
class Ui_login_MainWindow(object):
def setupUi(self, login_MainWindow):
login_MainWindow.setObjectName("login_MainWindow")
login_MainWindow.setEnabled(True)
login_MainWindow.resize(575, 392)
login_MainWindow.setAnimated(True)
self.centralwidget = QtWidgets.QWidget(login_MainWindow)
self.centralwidget.setEnabled(True)
self.centralwidget.setObjectName("centralwidget")
self.label_3 = QtWidgets.QLabel(self.centralwidget)
self.label_3.setGeometry(QtCore.QRect(190, 30, 391, 79))
font = QtGui.QFont()
font.setPointSize(16)
font.setBold(True)
font.setItalic(True)
font.setWeight(75)
self.label_3.setFont(font)
self.label_3.setObjectName("label_3")
# 启用自动换行
self.label_3.setWordWrap(True)
self.label_2 = QtWidgets.QLabel(self.centralwidget)
self.label_2.setGeometry(QtCore.QRect(100, 200, 181, 41))
font = QtGui.QFont()
font.setPointSize(15)
self.label_2.setFont(font)
self.label_2.setObjectName("label_2")
self.label = QtWidgets.QLabel(self.centralwidget)
self.label.setGeometry(QtCore.QRect(100, 150, 181, 41))
font = QtGui.QFont()
font.setPointSize(15)
self.label.setFont(font)
self.label.setObjectName("label")
self.lineEdit = QtWidgets.QLineEdit(self.centralwidget)
self.lineEdit.setGeometry(QtCore.QRect(220, 200, 221, 41))
font = QtGui.QFont()
font.setPointSize(15)
self.lineEdit.setFont(font)
self.lineEdit.setText("")
self.lineEdit.setEchoMode(QtWidgets.QLineEdit.Password)
self.lineEdit.setObjectName("lineEdit")
self.lineEdit_2 = QtWidgets.QLineEdit(self.centralwidget)
self.lineEdit_2.setGeometry(QtCore.QRect(220, 150, 221, 41))
font = QtGui.QFont()
font.setPointSize(15)
self.lineEdit_2.setFont(font)
self.lineEdit_2.setObjectName("lineEdit_2")
self.pushButton = QtWidgets.QPushButton(self.centralwidget)
self.pushButton.setGeometry(QtCore.QRect(180, 280, 171, 51))
font = QtGui.QFont()
font.setPointSize(20)
font.setBold(True)
font.setWeight(75)
self.pushButton.setFont(font)
self.pushButton.setObjectName("pushButton")
login_MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(login_MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 575, 22))
self.menubar.setObjectName("menubar")
login_MainWindow.setMenuBar(self.menubar)
self.pushButton.clicked.connect(self.handle_login)
self.retranslateUi(login_MainWindow)
QtCore.QMetaObject.connectSlotsByName(login_MainWindow)
def retranslateUi(self, login_MainWindow):
_translate = QtCore.QCoreApplication.translate
login_MainWindow.setWindowTitle(_translate("login_MainWindow", "掉落查询登录"))
self.label_3.setText(_translate("login_MainWindow", "csgo信息查询"))
self.label_2.setText(_translate("login_MainWindow", "密码:"))
self.label.setText(_translate("login_MainWindow", "用户名:"))
self.lineEdit_2.setText(_translate("login_MainWindow", ""))
self.pushButton.setText(_translate("login_MainWindow", "登录"))
class Ui_task_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(933, 631)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.accTable = QtWidgets.QTableWidget(self.centralwidget)
self.accTable.setGeometry(QtCore.QRect(0, 0, 711, 401))
self.accTable.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
self.accTable.setObjectName("accTable")
self.accTable.setColumnCount(11)
self.accTable.setRowCount(0)
item = QtWidgets.QTableWidgetItem()
self.accTable.setHorizontalHeaderItem(0, item)
item = QtWidgets.QTableWidgetItem()
self.accTable.setHorizontalHeaderItem(1, item)
item = QtWidgets.QTableWidgetItem()
self.accTable.setHorizontalHeaderItem(2, item)
item = QtWidgets.QTableWidgetItem()
self.accTable.setHorizontalHeaderItem(3, item)
item = QtWidgets.QTableWidgetItem()
self.accTable.setHorizontalHeaderItem(4, item)
item = QtWidgets.QTableWidgetItem()
self.accTable.setHorizontalHeaderItem(5, item)
item = QtWidgets.QTableWidgetItem()
self.accTable.setHorizontalHeaderItem(6, item)
item = QtWidgets.QTableWidgetItem()
self.accTable.setHorizontalHeaderItem(7, item)
item = QtWidgets.QTableWidgetItem()
self.accTable.setHorizontalHeaderItem(8, item)
item = QtWidgets.QTableWidgetItem()
self.accTable.setHorizontalHeaderItem(9, item)
item = QtWidgets.QTableWidgetItem()
self.accTable.setHorizontalHeaderItem(10, item)
self.accTable.horizontalHeader().setCascadingSectionResizes(False)
self.accTable.horizontalHeader().setDefaultSectionSize(85)
self.accTable.horizontalHeader().setSortIndicatorShown(False)
self.accTable.horizontalHeader().setStretchLastSection(False)
# 为每一列设置特定的列宽
self.accTable.setColumnWidth(0, 85) # 账户
self.accTable.setColumnWidth(1, 85) # 登录状态
self.accTable.setColumnWidth(2, 100) # 最近掉落
self.accTable.setColumnWidth(3, 100) # 掉落日期
self.accTable.setColumnWidth(4, 100) # VAC状态
self.accTable.setColumnWidth(5, 100) # 本周已挂
self.accTable.setColumnWidth(6, 100) # 等级
self.accTable.setColumnWidth(7, 100) # 经验
self.accTable.setColumnWidth(8, 100) # 胜场
self.accTable.setColumnWidth(9, 100) # 地区
self.accTable.setColumnWidth(10, 100) # 余额
self.fuctionGroup = QtWidgets.QGroupBox(self.centralwidget)
self.fuctionGroup.setGeometry(QtCore.QRect(720, 0, 201, 401))
self.fuctionGroup.setObjectName("fuctionGroup")
self.addAccBut = QtWidgets.QPushButton(self.fuctionGroup)
self.addAccBut.setGeometry(QtCore.QRect(50, 270, 91, 31))
self.addAccBut.setObjectName("addAccBut")
self.startTaskBut = QtWidgets.QPushButton(self.fuctionGroup)
self.startTaskBut.setGeometry(QtCore.QRect(50, 330, 91, 31))
self.startTaskBut.setObjectName("startTaskBut")
self.threadNumEdit = QtWidgets.QLineEdit(self.fuctionGroup)
self.threadNumEdit.setGeometry(QtCore.QRect(80, 79, 111, 31))
self.threadNumEdit.setObjectName("threadNumEdit")
self.threadNumLabel = QtWidgets.QLabel(self.fuctionGroup)
self.threadNumLabel.setGeometry(QtCore.QRect(20, 90, 54, 12))
self.threadNumLabel.setObjectName("threadNumLabel")
self.msgGroup = QtWidgets.QGroupBox(self.centralwidget)
self.msgGroup.setGeometry(QtCore.QRect(10, 410, 701, 171))
self.msgGroup.setObjectName("msgGroup")
self.msgEdit = QtWidgets.QTextEdit(self.msgGroup)
self.msgEdit.setEnabled(True)
self.msgEdit.setGeometry(QtCore.QRect(10, 20, 681, 141))
self.msgEdit.setObjectName("msgEdit")
self.fuctionGroup.raise_()
self.msgGroup.raise_()
self.accTable.raise_()
MainWindow.setCentralWidget(self.centralwidget)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.addAccBut.clicked.connect(self.load_accounts_from_file)
self.startTaskBut.clicked.connect(self.toggle_task)
# 开启表格的右键菜单功能
self.accTable.setContextMenuPolicy(Qt.CustomContextMenu)
self.accTable.customContextMenuRequested.connect(self.openMenu)
self.threadNumEdit.setText(str(5))
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "掉落检查"))
item = self.accTable.horizontalHeaderItem(0)
item.setText(_translate("MainWindow", "账户"))
item = self.accTable.horizontalHeaderItem(1)
item.setText(_translate("MainWindow", "状态"))
item = self.accTable.horizontalHeaderItem(2)
item.setText(_translate("MainWindow", "最近掉落"))
item = self.accTable.horizontalHeaderItem(3)
item.setText(_translate("MainWindow", "掉落日期"))
item = self.accTable.horizontalHeaderItem(4)
item.setText(_translate("MainWindow", "VAC状态"))
item = self.accTable.horizontalHeaderItem(5)
item.setText(_translate("MainWindow", "本周已挂"))
item = self.accTable.horizontalHeaderItem(6)
item.setText(_translate("MainWindow", "等级"))
item = self.accTable.horizontalHeaderItem(7)
item.setText(_translate("MainWindow", "当前经验"))
item = self.accTable.horizontalHeaderItem(8)
item.setText(_translate("MainWindow", "胜场信息"))
item = self.accTable.horizontalHeaderItem(9)
item.setText(_translate("MainWindow", "地区"))
item = self.accTable.horizontalHeaderItem(10)
item.setText(_translate("MainWindow", "余额"))
self.fuctionGroup.setTitle(_translate("MainWindow", "功能区"))
self.addAccBut.setText(_translate("MainWindow", "导入账号"))
self.startTaskBut.setText(_translate("MainWindow", "开始"))
self.threadNumLabel.setText(_translate("MainWindow", "线程数"))
self.msgGroup.setTitle(_translate("MainWindow", "日志"))