Exemple #1
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())
Exemple #2
0
 def _configure(self):
     """
     Pour configure la partie (traitement ...)
     :return:
     """
     screen_config = DConfigure(self._le2mserv.gestionnaire_graphique.screen)
     if screen_config.exec_():
         pms.GAME = screen_config.get_game()
         self._le2mserv.gestionnaire_graphique.infoserv(u"Game {}".format(
             pms.get_game(pms.GAME)))
Exemple #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())