taskbridgeapp.gui.viewmodel.notecheckbox.NoteCheckBox
- class taskbridgeapp.gui.viewmodel.notecheckbox.NoteCheckBox(check_type, location, folder_name, associations, *args, **kwargs)
Bases:
QTableWidgetItemA checkbox in the notes table. Implements logic as follows:
If ‘local_to_remote’ or ‘remote_to_local’ are checked alone, ‘bidirectional’ is unchecked.
If ‘local_to_remote’ or ‘remote_to_local’ are both checked, they are unchecked and ‘bidirectional’ is checked.
If ‘bidirectional’ is checked, all other checkboxes are unchecked.
Methods
Set this checkbox to checked.
Returns the check state of this checkbox.
Used to determine whether this checkbox should be checked or unchecked when settings are loaded from file.
Remove all stored checkboxes.
Set this checkbox to unchecked.
Attributes
List of checkboxes in the notes table
Types of checkboxes in the notes table
__display_name____name____orig_bases____sphinx_decorator_args____sphinx_mock__- CB_LIST: List[NoteCheckBox] = []
List of checkboxes in the notes table
- CHECK_TYPES = ['local_to_remote', 'remote_to_local', 'bi_directional']
Types of checkboxes in the notes table
- __call__(*args, **kwargs)
Call self as a function.
- Return type:
Any
- __init__(check_type, location, folder_name, associations, *args, **kwargs)
Initialises the note checkbox.
- Parameters:
check_type (
str) – the type of checkbox from :py:att``CHECK_TYPES`` above.location (
str) – whether this checkbox represents a ‘local’ or ‘remote’ folder.folder_name (
str) – the name of the folder this checkbox represents.associations (
dict) – a dictionary of folder associations as chosen by the user.
- check()
Set this checkbox to checked.
- Return type:
None
- is_checked()
Returns the check state of this checkbox.
- Return type:
bool- Returns:
True if this checkbox is checked.
- load_check_state()
Used to determine whether this checkbox should be checked or unchecked when settings are loaded from file.
- Return type:
None
- static reset_list()
Remove all stored checkboxes.
- Return type:
None
- uncheck()
Set this checkbox to unchecked.
- Return type:
None