History Screen

Implements HistoryMain, the root widget of the history screen.

class acg.screens.history.HistoryRoot(**kwargs)[source]

Bases: kivy.uix.floatlayout.FloatLayout

Root widget of the history screen.

click_on_item(self, item, *_)[source]

Open dropdown menu with item as caller.

static delete_item(item)[source]

Delete text from the current template in the data-base and from app.word_state_dict.

edit_item(self, item)[source]

Open text_input_dialog to edit the word.

static filter(*_)[source]

Placeholder-function.

static move_back_to_queue(item)[source]

Move item back to queue.

on_dropdown_item(self, item, *_)[source]

Call option corresponding to clicked item.

static sort(*_)[source]

Placeholder-function.

text_input_dialog_callback(self, button_txt, text)[source]

If the OK-button is pressed, delete old entry and add edited entry to queue.

class acg.screens.history.TextInputDialog(**kwargs)[source]

Bases: acg.custom_widgets.dialogs.CustomDialog

Dialog with one text field.

default_text

defaults to “”, the default text entry in the :~kivymd.uix.MDTextField:.

Type:StringProperty
acg.screens.history.app_busy(func)[source]

Call function in new thread and set app.busy = True in the meantime.

acg.screens.history.not_implemented_toast(*_)[source]

Display toast notifying user that the function is not implemented.

acg.screens.history.set_word_state(word, state)[source]

Set state in the data-base entry of the card of the current template.

acg.screens.history.widget_by_id(string)[source]

Get widget by string of ids, separated by “/”.

Parameters:string – Strings of ids, separated by “/”. The first one can be a screen name.
Returns:widget
Examples
>>> print(widget_by_id("single_word/word_prop").__name__)
MDApp.get_running_app().root.get_screen("single_word").children[
0].ids.word_prop