Example #1
0
    def __init__(self, parent):
        super(DHeadtail, self).__init__(parent)

        layout = QtGui.QVBoxLayout(self)
        self._widheadtail = WHeadtail(parent=self)
        layout.addWidget(self._widheadtail)

        buttons = QtGui.QDialogButtonBox(QtGui.QDialogButtonBox.Cancel
                                         | QtGui.QDialogButtonBox.Ok)
        buttons.rejected.connect(self.reject)
        buttons.accepted.connect(self._accept)
        layout.addWidget(buttons)

        self.setWindowTitle(le2mtrans(u"Head and Tail"))
        self.adjustSize()
        self.setFixedSize(self.size())
Example #2
0
class DHeadtail(QtGui.QDialog):
    def __init__(self, parent):
        super(DHeadtail, self).__init__(parent)

        layout = QtGui.QVBoxLayout(self)
        self._widheadtail = WHeadtail(parent=self)
        layout.addWidget(self._widheadtail)

        buttons = QtGui.QDialogButtonBox(QtGui.QDialogButtonBox.Cancel
                                         | QtGui.QDialogButtonBox.Ok)
        buttons.rejected.connect(self.reject)
        buttons.accepted.connect(self._accept)
        layout.addWidget(buttons)

        self.setWindowTitle(le2mtrans(u"Head and Tail"))
        self.adjustSize()
        self.setFixedSize(self.size())

    def _accept(self):
        if self._widheadtail.ui.pushButton_start.isEnabled():
            QtGui.QMessageBox.warning(self, le2mtrans(u"Warning"),
                                      le2mtrans(u"You must play"))
            return
        self.accept()

    def get_value(self):
        return self._widheadtail.get_value()
Example #3
0
class DHeadtail(QtGui.QDialog):
    def __init__(self, parent):
        super(DHeadtail, self).__init__(parent)

        layout = QtGui.QVBoxLayout(self)
        self._widheadtail = WHeadtail(parent=self)
        layout.addWidget(self._widheadtail)

        buttons = QtGui.QDialogButtonBox(
            QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Ok)
        buttons.rejected.connect(self.reject)
        buttons.accepted.connect(self._accept)
        layout.addWidget(buttons)

        self.setWindowTitle(le2mtrans(u"Head and Tail"))
        self.adjustSize()
        self.setFixedSize(self.size())

    def _accept(self):
        if self._widheadtail.ui.pushButton_start.isEnabled():
            QtGui.QMessageBox.warning(
                self, le2mtrans(u"Warning"),
                le2mtrans(u"You must play"))
            return
        self.accept()

    def get_value(self):
        return self._widheadtail.get_value()
Example #4
0
    def __init__(self, parent):
        super(DHeadtail, self).__init__(parent)

        layout = QtGui.QVBoxLayout(self)
        self._widheadtail = WHeadtail(parent=self)
        layout.addWidget(self._widheadtail)

        buttons = QtGui.QDialogButtonBox(
            QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Ok)
        buttons.rejected.connect(self.reject)
        buttons.accepted.connect(self._accept)
        layout.addWidget(buttons)

        self.setWindowTitle(le2mtrans(u"Head and Tail"))
        self.adjustSize()
        self.setFixedSize(self.size())