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"))
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)
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)
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))
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"))
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"))
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)
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)
def viewReplay(self): if self.name in client.instance.urls: replay(client.instance.urls[self.name])
def view_replay(self, url): replay(url)
def myTreeDoubleClicked(self, item, column): if item.isDisabled(): return if self.myTree.indexOfTopLevelItem(item) == -1: replay(item.filename)
def myTreeDoubleClicked(self, item): if item.isDisabled(): return if self.myTree.indexOfTopLevelItem(item) == -1: replay(item.replay_path())