mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -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()
|
hbox = QHBoxLayout()
|
||||||
|
|
||||||
def showHideAll():
|
def showHideAll():
|
||||||
|
deck.startProgress(_("Graphs"), 0, len(widgets))
|
||||||
for w in widgets:
|
for w in widgets:
|
||||||
|
deck.updateProgress(_("Preparing..."))
|
||||||
w.showHide()
|
w.showHide()
|
||||||
frame.adjustSize()
|
frame.adjustSize()
|
||||||
|
deck.finishProgress()
|
||||||
|
|
||||||
def onShowHideToggle(b, w):
|
def onShowHideToggle(b, w):
|
||||||
key = 'graphs.shown.' + w.name
|
key = 'graphs.shown.' + w.name
|
||||||
|
@ -247,9 +250,12 @@ def intervalGraph(parent, deck):
|
||||||
QDesktopServices.openUrl(QUrl(ankiqt.appWiki + "Graphs"))
|
QDesktopServices.openUrl(QUrl(ankiqt.appWiki + "Graphs"))
|
||||||
|
|
||||||
def onRefresh():
|
def onRefresh():
|
||||||
|
deck.startProgress(_("Graphs"), 0, len(widgets))
|
||||||
dg.stats = None
|
dg.stats = None
|
||||||
for w in widgets:
|
for w in widgets:
|
||||||
w.scheduleUpdate()
|
deck.updateProgress(_("Preparing..."))
|
||||||
|
w.updateFigure()
|
||||||
|
deck.finishProgress()
|
||||||
|
|
||||||
showhide = QPushButton(_("Show/Hide"))
|
showhide = QPushButton(_("Show/Hide"))
|
||||||
hbox.addWidget(showhide)
|
hbox.addWidget(showhide)
|
||||||
|
|
|
@ -205,7 +205,7 @@ class ProgressWin(object):
|
||||||
|
|
||||||
def update(self, label=None, value=None):
|
def update(self, label=None, value=None):
|
||||||
self.app.processEvents()
|
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()
|
self.lastTime = time.time()
|
||||||
if label:
|
if label:
|
||||||
self.diag.setLabelText(label)
|
self.diag.setLabelText(label)
|
||||||
|
|
Loading…
Reference in a new issue