TaskColumn#

top.tui.column.TaskColumn class.

class TaskColumn[source]#

Bases: object

Column definition for task tables.

Describe how columns will look in the tak table.

__init__(name, accessor, width=None, max_width=None, dynamic_enable_function=None, colour_function=None)#
Parameters:
Return type:

None

Methods

__init__(name, accessor[, width, max_width, ...])

create_map(columns)

Convert list representation to column name -> column map.

Attributes

colour_function

Does this cell value special colours?

dynamic_enable_function

A function to checl if this column is enabled or not

max_width

width

Is this column fixed with

name

Human readable name

accessor

How to fill the value for this column based on the task.

name: str#

Human readable name

accessor: str#

How to fill the value for this column based on the task.

Extracts column value from Task instance. Dataclass field or accessor function name

width: Optional[int] = None#

Is this column fixed with

dynamic_enable_function: Optional[Callable] = None#

A function to checl if this column is enabled or not

Gets all table tasks as a parameter and checks if any of them warrants enabling this column.

colour_function: Optional[ColumnColourFunction] = None#

Does this cell value special colours?

static create_map(columns)[source]#

Convert list representation to column name -> column map.

Parameters:

columns (List[TaskColumn]) –

Return type:

Dict[str, TaskColumn]

__init__(name, accessor, width=None, max_width=None, dynamic_enable_function=None, colour_function=None)#
Parameters:
Return type:

None