QGIS API Documentation 3.99.0-Master (21b3aa880ba)
Loading...
Searching...
No Matches
QgsPlotCanvasItem Class Referenceabstract

An abstract class for items that can be placed on a QgsPlotCanvas. More...

#include <qgsplotcanvasitem.h>

Inheritance diagram for QgsPlotCanvasItem:

Protected Member Functions

 QgsPlotCanvasItem (QgsPlotCanvas *canvas)
 Constructor for QgsPlotCanvasItem for the specified canvas.
 ~QgsPlotCanvasItem () override
virtual void paint (QPainter *painter)=0
 Paints the item.
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr) override

Protected Attributes

QgsPlotCanvasmCanvas = nullptr
 Associated canvas.

Detailed Description

An abstract class for items that can be placed on a QgsPlotCanvas.

Since
QGIS 3.26

Definition at line 39 of file qgsplotcanvasitem.h.

Constructor & Destructor Documentation

◆ QgsPlotCanvasItem()

QgsPlotCanvasItem::QgsPlotCanvasItem ( QgsPlotCanvas * canvas)
protected

Constructor for QgsPlotCanvasItem for the specified canvas.

Definition at line 22 of file qgsplotcanvasitem.cpp.

◆ ~QgsPlotCanvasItem()

QgsPlotCanvasItem::~QgsPlotCanvasItem ( )
overrideprotecteddefault

Member Function Documentation

◆ paint() [1/2]

virtual void QgsPlotCanvasItem::paint ( QPainter * painter)
protectedpure virtual

Paints the item.

Must be implemented by derived classes.

◆ paint() [2/2]

void QgsPlotCanvasItem::paint ( QPainter * painter,
const QStyleOptionGraphicsItem * option,
QWidget * widget = nullptr )
overrideprotected

Definition at line 31 of file qgsplotcanvasitem.cpp.

Member Data Documentation

◆ mCanvas

QgsPlotCanvas* QgsPlotCanvasItem::mCanvas = nullptr
protected

Associated canvas.

Definition at line 68 of file qgsplotcanvasitem.h.


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