QGIS API Documentation 3.39.0-Master (be2050b798e)
No Matches
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

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.

QGIS 3.26

Definition at line 38 of file qgsplotcanvasitem.h.

Constructor & Destructor Documentation

◆ QgsPlotCanvasItem()

QgsPlotCanvasItem::QgsPlotCanvasItem ( QgsPlotCanvas canvas)

Constructor for QgsPlotCanvasItem for the specified canvas.

Definition at line 21 of file qgsplotcanvasitem.cpp.

◆ ~QgsPlotCanvasItem()

QgsPlotCanvasItem::~QgsPlotCanvasItem ( )

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 

Definition at line 30 of file qgsplotcanvasitem.cpp.

Member Data Documentation

◆ mCanvas

QgsPlotCanvas* QgsPlotCanvasItem::mCanvas = nullptr

Associated canvas.

Definition at line 71 of file qgsplotcanvasitem.h.

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