CondetrolLaneExtensionProtocol

class caqtus.gui.condetrol.timelanes_editor.extension.CondetrolLaneExtensionProtocol(*args, **kwargs)

Bases: Protocol

Defines the operations necessary to extend Condetrol with new lanes.

available_new_lanes() set[str]

Return the new lanes that can be created.

This method is called when the user clicks on the “Add lane” button and needs to choose the type of lane to create.

create_new_lane(
lane_label: str,
steps: int,
) TimeLane

Create a new lane.

This method is called when the user wants to create a new lane. The label of the lane to create and the number of steps are passed as arguments.

get_lane_model(
lane: L,
name: str,
) TimeLaneModel[L]

Return the model for the given lane.

This method is called when a lane needs to be displayed. The returned model will be used to provide the data from the lane to the view.

get_lane_delegate(
lane: TimeLane,
lane_name: str,
) TimeLaneDelegate | None

Return a delegate for the given lane.

This method is called when a lane needs to be displayed. The returned delegate will be used to paint the lane cells in the view and to provide editing capabilities.

unstructure_time_lanes(
time_lanes: TimeLanes,
) JsonDict

Convert the time lanes to a serializable format.

structure_time_lanes(
content: JsonDict,
) TimeLanes

Convert the serializable format to time lanes.