Main App¶
Contains the Main App AnkiCardGenApp.
-
class
acg.main.AnkiCardGenApp[source]¶ Bases:
kivymd.app.MDAppMain App.
-
bind_theme_cls_and_config(self)[source]¶ Bind
theme_clsand the correspondingConfigParserProperties.
-
get_anki_template_dir(self)[source]¶ Return absolute path where html-, css- and js-files for anki-card is located.
-
-
class
acg.main.MainMenu(**kwargs)[source]¶ Bases:
kivy.uix.stacklayout.StackLayoutContains everything related to the NavigationDrawer and the Screens.
-
get_item_text(self, screen)¶ Get the text of the
DrawerItemcorresponding to a screen.
-
static
get_right_action_items(screen)¶ Return
right_action_itemsattribute ofscreens root widget if present. Else return empty list.
-
get_screen(self, screen_name)¶ Return screen by name.
-
get_screen_names(self)¶ Return screen names.
-
on_dropdown_item(self, _, item)¶ Close menu and set app.current_template_name.
-
on_parent(self, *_)¶ Set up screen using
nameandpathfromscreen_dicts.The screens are added to the screen_man and corresponding entries to the drawer_list. Then
DrawerList.currentis bound to screen_man.current and vice-versa.
-
screen_dicts¶ ListPropertycontaining the dictionaries describing all screens.
-
set_screen(self, _=None, screen_name='')¶ Switch screens dynamically.
-