Class: QgsRubberBandPreviewItem¶
Abstract interface for rendering custom preview overlays attached to a
QgsRubberBand.
Added in version 4.4.
Note
This is an abstract class, with methods which must be implemented by a subclass.
The following methods must be implemented: render()
List of all members, including inherited members
Constructor
Abstract Methods
Renders the custom preview overlay using the specified render context. |
Methods
Returns the rubber band associated with the item. |
Virtual Methods
In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsRubberBandPreviewItem. See the FAQ for more details.
Returns the bounding rect required for drawing the preview item. |
- class qgis.gui.QgsRubberBandPreviewItem[source]¶
Bases:
object- __init__(rubberBand: QgsRubberBand | None)¶
Constructor for a QgsRubberBandPreviewItem, attached to the specified
rubberBand.- Parameters:
rubberBand (Optional[QgsRubberBand])
- __init__(a0: QgsRubberBandPreviewItem)
- Parameters:
- virtual boundingRect(self) QRectF[source]¶
Returns the bounding rect required for drawing the preview item.
If non-empty, these bounds will be combined with the parent rubber band’s bounds in order to avoid graphical artifacts when the band is moved.
The default implementation returns an empty rect.
- Return type:
QRectF
- abstract render(self, context: QgsRenderContext)[source]¶
Renders the custom preview overlay using the specified render
context.- Parameters:
context (QgsRenderContext)
- rubberBand(self) QgsRubberBand | None[source]¶
Returns the rubber band associated with the item.
- Return type: