Пример #1
0
 def finishRequest(self, reply):
     faf_replay = QtCore.QFile(os.path.join(util.CACHE_DIR, "temp.fafreplay"))
     faf_replay.open(QtCore.QIODevice.WriteOnly | QtCore.QIODevice.Truncate)                
     faf_replay.write(reply.readAll())
     faf_replay.flush()
     faf_replay.close()  
     replay(os.path.join(util.CACHE_DIR, "temp.fafreplay"))
Пример #2
0
 def openUrl(self, url):
     logger.debug("Clicked on URL: " + url.toString())
     if url.scheme() == "faflive":
         replay(url)
     elif url.scheme() == "fafgame":
         self.lobby.client.joinGameFromURL(url)
     else :
         QtGui.QDesktopServices.openUrl(url)
Пример #3
0
 def openUrl(self, url):
     logger.debug("Clicked on URL: " + url.toString())
     if url.scheme() == "faflive":
         replay(url)
     elif url.scheme() == "fafgame":
         self.lobby.client.joinGameFromURL(url)
     else:
         QtGui.QDesktopServices.openUrl(url)
Пример #4
0
    def _startReplay(self, name):
        if name is None or name not in self._playerset:
            return
        player = self._playerset[name]

        if not player.currentGame:
            return
        replay(player.currentGame.url(player.id))
Пример #5
0
 def finishRequest(self, reply):
     faf_replay = QtCore.QFile(
         os.path.join(util.CACHE_DIR, "temp.fafreplay"))
     faf_replay.open(QtCore.QIODevice.WriteOnly | QtCore.QIODevice.Truncate)
     faf_replay.write(reply.readAll())
     faf_replay.flush()
     faf_replay.close()
     replay(os.path.join(util.CACHE_DIR, "temp.fafreplay"))
Пример #6
0
 def finishRequest(self, reply):
     if reply.error() != QNetworkReply.NoError:
         QtGui.QMessageBox.warning(self, "Network Error", reply.errorString())
     else:
         faf_replay = QtCore.QFile(os.path.join(util.CACHE_DIR, "temp.fafreplay"))
         faf_replay.open(QtCore.QIODevice.WriteOnly | QtCore.QIODevice.Truncate)                
         faf_replay.write(reply.readAll())
         faf_replay.flush()
         faf_replay.close()  
         replay(os.path.join(util.CACHE_DIR, "temp.fafreplay"))
Пример #7
0
    def liveTreeDoubleClicked(self, item):
        """ This slot launches a live replay from eligible items in liveTree """

        if item.isDisabled():
            return

        if self.liveTree.indexOfTopLevelItem(item) == -1:
            # Notify other modules that we're watching a replay
            self.client.viewingReplay.emit(item.url)
            replay(item.url)
Пример #8
0
 def finishRequest(self, reply):
     if reply.error() != QNetworkReply.NoError:
         QtGui.QMessageBox.warning(self, "Network Error", reply.errorString())
     else:
         faf_replay = QtCore.QFile(os.path.join(util.CACHE_DIR, "temp.fafreplay"))
         faf_replay.open(QtCore.QIODevice.WriteOnly | QtCore.QIODevice.Truncate)                
         faf_replay.write(reply.readAll())
         faf_replay.flush()
         faf_replay.close()  
         replay(os.path.join(util.CACHE_DIR, "temp.fafreplay"))
Пример #9
0
 def liveTreeDoubleClicked(self, item, column):
     '''
     This slot launches a live replay from eligible items in liveTree
     '''
     if item.isDisabled():
         return
     
     if self.liveTree.indexOfTopLevelItem(item) == -1:
         # Notify other modules that we're watching a replay
         self.client.viewingReplay.emit(item.url)
         replay(item.url)
Пример #10
0
 def viewReplay(self):
     if self.name in client.instance.urls:
         replay(client.instance.urls[self.name])
Пример #11
0
 def viewReplay(self):
     if self.name in client.instance.urls:
         replay(client.instance.urls[self.name])
Пример #12
0
 def view_replay(self, url):
     replay(url)
Пример #13
0
    def myTreeDoubleClicked(self, item, column):
        if item.isDisabled():
            return

        if self.myTree.indexOfTopLevelItem(item) == -1:
            replay(item.filename)
Пример #14
0
    def myTreeDoubleClicked(self, item, column):
        if item.isDisabled():
            return

        if self.myTree.indexOfTopLevelItem(item) == -1:
            replay(item.filename)
Пример #15
0
    def myTreeDoubleClicked(self, item):
        if item.isDisabled():
            return

        if self.myTree.indexOfTopLevelItem(item) == -1:
            replay(item.replay_path())