mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -04:00
selective study option
This commit is contained in:
parent
88c7717537
commit
ff18c05fbf
2 changed files with 13 additions and 1 deletions
|
@ -87,6 +87,7 @@ class Config(dict):
|
||||||
'saveAfterAnswerNum': 10,
|
'saveAfterAnswerNum': 10,
|
||||||
'saveOnClose': True,
|
'saveOnClose': True,
|
||||||
'scrollToAnswer': True,
|
'scrollToAnswer': True,
|
||||||
|
'selectiveGraphs': True,
|
||||||
'showCardTimer': True,
|
'showCardTimer': True,
|
||||||
'showFontPreview': False,
|
'showFontPreview': False,
|
||||||
'showLastCardContent': False,
|
'showLastCardContent': False,
|
||||||
|
|
|
@ -161,7 +161,8 @@ class GraphWindow(object):
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.deck = deck
|
self.deck = deck
|
||||||
self.widgets = []
|
self.widgets = []
|
||||||
self.dg = anki.graphs.DeckGraphs(deck)
|
self.dg = anki.graphs.DeckGraphs(
|
||||||
|
deck, selective=self.parent.config['selectiveGraphs'])
|
||||||
self.diag = IntervalGraph(parent)
|
self.diag = IntervalGraph(parent)
|
||||||
self.diag.setWindowTitle(_("Deck Graphs"))
|
self.diag.setWindowTitle(_("Deck Graphs"))
|
||||||
if parent.config.get('graphsGeom'):
|
if parent.config.get('graphsGeom'):
|
||||||
|
@ -237,6 +238,11 @@ class GraphWindow(object):
|
||||||
self.onShowHide)
|
self.onShowHide)
|
||||||
refresh = QPushButton(_("Refresh"))
|
refresh = QPushButton(_("Refresh"))
|
||||||
self.hbox.addWidget(refresh)
|
self.hbox.addWidget(refresh)
|
||||||
|
sel = QCheckBox(_("Selective Study"))
|
||||||
|
self.hbox.addWidget(sel)
|
||||||
|
sel.setChecked(self.parent.config['selectiveGraphs'])
|
||||||
|
sel.connect(sel, SIGNAL("stateChanged(int)"),
|
||||||
|
self.onSelective)
|
||||||
self.showhide.connect(refresh, SIGNAL("clicked()"),
|
self.showhide.connect(refresh, SIGNAL("clicked()"),
|
||||||
self.onRefresh)
|
self.onRefresh)
|
||||||
buttonBox = QDialogButtonBox(self.diag)
|
buttonBox = QDialogButtonBox(self.diag)
|
||||||
|
@ -249,6 +255,11 @@ class GraphWindow(object):
|
||||||
self.onHelp)
|
self.onHelp)
|
||||||
self.hbox.addWidget(buttonBox)
|
self.hbox.addWidget(buttonBox)
|
||||||
|
|
||||||
|
def onSelective(self, bool):
|
||||||
|
self.parent.config['selectiveGraphs'] = bool
|
||||||
|
self.dg.selective = bool
|
||||||
|
self.onRefresh()
|
||||||
|
|
||||||
def showHideAll(self):
|
def showHideAll(self):
|
||||||
self.deck.startProgress(len(self.widgets))
|
self.deck.startProgress(len(self.widgets))
|
||||||
for w in self.widgets:
|
for w in self.widgets:
|
||||||
|
|
Loading…
Reference in a new issue