sec_interp.gui.preview_legend_renderer module
Legend rendering logic for SecInterp preview.
Handles the drawing of the legend on a QPainter with configurable position, font size and item limit.
- class sec_interp.gui.preview_legend_renderer.PreviewLegendRenderer
Bases:
objectHandles drawing the map legend for the profile preview.
- static draw_legend(painter: qgis.PyQt.QtGui.QPainter, rect: qgis.PyQt.QtCore.QRectF, active_units: dict[str, qgis.PyQt.QtGui.QColor], has_topography: bool = False, has_structures: bool = False, has_drillholes: bool = False, labels: dict[str, str] | None = None, drill_units: dict[str, qgis.PyQt.QtGui.QColor] | None = None, interpretations: list | None = None, layout: dict[str, Any] | None = None, layer_colors: dict[str, qgis.PyQt.QtGui.QColor] | None = None) None
Build the legend rows from data and draw them.
- static draw_rows(painter: QPainter, rect: QRectF, rows: list[tuple[str, str, QColor | None]], layout: dict[str, Any] | None = None) None
Draw legend rows within
recthonoring the layout options.