|
|
|
@ -364,3 +364,44 @@ class VictoryWindow(QtGui.QDialog):
|
|
|
|
|
self.layout.addLayout(self.playerGrid)
|
|
|
|
|
|
|
|
|
|
self.setLayout(self.layout)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class DoubleJeopardyWindow(QtGui.QDialog):
|
|
|
|
|
def __init__(self, player, parent=None):
|
|
|
|
|
super(QuestionAnswerWindow, self).__init__(parent)
|
|
|
|
|
self.player = player
|
|
|
|
|
|
|
|
|
|
self._setupGui()
|
|
|
|
|
|
|
|
|
|
# move window to bottom right of screen
|
|
|
|
|
g = QtGui.QApplication.desktop().screenGeometry()
|
|
|
|
|
self.show()
|
|
|
|
|
cPos = self.rect()
|
|
|
|
|
self.move(g.width() - cPos.width(), g.height() - cPos.height())
|
|
|
|
|
|
|
|
|
|
def _setupGui(self):
|
|
|
|
|
self.layout = QtGui.QVBoxLayout()
|
|
|
|
|
|
|
|
|
|
header = QtGui.QLabel("Double Jeopardy", self)
|
|
|
|
|
self.layout.addWidget(header, alignment=QtCore.Qt.AlignCenter)
|
|
|
|
|
|
|
|
|
|
self.pbtn = QtGui.QPushButton(self.player.name)
|
|
|
|
|
self.plabel.setStyleSheet("QLabel { font-size: 60px; }")
|
|
|
|
|
self.layout.addWidget(self.plabel, alignment=QtCore.Qt.AlignCenter)
|
|
|
|
|
|
|
|
|
|
btnbox = QtGui.QHBoxLayout()
|
|
|
|
|
right = QtGui.QPushButton("Correct")
|
|
|
|
|
right.clicked.connect(lambda: self.done(self.CORRECT))
|
|
|
|
|
btnbox.addWidget(right)
|
|
|
|
|
wrong = QtGui.QPushButton("Wrong")
|
|
|
|
|
wrong.clicked.connect(lambda: self.done(self.WRONG))
|
|
|
|
|
btnbox.addWidget(wrong)
|
|
|
|
|
btnbox.addStretch()
|
|
|
|
|
oops = QtGui.QPushButton("Oops")
|
|
|
|
|
oops.clicked.connect(lambda: self.done(self.OOPS))
|
|
|
|
|
btnbox.addWidget(oops)
|
|
|
|
|
self.layout.addLayout(btnbox)
|
|
|
|
|
|
|
|
|
|
self.setLayout(self.layout)
|
|
|
|
|
|
|
|
|
|
def _
|
|
|
|
|