|
|
@ -410,14 +410,18 @@ class DoubleJeopardyWindow(QtGui.QDialog):
|
|
|
|
self.pointsbtn.setFocus()
|
|
|
|
self.pointsbtn.setFocus()
|
|
|
|
|
|
|
|
|
|
|
|
start = QtGui.QPushButton("Done", self)
|
|
|
|
start = QtGui.QPushButton("Done", self)
|
|
|
|
start.clicked.connect(self.close)
|
|
|
|
start.clicked.connect(self.closeIfNotNobody)
|
|
|
|
self.layout.addWidget(start)
|
|
|
|
self.layout.addWidget(start)
|
|
|
|
|
|
|
|
|
|
|
|
self.setLayout(self.layout)
|
|
|
|
self.setLayout(self.layout)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def closeIfNotNobody(self):
|
|
|
|
|
|
|
|
if self.get_player() is not None:
|
|
|
|
|
|
|
|
self.close()
|
|
|
|
|
|
|
|
|
|
|
|
def keyPressEvent(self, e):
|
|
|
|
def keyPressEvent(self, e):
|
|
|
|
if e.key() == QtCore.Qt.Key_Escape or e.key() == QtCore.Qt.Key_Enter:
|
|
|
|
if e.key() == QtCore.Qt.Key_Escape or e.key() == QtCore.Qt.Key_Enter:
|
|
|
|
self.close()
|
|
|
|
self.closeIfNotNobody()
|
|
|
|
elif e.key() == QtCore.Qt.Key_Left or e.key() == QtCore.Qt.Key_Right:
|
|
|
|
elif e.key() == QtCore.Qt.Key_Left or e.key() == QtCore.Qt.Key_Right:
|
|
|
|
if self.focusWidget() == self.pbtn:
|
|
|
|
if self.focusWidget() == self.pbtn:
|
|
|
|
if e.key() == QtCore.Qt.Key_Right:
|
|
|
|
if e.key() == QtCore.Qt.Key_Right:
|
|
|
|