def updating(self): me = self.client.players[self.client.login] if me.league is not None: self.leagues.setCurrentIndex(me.league - 1) else: self.leagues.setCurrentIndex(0) self.client.statsServer.send( dict(command="stats", type="league_table", league=1)) if self.loaded: return self.loaded = True self.webview.setVisible(False) #If a local theme CSS exists, skin the WebView with it if util.themeurl("ladder/style.css"): self.webview.settings().setUserStyleSheetUrl( util.themeurl("ladder/style.css")) self.webview.setUrl( QtCore.QUrl( "http://content.faforever.com/faf/leaderboards/read-leader.php?board=1v1&username=%s" % me.login))
def reloadView(self): if (self.loaded): return self.loaded = True self.ui.setVisible(False) #If a local theme CSS exists, skin the WebView with it if util.themeurl("vault/style.css"): self.ui.settings().setUserStyleSheetUrl(util.themeurl("vault/style.css")) self.ui.setUrl(QtCore.QUrl("http://content.faforever.com/faf/vault/maps.php?username={user}&pwdhash={pwdhash}".format(user=self.client.login, pwdhash=self.client.password)))
def reloadView(self): if (self.loaded): return self.loaded = True self.ui.setVisible(False) #If a local theme CSS exists, skin the WebView with it if util.themeurl("vault/style.css"): self.ui.settings().setUserStyleSheetUrl( util.themeurl("vault/style.css")) self.ui.setUrl( QtCore.QUrl( "http://content.faforever.com/faf/vault/maps.php?username={user}&pwdhash={pwdhash}" .format(user=self.client.login, pwdhash=self.client.password)))
def updating(self): self.client.statsServer.send(dict(command="stats", type="ladder_maps")) if self.client.getUserLeague(self.client.login) : self.leagues.setCurrentIndex(self.client.getUserLeague(self.client.login)["league"]-1) else : self.leagues.setCurrentIndex(0) self.client.statsServer.send(dict(command="stats", type="league_table", league=1)) if (self.loaded): return self.loaded = True self.webview.setVisible(False) #If a local theme CSS exists, skin the WebView with it if util.themeurl("ladder/style.css"): self.webview.settings().setUserStyleSheetUrl(util.themeurl("ladder/style.css")) self.webview.setUrl(QtCore.QUrl("http://faforever.com/faf/leaderboards/read-leader.php?board=global&username=%s" % (self.client.login)))
def updating(self): me = self.client.players[self.client.login] if me.league is not None: self.leagues.setCurrentIndex(me.league - 1) else: self.leagues.setCurrentIndex(0) self.client.statsServer.send(dict(command="stats", type="league_table", league=1)) if self.loaded: return self.loaded = True self.webview.setVisible(False) # If a local theme CSS exists, skin the WebView with it if util.themeurl("ladder/style.css"): self.webview.settings().setUserStyleSheetUrl(util.themeurl("ladder/style.css")) self.webview.setUrl( QtCore.QUrl( "http://content.faforever.com/faf/leaderboards/read-leader.php?board=1v1&username=%s" % me.login ) )