pysepal.sepalwidgets.btn.TaskButton#
- class pysepal.sepalwidgets.btn.TaskButton(*args, **kwargs)[source]#
Custom toggle button using a to start and cancel a task.
Initialize the TaskButton with Vue component.
- Parameters:
label (str) – Initial button text
cancel_text (str) – Text to show when task is running
original_color (str) – Button color when not running
cancel_color (str) – Button color when running
original_icon (str) – Icon when not running
cancel_icon (str) – Icon when running
show_loading (bool) – Whether to show loading spinner when running
small (bool) – Make button small
x_small (bool) – Make button extra small
large (bool) – Make button large
x_large (bool) – Make button extra large
block (bool) – Make button full width (block-level)
**kwargs – Additional VuetifyTemplate arguments
Attributes
blockA boolean (True, False) trait.
cancel_colorA trait for unicode strings.
cancel_iconA trait for unicode strings.
cancel_textA trait for unicode strings.
disabledA boolean (True, False) trait.
is_runningA boolean (True, False) trait.
largeA boolean (True, False) trait.
original_colorA trait for unicode strings.
original_iconA trait for unicode strings.
original_textA trait for unicode strings.
show_loadingA boolean (True, False) trait.
smallA boolean (True, False) trait.
template_fileA trait for unicode strings.
x_largeA boolean (True, False) trait.
x_smallA boolean (True, False) trait.
Methods
Initialize the TaskButton with Vue component.
Provide (or update) the factory and args for the task anytime before starting.
Handle button click from Vue component.
- TaskButton.__init__(label='Start Task', cancel_text='Cancel', original_color='primary', cancel_color='error', original_icon='', cancel_icon='mdi-close', show_loading=True, small=False, x_small=False, large=False, x_large=False, block=False, **kwargs)[source]#
Initialize the TaskButton with Vue component.
- Parameters:
label (str) – Initial button text
cancel_text (str) – Text to show when task is running
original_color (str) – Button color when not running
cancel_color (str) – Button color when running
original_icon (str) – Icon when not running
cancel_icon (str) – Icon when running
show_loading (bool) – Whether to show loading spinner when running
small (bool) – Make button small
x_small (bool) – Make button extra small
large (bool) – Make button large
x_large (bool) – Make button extra large
block (bool) – Make button full width (block-level)
**kwargs – Additional VuetifyTemplate arguments