show # of decks using options group

This commit is contained in:
Damien Elmes 2012-04-22 00:07:22 +09:00
parent 003327bd73
commit 20dfa416d2
2 changed files with 17 additions and 0 deletions

View file

@ -79,6 +79,13 @@ class DeckConf(QDialog):
conf = self.confList[idx]
self.deck['conf'] = conf['id']
self.loadConf()
cnt = 0
for d in self.mw.col.decks.all():
if d['dyn']:
continue
if d['conf'] == conf['id']:
cnt += 1
self.form.count.setText(_("%d decks use this options group") % cnt)
def addGroup(self):
name = getOnlyText(_("New options group name:"))

View file

@ -55,6 +55,16 @@
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="count">
<property name="text">
<string>TextLabel</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">