Ejemplo n.º 1
0
 def __init__(self):
     # see http://lists.kde.org/?l=kde-games-devel&m=120071267328984&w=2
     super(MainWindow, self).__init__()
     Internal.app.aboutToQuit.connect(self.aboutToQuit)
     self.exitConfirmed = None
     self.exitReady = None
     self.exitWaitTime = None
     Internal.mainWindow = self
     self._scene = None
     self.centralView = None
     self.background = None
     self.playerWindow = None
     self.rulesetWindow = None
     self.confDialog = None
     self.__installReactor()
     if Options.gui:
         KStandardAction.preferences(self.showSettings,
                                     self.actionCollection())
         self.setupUi()
         self.setupGUI()
         Internal.Preferences.addWatch('tilesetName',
                                       self.tilesetNameChanged)
         Internal.Preferences.addWatch('backgroundName',
                                       self.backgroundChanged)
         self.retranslateUi()
         for action in self.toolBar().actions():
             if 'onfigure' in action.text():
                 action.setPriority(QAction.LowPriority)
         if Options.host and not Options.demo:
             self.scene = PlayingScene(self)
             HumanClient()
         StateSaver(self)
         self.show()
     else:
         HumanClient()
Ejemplo n.º 2
0
 def playingScene(self):
     """play a computer game: log into a server and show its tables"""
     self.scene = PlayingScene(self)
     HumanClient()