Add unused add_button method

This commit is contained in:
Henrik Giesel 2020-08-23 15:28:43 +02:00
parent 5a4043524a
commit 0c3fad7386

View file

@ -72,6 +72,12 @@ class Models(QDialog):
f.modelsList.setCurrentRow(0) f.modelsList.setCurrentRow(0)
maybeHideClose(box) maybeHideClose(box)
def add_button(self, label: str, func: Callable[Any, None]) -> None:
box = self.form.buttonBox
button = box.addButton(_(label), QDialogButtonBox.ActionRole)
qconnect(button.clicked, func)
def onRename(self) -> None: def onRename(self) -> None:
nt = self.current_notetype() nt = self.current_notetype()
txt = getText(_("New name:"), default=nt["name"]) txt = getText(_("New name:"), default=nt["name"])