mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
graph progress
This commit is contained in:
parent
383317d311
commit
00e0fb6c23
2 changed files with 8 additions and 2 deletions
|
@ -210,9 +210,12 @@ def intervalGraph(parent, deck):
|
|||
hbox = QHBoxLayout()
|
||||
|
||||
def showHideAll():
|
||||
deck.startProgress(_("Graphs"), 0, len(widgets))
|
||||
for w in widgets:
|
||||
deck.updateProgress(_("Preparing..."))
|
||||
w.showHide()
|
||||
frame.adjustSize()
|
||||
deck.finishProgress()
|
||||
|
||||
def onShowHideToggle(b, w):
|
||||
key = 'graphs.shown.' + w.name
|
||||
|
@ -247,9 +250,12 @@ def intervalGraph(parent, deck):
|
|||
QDesktopServices.openUrl(QUrl(ankiqt.appWiki + "Graphs"))
|
||||
|
||||
def onRefresh():
|
||||
deck.startProgress(_("Graphs"), 0, len(widgets))
|
||||
dg.stats = None
|
||||
for w in widgets:
|
||||
w.scheduleUpdate()
|
||||
deck.updateProgress(_("Preparing..."))
|
||||
w.updateFigure()
|
||||
deck.finishProgress()
|
||||
|
||||
showhide = QPushButton(_("Show/Hide"))
|
||||
hbox.addWidget(showhide)
|
||||
|
|
|
@ -205,7 +205,7 @@ class ProgressWin(object):
|
|||
|
||||
def update(self, label=None, value=None):
|
||||
self.app.processEvents()
|
||||
#print self.min, self.counter, self.max, label, time.time() - self.lastTime
|
||||
print self.min, self.counter, self.max, label, time.time() - self.lastTime
|
||||
self.lastTime = time.time()
|
||||
if label:
|
||||
self.diag.setLabelText(label)
|
||||
|
|
Loading…
Reference in a new issue