-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.py
226 lines (219 loc) · 12 KB
/
MainWindow.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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'MainWindow.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
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(1147, 627)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.formLayout = QtWidgets.QFormLayout(self.centralwidget)
self.formLayout.setObjectName("formLayout")
self.settings = QtWidgets.QGroupBox(self.centralwidget)
self.settings.setObjectName("settings")
self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.settings)
self.verticalLayout_5.setObjectName("verticalLayout_5")
self.style = QtWidgets.QGroupBox(self.settings)
self.style.setObjectName("style")
self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.style)
self.verticalLayout_4.setObjectName("verticalLayout_4")
self.qs_custom = QtWidgets.QRadioButton(self.style)
self.qs_custom.setChecked(True)
self.qs_custom.setObjectName("qs_custom")
self.bg_style = QtWidgets.QButtonGroup(MainWindow)
self.bg_style.setObjectName("bg_style")
self.bg_style.addButton(self.qs_custom)
self.verticalLayout_4.addWidget(self.qs_custom)
self.qs_random = QtWidgets.QRadioButton(self.style)
self.qs_random.setChecked(False)
self.qs_random.setObjectName("qs_random")
self.bg_style.addButton(self.qs_random)
self.verticalLayout_4.addWidget(self.qs_random)
self.qs_millionaire = QtWidgets.QRadioButton(self.style)
self.qs_millionaire.setObjectName("qs_millionaire")
self.bg_style.addButton(self.qs_millionaire)
self.verticalLayout_4.addWidget(self.qs_millionaire)
self.verticalLayout_5.addWidget(self.style)
self.customize = QtWidgets.QGroupBox(self.settings)
self.customize.setObjectName("customize")
self.formLayout_3 = QtWidgets.QFormLayout(self.customize)
self.formLayout_3.setObjectName("formLayout_3")
self.amount = QtWidgets.QSpinBox(self.customize)
self.amount.setMinimum(1)
self.amount.setMaximum(50)
self.amount.setProperty("value", 10)
self.amount.setObjectName("amount")
self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.amount)
self.lbl_amount = QtWidgets.QLabel(self.customize)
self.lbl_amount.setObjectName("lbl_amount")
self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.lbl_amount)
self.lbl_categories = QtWidgets.QLabel(self.customize)
self.lbl_categories.setObjectName("lbl_categories")
self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.lbl_categories)
self.categories = QtWidgets.QComboBox(self.customize)
self.categories.setObjectName("categories")
self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.categories)
self.verticalLayout_5.addWidget(self.customize)
self.qtype = QtWidgets.QGroupBox(self.settings)
self.qtype.setObjectName("qtype")
self.verticalLayout = QtWidgets.QVBoxLayout(self.qtype)
self.verticalLayout.setObjectName("verticalLayout")
self.qt_any = QtWidgets.QRadioButton(self.qtype)
self.qt_any.setChecked(True)
self.qt_any.setObjectName("qt_any")
self.bg_type = QtWidgets.QButtonGroup(MainWindow)
self.bg_type.setObjectName("bg_type")
self.bg_type.addButton(self.qt_any)
self.verticalLayout.addWidget(self.qt_any)
self.qt_multiple = QtWidgets.QRadioButton(self.qtype)
self.qt_multiple.setObjectName("qt_multiple")
self.bg_type.addButton(self.qt_multiple)
self.verticalLayout.addWidget(self.qt_multiple)
self.qt_truefalse = QtWidgets.QRadioButton(self.qtype)
self.qt_truefalse.setObjectName("qt_truefalse")
self.bg_type.addButton(self.qt_truefalse)
self.verticalLayout.addWidget(self.qt_truefalse)
self.verticalLayout_5.addWidget(self.qtype)
self.qdiff = QtWidgets.QGroupBox(self.settings)
self.qdiff.setObjectName("qdiff")
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.qdiff)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.qd_any = QtWidgets.QRadioButton(self.qdiff)
self.qd_any.setChecked(True)
self.qd_any.setObjectName("qd_any")
self.bg_diff = QtWidgets.QButtonGroup(MainWindow)
self.bg_diff.setObjectName("bg_diff")
self.bg_diff.addButton(self.qd_any)
self.verticalLayout_2.addWidget(self.qd_any)
self.qd_easy = QtWidgets.QRadioButton(self.qdiff)
self.qd_easy.setObjectName("qd_easy")
self.bg_diff.addButton(self.qd_easy)
self.verticalLayout_2.addWidget(self.qd_easy)
self.qd_medium = QtWidgets.QRadioButton(self.qdiff)
self.qd_medium.setObjectName("qd_medium")
self.bg_diff.addButton(self.qd_medium)
self.verticalLayout_2.addWidget(self.qd_medium)
self.qd_hard = QtWidgets.QRadioButton(self.qdiff)
self.qd_hard.setObjectName("qd_hard")
self.bg_diff.addButton(self.qd_hard)
self.verticalLayout_2.addWidget(self.qd_hard)
self.verticalLayout_5.addWidget(self.qdiff)
self.getQuestionsLinkButton = QtWidgets.QCommandLinkButton(self.settings)
self.getQuestionsLinkButton.setObjectName("getQuestionsLinkButton")
self.verticalLayout_5.addWidget(self.getQuestionsLinkButton)
self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.settings)
self.frame = QtWidgets.QFrame(self.centralwidget)
self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
self.frame.setObjectName("frame")
self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.frame)
self.verticalLayout_6.setObjectName("verticalLayout_6")
self.groupBox = QtWidgets.QGroupBox(self.frame)
self.groupBox.setObjectName("groupBox")
self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.groupBox)
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.questionTable = QtWidgets.QTableWidget(self.groupBox)
self.questionTable.setMaximumSize(QtCore.QSize(16777215, 400))
self.questionTable.setAlternatingRowColors(True)
self.questionTable.setRowCount(0)
self.questionTable.setColumnCount(4)
self.questionTable.setObjectName("questionTable")
item = QtWidgets.QTableWidgetItem()
self.questionTable.setHorizontalHeaderItem(0, item)
item = QtWidgets.QTableWidgetItem()
self.questionTable.setHorizontalHeaderItem(1, item)
item = QtWidgets.QTableWidgetItem()
self.questionTable.setHorizontalHeaderItem(2, item)
item = QtWidgets.QTableWidgetItem()
self.questionTable.setHorizontalHeaderItem(3, item)
self.questionTable.horizontalHeader().setVisible(True)
self.questionTable.verticalHeader().setVisible(True)
self.verticalLayout_3.addWidget(self.questionTable)
self.selectedQuestion = QtWidgets.QLabel(self.groupBox)
font = QtGui.QFont()
font.setFamily("Arial")
font.setPointSize(16)
font.setBold(True)
font.setWeight(75)
self.selectedQuestion.setFont(font)
self.selectedQuestion.setText("")
self.selectedQuestion.setAlignment(QtCore.Qt.AlignCenter)
self.selectedQuestion.setWordWrap(True)
self.selectedQuestion.setObjectName("selectedQuestion")
self.verticalLayout_3.addWidget(self.selectedQuestion)
self.answerBox = QtWidgets.QGroupBox(self.groupBox)
self.answerBox.setObjectName("answerBox")
self.verticalLayout_3.addWidget(self.answerBox)
self.verticalLayout_6.addWidget(self.groupBox)
self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.frame)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 1147, 21))
self.menubar.setObjectName("menubar")
self.menuFile = QtWidgets.QMenu(self.menubar)
self.menuFile.setObjectName("menuFile")
self.menuHelp = QtWidgets.QMenu(self.menubar)
self.menuHelp.setObjectName("menuHelp")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.actionExit = QtWidgets.QAction(MainWindow)
self.actionExit.setObjectName("actionExit")
self.actionNew_Quiz = QtWidgets.QAction(MainWindow)
self.actionNew_Quiz.setObjectName("actionNew_Quiz")
self.actionAbout = QtWidgets.QAction(MainWindow)
self.actionAbout.setObjectName("actionAbout")
self.actionReport_Issue_on_GitHub = QtWidgets.QAction(MainWindow)
self.actionReport_Issue_on_GitHub.setObjectName("actionReport_Issue_on_GitHub")
self.menuFile.addAction(self.actionNew_Quiz)
self.menuFile.addSeparator()
self.menuFile.addAction(self.actionExit)
self.menuHelp.addAction(self.actionAbout)
self.menuHelp.addSeparator()
self.menuHelp.addAction(self.actionReport_Issue_on_GitHub)
self.menubar.addAction(self.menuFile.menuAction())
self.menubar.addAction(self.menuHelp.menuAction())
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
self.settings.setTitle(_translate("MainWindow", "Question Settings"))
self.style.setTitle(_translate("MainWindow", "Quiz Style"))
self.qs_custom.setText(_translate("MainWindow", "Custom"))
self.qs_random.setText(_translate("MainWindow", "Random"))
self.qs_millionaire.setText(_translate("MainWindow", "Millionaire"))
self.lbl_amount.setText(_translate("MainWindow", "Amount"))
self.lbl_categories.setText(_translate("MainWindow", "Category"))
self.qtype.setTitle(_translate("MainWindow", "Type"))
self.qt_any.setText(_translate("MainWindow", "Any"))
self.qt_multiple.setText(_translate("MainWindow", "Multiple"))
self.qt_truefalse.setText(_translate("MainWindow", "True/False"))
self.qdiff.setTitle(_translate("MainWindow", "Difficulty"))
self.qd_any.setText(_translate("MainWindow", "Any"))
self.qd_easy.setText(_translate("MainWindow", "Easy"))
self.qd_medium.setText(_translate("MainWindow", "Medium"))
self.qd_hard.setText(_translate("MainWindow", "Hard"))
self.getQuestionsLinkButton.setText(_translate("MainWindow", "Get Questions"))
self.groupBox.setTitle(_translate("MainWindow", "Question Table"))
item = self.questionTable.horizontalHeaderItem(0)
item.setText(_translate("MainWindow", "Category"))
item = self.questionTable.horizontalHeaderItem(1)
item.setText(_translate("MainWindow", "Difficulty"))
item = self.questionTable.horizontalHeaderItem(2)
item.setText(_translate("MainWindow", "Type"))
item = self.questionTable.horizontalHeaderItem(3)
item.setText(_translate("MainWindow", "Answered?"))
self.answerBox.setTitle(_translate("MainWindow", "Answers"))
self.menuFile.setTitle(_translate("MainWindow", "File"))
self.menuHelp.setTitle(_translate("MainWindow", "Help"))
self.actionExit.setText(_translate("MainWindow", "Exit"))
self.actionNew_Quiz.setText(_translate("MainWindow", "New Quiz"))
self.actionAbout.setText(_translate("MainWindow", "About"))
self.actionReport_Issue_on_GitHub.setText(_translate("MainWindow", "Report Issue on GitHub"))