ui.components

Contents

ui.components#

Subpackages#

Submodules#

Package Contents#

Classes#

AccountProgress

This mixin class provides

AddMenu

Dropdown menu class.

MessageConfirmDialog

Dialog class.

FollowerDialog

Dialog class.

FollowingDialog

Dialog class.

HashtagDialog

Dialog class.

MainMenu

Dropdown menu class.

ManualDialog

Dialog class.

MessageMenu

Dropdown menu class.

MessageProgress

Card class.

NewAccountPopup

Dialog class.

UserCard

Represents an user card on the welcome screen.

class ui.components.AccountProgress(**kw)#

Bases: kivy.uix.behaviors.ButtonBehavior, kivy.uix.floatlayout.FloatLayout, kivymd.theming.ThemableBehavior

This mixin class provides Button behavior. Please see the button behaviors module documentation for more information.

Events:
on_press

Fired when the button is pressed.

on_release

Fired when the button is released (i.e. the touch/click that pressed the button goes away).

loading#
tasks#

List of tasks to be completed. Stores the task name and its current state. Acts as the reference for all tasks

popup#

Stores the popup object

popup_shown#

Stores whether the popup is shown or not

overall_progress#
on_touch_down(touch)#

Receive a touch down event.

Parameters:
touch: MotionEvent class

Touch received. The touch is in parent coordinates. See relativelayout for a discussion on coordinate systems.

Returns:

bool If True, the dispatching of the touch event will stop. If False, the event will continue to be dispatched to the rest of the widget tree.

on_loading(*args)#

Called when the loading property is changed

check_if_can_add_task(task_name: str)#

Checks if a task can be added to the list of tasks

add_task(task: ast.Dict)#

Adds a task to the list of tasks

get_task(name: str)#

Gets a task from the list of tasks

update_task(name: str, progress: int, max: int)#

Updates a task progress in the list of tasks

on_tasks(*args)#

Used to update the summary progress UI

on_release()#

Opens menu to show progress of tasks

open_menu()#
close_menu()#

Closes the menu

clear_finished_tasks()#

Clears all the finished tasks

cancel_all_tasks()#

Cancels all the tasks

class ui.components.AddMenu(followers, following, hashtag, manual, importfile, **kwargs)#

Bases: kivymd.uix.menu.MDDropdownMenu

Dropdown menu class.

For more information, see in the MotionDropDownMenuBehavior and StencilBehavior and MDCard classes documentation.

Events:
on_release

The method that will be called when you click menu items.

class ui.components.MessageConfirmDialog(callback, **kwargs)#

Bases: kivymd.uix.dialog.MDDialog

Dialog class.

For more information, see in the ThemableBehavior and ModalView and CommonElevationBehavior classes documentation.

content_cls#

Stores the content of the dialog

ok_button#

Stores the ok button

cancel_button#

Stores the cancel button

callback#

Stores the callback function to be called when the user confirms the dialog

enable_button(*args)#

Enables the ok button only when there is text in the password fields

on_confirm(*args)#

Called when the user confirms the dialog

class ui.components.FollowerDialog(session, username, **kwargs)#

Bases: kivymd.uix.dialog.MDDialog

Dialog class.

For more information, see in the ThemableBehavior and ModalView and CommonElevationBehavior classes documentation.

content_cls: FollowerPopupContent#
ok_button: kivymd.uix.button.MDRaisedButton#
cancel_button: kivymd.uix.button.MDFlatButton#
total_followers#
selected_followers#
loading#
load_total_followers()#

Runs on a background thread and loads the total number of followers this account has

update_text(text, *args)#

Updates the text of the label

class ui.components.FollowingDialog(session, username, **kwargs)#

Bases: kivymd.uix.dialog.MDDialog

Dialog class.

For more information, see in the ThemableBehavior and ModalView and CommonElevationBehavior classes documentation.

content_cls: FollowingDialogContent#
ok_button: kivymd.uix.button.MDRaisedButton#
cancel_button: kivymd.uix.button.MDFlatButton#
total_following#
selected_following#
loading#
load_total_followee()#

Runs on a background thread and loads the total number of followers this account has

update_text(text, *args)#

Updates the text of the label

class ui.components.HashtagDialog(**kwargs)#

Bases: kivymd.uix.dialog.MDDialog

Dialog class.

For more information, see in the ThemableBehavior and ModalView and CommonElevationBehavior classes documentation.

class ui.components.MainMenu(export, settings, launch_instance, about, switch_user, **kwargs)#

Bases: kivymd.uix.menu.MDDropdownMenu

Dropdown menu class.

For more information, see in the MotionDropDownMenuBehavior and StencilBehavior and MDCard classes documentation.

Events:
on_release

The method that will be called when you click menu items.

class ui.components.ManualDialog(**kwargs)#

Bases: kivymd.uix.dialog.MDDialog

Dialog class.

For more information, see in the ThemableBehavior and ModalView and CommonElevationBehavior classes documentation.

content_cls: ManualDialogContent#
ok_button: kivymd.uix.button.MDRaisedButton#
cancel_button: kivymd.uix.button.MDFlatButton#
update_ok_button(*args)#
class ui.components.MessageMenu(text, link, post, **kwargs)#

Bases: kivymd.uix.menu.MDDropdownMenu

Dropdown menu class.

For more information, see in the MotionDropDownMenuBehavior and StencilBehavior and MDCard classes documentation.

Events:
on_release

The method that will be called when you click menu items.

class ui.components.MessageProgress(*args, **kwargs)#

Bases: kivymd.uix.card.MDCard

Card class.

For more information, see in the DeclarativeBehavior and MDAdaptiveWidget and ThemableBehavior and BackgroundColorBehavior and RectangularRippleBehavior and CommonElevationBehavior and FocusBehavior and BoxLayout and classes documentation.

class ui.components.NewAccountPopup(**kwargs)#

Bases: kivymd.uix.dialog.MDDialog

Dialog class.

For more information, see in the ThemableBehavior and ModalView and CommonElevationBehavior classes documentation.

content_cls: NewAccountPopupContent#
ok_button: kivymd.uix.button.MDRaisedButton#
cancel_button: kivymd.uix.button.MDFlatButton#
class ui.components.UserCard(username, profile_pic_url, userid, delete_callback, **kwargs)#

Bases: kivymd.uix.card.MDCard, kivy.uix.behaviors.ButtonBehavior

Represents an user card on the welcome screen. Displays data such as username, last active and profile picture

username: kivy.properties.StringProperty#
profile_pic_url: kivy.properties.StringProperty#
userid: kivy.properties.NumericProperty#
delete_callback#