QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
Protected Member Functions | Protected Attributes | List of all members
QgsPlotCanvasItem Class Referenceabstract

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

#include <qgsplotcanvasitem.h>

Inheritance diagram for QgsPlotCanvasItem:
Inheritance graph
[legend]

Protected Member Functions

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

Protected Attributes

QgsPlotCanvasmCanvas = nullptr
 Associated canvas. More...
 

Detailed Description

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

Since
QGIS 3.26

Definition at line 38 of file qgsplotcanvasitem.h.

Constructor & Destructor Documentation

◆ QgsPlotCanvasItem()

QgsPlotCanvasItem::QgsPlotCanvasItem ( QgsPlotCanvas canvas)
protected

Constructor for QgsPlotCanvasItem for the specified canvas.

Definition at line 21 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 30 of file qgsplotcanvasitem.cpp.

Member Data Documentation

◆ mCanvas

QgsPlotCanvas* QgsPlotCanvasItem::mCanvas = nullptr
protected

Associated canvas.

Definition at line 71 of file qgsplotcanvasitem.h.


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