Dialogs¶
Provides CustomDialog and ReplacementItemsContent.
-
class
acg.custom_widgets.dialogs.CustomContentBase[source]¶ Base-class to be used for instances of
CustomDialog.content_cls.
-
class
acg.custom_widgets.dialogs.CustomDialog(**kwargs)[source]¶ Bases:
kivymd.uix.dialog.MDDialogCustom dialog.
StringPropertydefaults to"DialogButton".
ListPropertydefaults to["OK", "CANCEL"].
-
callback[source]¶ ObjectPropertydefaults toNone.
Call
CustomDialog.callback().The arguments are the text of the pressed button and the result of
content_cls.``get_result``.
-
class
acg.custom_widgets.dialogs.ItemsContent(**kwargs)[source]¶ Bases:
acg.custom_widgets.scroll_widgets.ScrollList,acg.custom_widgets.dialogs.CustomContentBaseScrollable list of items.
Items dispatch
on_press-events and itself dispatcheson_item_pressevent.
-
class
acg.custom_widgets.dialogs.ReplacementDialog(**kwargs)[source]¶ Bases:
acg.custom_widgets.dialogs.CustomDialogDialog with optional replacements.
-
class
acg.custom_widgets.dialogs.ReplacementItem(**kwargs)[source]¶ Bases:
kivy.uix.behaviors.ButtonBehavior,kivy.uix.boxlayout.BoxLayoutItem displaying a word (
word) and a possible replacement (lemma).lemmacan be edited and the selection of word vs replacement switches on click.-
edit[source]¶ BooleanPropertydefaults toFalse. WhileTruethelemmacan be edited.
-
lemma[source]¶ StringPropertydefaults to"".
-
take_lemma[source]¶ BooleanPropertydefaults toFalse. Indicates user choice.
-
word[source]¶ StringPropertydefaults to"".
-
-
class
acg.custom_widgets.dialogs.ReplacementItemsContent(**kwargs)[source]¶ Bases:
acg.custom_widgets.dialogs.ItemsContentContent for the ReplacementDialog.
-
child_class_name[source]¶ StringPropertydefaults to"ReplacementItem".
-
-
class
acg.custom_widgets.dialogs.ScrollList(**kwargs)[source]¶ Bases:
acg.custom_widgets.behaviors.ChildrenFromDataBehavior,kivy.uix.scrollview.ScrollViewScrollable List whose items are constructed as instances of
item_typefromitem_dicts.Automatically updates upon change of
item_dicts.-
data¶ ListPropertycontaining the dictionaries from which the items are constructed.
-
list¶ ObjectPropertyset toMDList. Contains the items.
-
-
class
acg.custom_widgets.dialogs.TextFieldContent(**kwargs)[source]¶ Bases:
acg.custom_widgets.dialogs.CustomContentBase,kivy.uix.boxlayout.BoxLayoutkivy.uix.BoxLayoutcontaining akivymd.uix.MDTextField.For use as:attr:kivymd.uix.dialog.content_cls.
-
class
acg.custom_widgets.dialogs.TextInputDialog(**kwargs)[source]¶ Bases:
acg.custom_widgets.dialogs.CustomDialogDialog with one text field.
-
default_text[source]¶ defaults to “”, the default text entry in the :~kivymd.uix.MDTextField:.
Type: StringProperty
-