taskbridgeapp.gui.viewmodel.notecheckbox.NoteCheckBox

class taskbridgeapp.gui.viewmodel.notecheckbox.NoteCheckBox(check_type, location, folder_name, associations, *args, **kwargs)

Bases: QTableWidgetItem

A 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

check

Set this checkbox to checked.

is_checked

Returns the check state of this checkbox.

load_check_state

Used to determine whether this checkbox should be checked or unchecked when settings are loaded from file.

reset_list

Remove all stored checkboxes.

uncheck

Set this checkbox to unchecked.

Attributes

CB_LIST

List of checkboxes in the notes table

CHECK_TYPES

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