aqt.models#

Classes#

Module Contents#

class aqt.models.Models(mw: aqt.AnkiQt, parent: QWidget | None = None, fromMain: bool = False, selected_notetype_id: anki.models.NotetypeId | None = None)#

Bases: QDialog

mw#
fromMain = False#
selected_notetype_id = None#
col#
mm#
form#
models: collections.abc.Sequence[anki.models.NotetypeNameIdUseCount] = []#
maybe_select_provided_notetype(selected_notetype_id: anki.models.NotetypeId | None = None, row: int = 0) None#

Select the provided notetype ID, if any. Otherwise the one at self.selected_notetype_id, otherwise the row-th element.

setupModels() None#
refresh_list(selected_notetype_id: anki.models.NotetypeId | None = None) None#
onRename() None#
updateModelsList(notetypes: collections.abc.Sequence[anki.models.NotetypeNameIdUseCount], selected_notetype_id: anki.models.NotetypeId | None = None) None#
current_notetype() anki.models.NotetypeDict#
onAdd() None#
onDelete() None#
onAdvanced() None#
onFields() None#
onCards() None#
reject() None#
class aqt.models.AddModel(mw: aqt.AnkiQt, on_success: collections.abc.Callable[[anki.models.NotetypeDict], None], parent: QWidget | None = None)#

Bases: QDialog

model: anki.models.NotetypeDict | None#
parent_#
mw#
col#
dialog#
notetypes: list[anki.models.NotetypeDict | collections.abc.Callable[[anki.collection.Collection], anki.models.NotetypeDict]] = []#
on_success#
reject() None#
accept() None#
onHelp() None#