Пример #1
0
    def __init__(self, parent):
        super(DConfiguration, self).__init__(parent)

        layout = QtGui.QVBoxLayout(self)
        treats = [v.upper() for k, v in sorted(pms.TREATMENTS.viewitems())]
        self._widtreat = WCombo(
            label=texts_OL.trans_OL(u"Treatment"), items=treats,
            parent=self)
        layout.addWidget(self._widtreat)

        self._widgame = WCombo(
            label=texts_OL.trans_OL(u"Select the game"),
            items=map(str, sorted(pms.CODES_PERIODES.viewkeys())), parent=self)
        self._widgame.ui.comboBox.setCurrentIndex(pms.GAME - 1)
        layout.addWidget(self._widgame)

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

        self.setWindowTitle(le2mtrans(u"Configure"))
        self.adjustSize()
        self.setFixedSize(self.size())
    def __init__(self, defered, automatique, parent):
        DQuestFinal.__init__(self, defered, automatique, parent)

        politics = [v for k, v in sorted(texts_PGGS.POLITICS.items())]
        politics.insert(0, le2mtrans(u"Choose"))
        politics.append(le2mtrans(u"Not in the list above"))
        self._politics = WCombo(
            parent=self,
            automatique=self._automatique,
            label=texts_PGGS.trans_PGGS(
                u"Politically, you feel yourself in line with"),
            items=politics)
        self._gridlayout.addWidget(self._politics, 6, 1)

        self._risk = WRadio(parent=self,
                            automatique=self._automatique,
                            label=texts_PGGS.get_text_risk(),
                            texts=map(str, range(11)))
        self._gridlayout.addWidget(self._risk, 7, 0, 1, 3)

        self._inequality = WRadio(parent=self,
                                  automatique=self._automatique,
                                  label=texts_PGGS.get_text_inequality(),
                                  texts=map(str, range(11)))

        self._gridlayout.addWidget(self._inequality, 8, 0, 1, 3)

        self.setMinimumSize(0, 0)
        self.setMaximumSize(16777215, 16777215)
        self.adjustSize()
        self.setFixedSize(self.size())
Пример #3
0
    def __init__(self, parent=None):
        super(DConfigure, self).__init__(parent)

        layout = QtGui.QVBoxLayout(self)

        game = pms.get_game()
        gamekeys = game.keys()
        gamekeys.sort()
        self._widgame = WCombo(label=u"Jeu",
                               items=[game[k] for k in gamekeys],
                               parent=self)
        self._game = pms.GAME
        self._widgame.ui.comboBox.setCurrentIndex(self._game)
        layout.addWidget(self._widgame)

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

        self.setWindowTitle(u"Configuration")
        self.adjustSize()
        self.setFixedSize(self.size())
Пример #4
0
    def __init__(self, parent=None):
        super(GuiConfigure, self).__init__(parent)

        layout = QtGui.QVBoxLayout(self)

        self._widpayoffs = WCombo(
            label=trans_GP(u"Display summary (with payoffs)?"),
            items=(trans_GP(u"No"), trans_GP(u"Yes")),
            parent=self)
        layout.addWidget(self._widpayoffs)

        button = QtGui.QDialogButtonBox(QtGui.QDialogButtonBox.Ok)
        button.accepted.connect(self.accept)
        layout.addWidget(button)

        self.setWindowTitle(trans_GP(u"Configure"))
        self.adjustSize()
        self.setFixedSize(self.size())