Class: QgsScrollBarHighlightController¶
- class qgis.gui.QgsScrollBarHighlightController¶
Bases:
sip.wrapper
Adds highlights (colored markers) to a scrollbar.
Added in version 3.38:
Methods
Adds a
highlight
to the scrollbar.Returns the line height for text associated with the scroll area.
Returns the document margins for the associated viewport.
Removes all highlights from the scroll bar.
Removes all highlights with matching
category
from the scrollbar.Returns the associated scroll area.
Returns the associated scroll bar.
Sets the line
height
for text associated with the scroll area.Sets the document
margin
for the associated viewport.Sets the associated scroll bar.
Sets the visible range of the scroll area (i.e. the viewport's height).
Returns the visible range of the scroll area (i.e. the viewport's height).
- addHighlight(self, highlight: QgsScrollBarHighlight)¶
Adds a
highlight
to the scrollbar.- Parameters:
highlight (QgsScrollBarHighlight)
- lineHeight(self) float ¶
Returns the line height for text associated with the scroll area.
See also
- Return type:
float
- margin(self) float ¶
Returns the document margins for the associated viewport.
See also
- Return type:
float
- removeAllHighlights(self)¶
Removes all highlights from the scroll bar.
- removeHighlights(self, category: int)¶
Removes all highlights with matching
category
from the scrollbar.- Parameters:
category (int)
- scrollArea(self) QAbstractScrollArea | None ¶
Returns the associated scroll area.
See also
- Return type:
Optional[QAbstractScrollArea]
- scrollBar(self) QScrollBar | None ¶
Returns the associated scroll bar.
- Return type:
Optional[QScrollBar]
- setLineHeight(self, height: float)¶
Sets the line
height
for text associated with the scroll area.See also
- Parameters:
height (float)
- setMargin(self, margin: float)¶
Sets the document
margin
for the associated viewport.See also
- Parameters:
margin (float)
- setScrollArea(self, scrollArea: QAbstractScrollArea | None)¶
Sets the associated scroll bar.
See also
- Parameters:
scrollArea (Optional[QAbstractScrollArea])
- setVisibleRange(self, visibleRange: float)¶
Sets the visible range of the scroll area (i.e. the viewport’s height).
See also
- Parameters:
visibleRange (float)
- visibleRange(self) float ¶
Returns the visible range of the scroll area (i.e. the viewport’s height).
See also
- Return type:
float