-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
137 lines (130 loc) · 7.26 KB
/
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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'main.ui'
#
# Created by: PyQt5 UI code generator 5.13.0
#
# 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(1012, 648)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.gridLayout_2 = QtWidgets.QGridLayout(self.centralwidget)
self.gridLayout_2.setObjectName("gridLayout_2")
self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
self.tabWidget.setEnabled(True)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.tabWidget.sizePolicy().hasHeightForWidth())
self.tabWidget.setSizePolicy(sizePolicy)
self.tabWidget.setMinimumSize(QtCore.QSize(1000, 600))
self.tabWidget.setStyleSheet("#tab{border-image: url(:/newPrefix/card.jpg);}\n"
"\n"
"#tab_3{\n"
" border-image: url(:/newPrefix/phb.jpg);}\n"
"#tab_2{\n"
" border-image: url(:/newPrefix/history.jpg);}")
self.tabWidget.setObjectName("tabWidget")
self.tab = QtWidgets.QWidget()
self.tab.setObjectName("tab")
self.horizontalLayoutWidget = QtWidgets.QWidget(self.tab)
self.horizontalLayoutWidget.setGeometry(QtCore.QRect(310, 370, 391, 131))
self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout.setObjectName("horizontalLayout")
self.pushButton = QtWidgets.QPushButton(self.horizontalLayoutWidget)
self.pushButton.setObjectName("pushButton")
self.horizontalLayout.addWidget(self.pushButton)
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem)
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem1)
self.pushButton_3 = QtWidgets.QPushButton(self.horizontalLayoutWidget)
self.pushButton_3.setObjectName("pushButton_3")
self.horizontalLayout.addWidget(self.pushButton_3)
self.lineEdit_2 = QtWidgets.QLineEdit(self.tab)
self.lineEdit_2.setGeometry(QtCore.QRect(220, 490, 561, 51))
self.lineEdit_2.setObjectName("lineEdit_2")
self.tabWidget.addTab(self.tab, "")
self.tab_3 = QtWidgets.QWidget()
self.tab_3.setObjectName("tab_3")
self.pushButton_5 = QtWidgets.QPushButton(self.tab_3)
self.pushButton_5.setGeometry(QtCore.QRect(450, 500, 121, 41))
self.pushButton_5.setObjectName("pushButton_5")
self.tableWidget = QtWidgets.QTableWidget(self.tab_3)
self.tableWidget.setGeometry(QtCore.QRect(250, 210, 511, 271))
self.tableWidget.setObjectName("tableWidget")
self.tableWidget.setColumnCount(3)
self.tableWidget.setRowCount(0)
item = QtWidgets.QTableWidgetItem()
self.tableWidget.setHorizontalHeaderItem(0, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidget.setHorizontalHeaderItem(1, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidget.setHorizontalHeaderItem(2, item)
self.tabWidget.addTab(self.tab_3, "")
self.tab_2 = QtWidgets.QWidget()
self.tab_2.setObjectName("tab_2")
self.formLayoutWidget = QtWidgets.QWidget(self.tab_2)
self.formLayoutWidget.setGeometry(QtCore.QRect(410, 480, 161, 31))
self.formLayoutWidget.setObjectName("formLayoutWidget")
self.formLayout = QtWidgets.QFormLayout(self.formLayoutWidget)
self.formLayout.setContentsMargins(0, 0, 0, 0)
self.formLayout.setObjectName("formLayout")
self.label = QtWidgets.QLabel(self.formLayoutWidget)
self.label.setObjectName("label")
self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label)
self.lineEdit = QtWidgets.QLineEdit(self.formLayoutWidget)
self.lineEdit.setObjectName("lineEdit")
self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.lineEdit)
self.pushButton_4 = QtWidgets.QPushButton(self.tab_2)
self.pushButton_4.setGeometry(QtCore.QRect(240, 520, 131, 31))
self.pushButton_4.setObjectName("pushButton_4")
self.tableWidget_2 = QtWidgets.QTableWidget(self.tab_2)
self.tableWidget_2.setGeometry(QtCore.QRect(130, 180, 731, 281))
self.tableWidget_2.setObjectName("tableWidget_2")
self.tableWidget_2.setColumnCount(0)
self.tableWidget_2.setRowCount(0)
self.pushButton_6 = QtWidgets.QPushButton(self.tab_2)
self.pushButton_6.setGeometry(QtCore.QRect(610, 520, 131, 31))
self.pushButton_6.setObjectName("pushButton_6")
self.tabWidget.addTab(self.tab_2, "")
self.gridLayout_2.addWidget(self.tabWidget, 0, 0, 1, 1)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 1012, 18))
self.menubar.setObjectName("menubar")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow)
self.tabWidget.setCurrentIndex(0)
self.pushButton_4.clicked.connect(MainWindow.ffind)
self.pushButton_3.clicked.connect(MainWindow.showcard)
self.pushButton.clicked.connect(MainWindow.fapai)
self.pushButton_5.clicked.connect(MainWindow.showphb)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
self.pushButton.setText(_translate("MainWindow", "发牌"))
self.pushButton_3.setText(_translate("MainWindow", "出牌"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "开始游戏"))
self.pushButton_5.setText(_translate("MainWindow", "查询"))
item = self.tableWidget.horizontalHeaderItem(0)
item.setText(_translate("MainWindow", "player_id"))
item = self.tableWidget.horizontalHeaderItem(1)
item.setText(_translate("MainWindow", "name"))
item = self.tableWidget.horizontalHeaderItem(2)
item.setText(_translate("MainWindow", "score"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), _translate("MainWindow", "排行榜"))
self.label.setText(_translate("MainWindow", "战局ID:"))
self.pushButton_4.setText(_translate("MainWindow", "直接查询"))
self.pushButton_6.setText(_translate("MainWindow", "查询详细"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "往期对战结果"))
import qqq_rc