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)#
Methods
__init__
(name, accessor[, width, max_width, ...])create_map
(columns)Convert list representation to column name -> column map.
Attributes
Does this cell value special colours?
A function to checl if this column is enabled or not
max_width
Is this column fixed with
Human readable name
How to fill the value for this column based on the task.
- 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
- 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:
- __init__(name, accessor, width=None, max_width=None, dynamic_enable_function=None, colour_function=None)#