spreadsheet_intelligence.models.converted package#
Submodules#
spreadsheet_intelligence.models.converted.base_models module#
- class spreadsheet_intelligence.models.converted.base_models.BaseDrawingConverted(raw_id: str, name: str, drawing_id: int)[source]#
Bases:
ABC
Base class for converted drawing objects.
- raw_id#
The raw identifier of the drawing.
- Type:
str
- name#
The name of the drawing.
- Type:
str
- drawing_id#
The unique identifier for the drawing.
- Type:
int
- raw_id: str#
- name: str#
- drawing_id: int#
- _abc_impl = <_abc._abc_data object>#
spreadsheet_intelligence.models.converted.drawing_models module#
- class spreadsheet_intelligence.models.converted.drawing_models.Connector(raw_id: str, name: str, drawing_id: int, arrow_type: ArrowType, head_pos: tuple[int, int], tail_pos: tuple[int, int], line_type: LineType, line_color: Color, line_width: int, head_type: str, tail_type: str)[source]#
Bases:
BaseDrawingConverted
Represents a connector with arrow and line properties.
- head_pos#
The position of the head.
- Type:
tuple[int, int]
- tail_pos#
The position of the tail.
- Type:
tuple[int, int]
- line_width#
The width of the line.
- Type:
int
- head_type#
The type of head.
- Type:
str
- tail_type#
The type of tail.
- Type:
str
- head_pos: tuple[int, int]#
- tail_pos: tuple[int, int]#
- line_width: int#
- head_type: str#
- tail_type: str#
- plot(ax: Axes) None [source]#
Plots a simple line representing the connector on the given axes.
- Parameters:
ax (plt.Axes) – The axes object where the connector will be plotted.
Note
This method currently plots a simple line without considering arrow types or line styles. Future implementation will include these features once the design specifications are finalized.
- _abc_impl = <_abc._abc_data object>#
- class spreadsheet_intelligence.models.converted.drawing_models.StraightConnector1(raw_id: str, name: str, drawing_id: int, arrow_type: ArrowType, head_pos: tuple[int, int], tail_pos: tuple[int, int], line_type: LineType, line_color: Color, line_width: int, head_type: str, tail_type: str)[source]#
Bases:
Connector
Represents a straight connector, inheriting from Connector.
- _abc_impl = <_abc._abc_data object>#
- class spreadsheet_intelligence.models.converted.drawing_models.BentConnector3(raw_id: str, name: str, drawing_id: int, arrow_type: ArrowType, head_pos: tuple[int, int], tail_pos: tuple[int, int], line_type: LineType, line_color: Color, line_width: int, head_type: str, tail_type: str, head_direction: FourDirection, tail_direction: FourDirection)[source]#
Bases:
Connector
Represents a bent connector with additional direction properties.
- head_direction: FourDirection#
- tail_direction: FourDirection#
- plot(ax: Axes) None [source]#
Plots a bent connector with additional features like direction arrows and IDs.
- Parameters:
ax (plt.Axes) – The axes object where the connector will be plotted.
Note
This method currently plots a simple line without considering arrow types or line styles. Future implementation will include these features once the design specifications are finalized.
- _plot_arrow(ax: Axes, position: tuple[int, int], direction: FourDirection, t: str) None [source]#
Plots an arrow at the given position and direction.
- Parameters:
ax (plt.Axes) – The axes object where the arrow will be plotted.
position (tuple[int, int]) – The coordinates of the arrow’s base.
direction (FourDirection) – The direction of the arrow.
t (str) – The type of arrow (‘head’ or ‘tail’).
Note
This method currently plots a simple arrow without considering arrow types or line styles. Future implementation will include these features once the design specifications are finalized.
- _abc_impl = <_abc._abc_data object>#
- class spreadsheet_intelligence.models.converted.drawing_models.Text(content: str, font_color: Color | None, font_size: int | None, alignment: str | None)[source]#
Bases:
object
Represents a text element with optional styling properties.
- content: str#
- font_size: int | None#
- alignment: str | None#
- class spreadsheet_intelligence.models.converted.drawing_models.Shape(raw_id: str, name: str, drawing_id: int, shape_type: ShapeType, fill_color: Color | None, border_color: Color | None, x: int, y: int, width: int, height: int, text: Text | None)[source]#
Bases:
BaseDrawingConverted
Represents a shape with properties for type, color, and dimensions.
- x: int#
- y: int#
- width: int#
- height: int#
- plot(ax: Axes) None [source]#
Plots a simple rectangle representing the shape on the given axes.
- Parameters:
ax (plt.Axes) – The axes object where the shape will be plotted.
Note
This method currently plots a simple rectangle without considering fill color or border color. Future implementation will include these features once the design specifications are finalized.
- _abc_impl = <_abc._abc_data object>#