aqt#
Submodules#
- aqt.about
- aqt.addcards
- aqt.addcards_legacy
- aqt.addons
- aqt.ankihub
- aqt.browser
- aqt.changenotetype
- aqt.clayout
- aqt.colors
- aqt.customstudy
- aqt.dbcheck
- aqt.debug_console
- aqt.deckbrowser
- aqt.deckchooser
- aqt.deckconf
- aqt.deckdescription
- aqt.deckoptions
- aqt.editcurrent
- aqt.editcurrent_legacy
- aqt.editor
- aqt.editor_legacy
- aqt.emptycards
- aqt.errors
- aqt.fields
- aqt.filtered_deck
- aqt.flags
- aqt.forms
- aqt.gui_hooks
- aqt.import_export
- aqt.legacy
- aqt.log
- aqt.main
- aqt.mediacheck
- aqt.mediasrv
- aqt.mediasync
- aqt.modelchooser
- aqt.models
- aqt.mpv
- aqt.notetypechooser
- aqt.operations
- aqt.overview
- aqt.package
- aqt.preferences
- aqt.profiles
- aqt.progress
- aqt.props
- aqt.qt
- aqt.reviewer
- aqt.schema_change_tracker
- aqt.sound
- aqt.stats
- aqt.studydeck
- aqt.stylesheets
- aqt.switch
- aqt.sync
- aqt.tagedit
- aqt.taglimit
- aqt.taskman
- aqt.theme
- aqt.toolbar
- aqt.tts
- aqt.undo
- aqt.update
- aqt.url_schemes
- aqt.utils
- aqt.webview
- aqt.widgetgallery
- aqt.winpaths
Attributes#
Classes#
Functions#
|
|
|
Returns (opts, args). |
|
Check whether Shift is held, without needing a QApplication. |
|
|
|
|
|
Package Contents#
- aqt.appVersion#
- aqt.appWebsite = 'https://apps.ankiweb.net/'#
- aqt.appWebsiteDownloadSection = 'https://apps.ankiweb.net/#download'#
- aqt.appDonate = 'https://docs.ankiweb.net/manual/contrib'#
- aqt.appUpdate = 'https://ankiweb.net/update/desktop'#
- aqt.appHelpSite = 'https://docs.ankiweb.net/manual/'#
- aqt.profiler: cProfile.Profile | None = None#
- aqt.mw: main.AnkiQt = None#
- class aqt.DialogManager#
- open(name: str, *args: Any, **kwargs: Any) Any#
- activeWindow() QWidget#
- getInstance(name: str)#
- markClosed(name: str) None#
- allClosed() bool#
- closeAll(onsuccess: collections.abc.Callable[[], None]) bool | None#
- register_dialog(name: str, creator: collections.abc.Callable | type, instance: Any | None = None) None#
Allows add-ons to register a custom dialog to be managed by Anki’s dialog manager, which ensures that only one copy of the window is open at once, and that the dialog cleans up asynchronously when the collection closes
Please note that dialogs added in this manner need to define a close behavior by either:
setting dialog.silentlyClose = True to have it close immediately
define a dialog.closeWithCallback() method that is called when closed by the dialog manager
TODO?: Implement more restrictive type check to ensure these requirements are met
- Arguments:
name {str} – Name/identifier of the dialog in question creator {Union[Callable, type]} – A class or function to create new
dialog instances with
- Keyword Arguments:
- instance {Optional[Any]} – An optional existing instance of the dialog
(default: {None})
- aqt.dialogs#
- aqt.setupLangAndBackend(pm: profiles.ProfileManager, app: QApplication, force: str | None = None, firstTime: bool = False) anki._backend.RustBackend#
- class aqt.NativeEventFilter#
Bases:
QAbstractNativeEventFilter- nativeEventFilter(eventType: Any, message: Any) tuple[bool, qt.sip.voidptr]#
- class aqt.AnkiApp(argv: list[str], force_safemode: bool = False)#
Bases:
QApplication- appMsg#
- KEY#
- TMOUT = 30000#
- safeMode#
- secondInstance() bool#
- sendMsg(txt: str) bool#
- onRecv() None#
- event(evt: QEvent | None) bool#
- eventFilter(src: Any, evt: QEvent | None) bool#
- aqt.parseArgs(argv: list[str]) tuple[argparse.Namespace, list[str]]#
Returns (opts, args).
- aqt.shift_held_before_app() bool#
Check whether Shift is held, without needing a QApplication.
Some video driver settings must be applied before the app is created, but QGuiApplication.queryKeyboardModifiers() only works once it exists. Returns False on platforms where this isn’t implemented, or if the check fails.
- aqt.setupGL(pm: profiles.ProfileManager, driver: profiles.VideoDriver | None = None) None#
- aqt.PROFILE_CODE#
- aqt.write_profile_results() None#
- aqt.run() None#