link editTemplates button, but hide for now

This commit is contained in:
Damien Elmes 2010-11-30 03:51:13 +09:00
parent 5945ecd115
commit 8e8cd73d5d

View file

@ -48,6 +48,8 @@ class CardLayout(QDialog):
return return
self.form = ankiqt.forms.clayout.Ui_Dialog() self.form = ankiqt.forms.clayout.Ui_Dialog()
self.form.setupUi(self) self.form.setupUi(self)
# FIXME: add this
self.form.editTemplates.hide()
self.connect(self.form.buttonBox, SIGNAL("helpRequested()"), self.connect(self.form.buttonBox, SIGNAL("helpRequested()"),
self.onHelp) self.onHelp)
self.setupCards() self.setupCards()
@ -74,6 +76,8 @@ class CardLayout(QDialog):
self.form.templateLayout.addWidget(w, r[0], r[1]) self.form.templateLayout.addWidget(w, r[0], r[1])
self.connect(self.form.cardList, SIGNAL("activated(int)"), self.connect(self.form.cardList, SIGNAL("activated(int)"),
self.cardChanged) self.cardChanged)
# self.connect(self.form.editTemplates, SIGNAL("clicked())"),
# self.onEdit)
self.connect(self.form.cardQuestion, SIGNAL("textChanged()"), self.connect(self.form.cardQuestion, SIGNAL("textChanged()"),
lambda: self.formatChanged("question")) lambda: self.formatChanged("question"))
self.connect(self.form.cardAnswer, SIGNAL("textChanged()"), self.connect(self.form.cardAnswer, SIGNAL("textChanged()"),
@ -117,11 +121,10 @@ class CardLayout(QDialog):
fmt = re.sub("{{(.+?)}}", "%(\\1)s", fmt) fmt = re.sub("{{(.+?)}}", "%(\\1)s", fmt)
return fmt return fmt
# def realCardModel(self, card): # def onEdit(self):
# # get on disk representation from detached object # ui.modelproperties.ModelProperties(
# for cm in self.fact.model.cardModels: # self, self.deck, self.model, self.mw,
# if cm.id == card.cardModelId: # onFinish=self.updateModelsList)
# return cm
def formatChanged(self, type): def formatChanged(self, type):
if self.updatingCards: if self.updatingCards: