QGIS API Documentation 4.3.0-Master (e17dae1dea8)
Loading...
Searching...
No Matches
QgsRubberBandPreviewItem Class Referenceabstract

Abstract interface for rendering custom preview overlays attached to a QgsRubberBand. More...

#include <qgsrubberband.h>

Inheritance diagram for QgsRubberBandPreviewItem:

Public Member Functions

virtual ~QgsRubberBandPreviewItem ()=default
virtual QRectF boundingRect () const
 Returns the bounding rect required for drawing the preview item.
virtual void render (QgsRenderContext &context)=0
 Renders the custom preview overlay using the specified render context.
QgsRubberBandrubberBand ()
 Returns the rubber band associated with the item.

Protected Member Functions

 QgsRubberBandPreviewItem (QgsRubberBand *rubberBand)
 Constructor for a QgsRubberBandPreviewItem, attached to the specified rubberBand.

Detailed Description

Abstract interface for rendering custom preview overlays attached to a QgsRubberBand.

Since
QGIS 4.4

Definition at line 53 of file qgsrubberband.h.

Constructor & Destructor Documentation

◆ ~QgsRubberBandPreviewItem()

virtual QgsRubberBandPreviewItem::~QgsRubberBandPreviewItem ( )
virtualdefault

◆ QgsRubberBandPreviewItem()

QgsRubberBandPreviewItem::QgsRubberBandPreviewItem ( QgsRubberBand * rubberBand)
protected

Constructor for a QgsRubberBandPreviewItem, attached to the specified rubberBand.

Definition at line 857 of file qgsrubberband.cpp.

Member Function Documentation

◆ boundingRect()

QRectF QgsRubberBandPreviewItem::boundingRect ( ) const
virtual

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.

Reimplemented in QgsVectorLayerLabelRubberBandPreview.

Definition at line 866 of file qgsrubberband.cpp.

◆ render()

virtual void QgsRubberBandPreviewItem::render ( QgsRenderContext & context)
pure virtual

Renders the custom preview overlay using the specified render context.

Implemented in QgsVectorLayerLabelRubberBandPreview.

◆ rubberBand()

QgsRubberBand * QgsRubberBandPreviewItem::rubberBand ( )

Returns the rubber band associated with the item.

Definition at line 861 of file qgsrubberband.cpp.


The documentation for this class was generated from the following files: