pyqt_reactive.widgets.shared.list_item_text_rendering
Structured text rendering and sizing for multiline list items.
Functions
|
Return whether a segment field path matches any styled field. |
Classes
|
Projection for one separated segment-list paint operation. |
|
Display syntax for a separated segment list. |
|
Named segment-list display styles. |
|
One structured text paint pass. |
Paints StyledTextLayout values without string parsing. |
|
Calculates size hints for structured and plain list-item text. |
|
|
Inputs shared by structured text painting helpers. |
- pyqt_reactive.widgets.shared.list_item_text_rendering.field_matches(path: str | None, field_set: Set[str]) → bool[source]
Return whether a segment field path matches any styled field.
- class pyqt_reactive.widgets.shared.list_item_text_rendering.TextPaintContext(dirty_fields: Set[str], sig_diff_fields: Set[str], base_font: QFont, name_color: QColor, preview_color: QColor)[source]
Inputs shared by structured text painting helpers.
- base_font: QFont
- name_color: QColor
- preview_color: QColor
- class pyqt_reactive.widgets.shared.list_item_text_rendering.StyledTextPaintRequest(painter: QPainter, layout: StyledTextLayout, context: TextPaintContext, x_start: int, y_offset: int, line_height: int)[source]
One structured text paint pass.
- painter: QPainter
- layout: StyledTextLayout
- context: TextPaintContext
- __init__(painter: QPainter, layout: StyledTextLayout, context: TextPaintContext, x_start: int, y_offset: int, line_height: int) → None
- class pyqt_reactive.widgets.shared.list_item_text_rendering.SegmentListPaintStyle(default_separator: str, prefix: str = '', suffix: str = '')[source]
Display syntax for a separated segment list.
- class pyqt_reactive.widgets.shared.list_item_text_rendering.SegmentListPaintStyleKey(*values)[source]
Named segment-list display styles.
- PARENTHESIZED_INLINE = SegmentListPaintStyle(default_separator=' | ', prefix=' (', suffix=')')
- PREVIEW = SegmentListPaintStyle(default_separator=' | ', prefix='', suffix='')
- CONFIG = SegmentListPaintStyle(default_separator=', ', prefix='configs=[', suffix=']')
- property style: SegmentListPaintStyle
- class pyqt_reactive.widgets.shared.list_item_text_rendering.SegmentListPaintSpec(segments: list[Segment], style_key: SegmentListPaintStyleKey)[source]
Projection for one separated segment-list paint operation.
- style_key: SegmentListPaintStyleKey
- property style: SegmentListPaintStyle
- __init__(segments: list[Segment], style_key: SegmentListPaintStyleKey) → None
- class pyqt_reactive.widgets.shared.list_item_text_rendering.StyledTextRenderer[source]
Paints StyledTextLayout values without string parsing.
- paint_layout(painter: QPainter, layout: StyledTextLayout, context: TextPaintContext, x_start: int, y_offset: int, line_height: int) → None[source]
Paint from structured layout.