QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
Public Member Functions | List of all members
QgsPlotRectangularRubberBand Class Reference

QgsPlotRectangularRubberBand is rectangular rubber band for use within QgsPlotCanvas widgets. More...

#include <qgsplotrubberband.h>

Inheritance diagram for QgsPlotRectangularRubberBand:
Inheritance graph
[legend]

Public Member Functions

 QgsPlotRectangularRubberBand (QgsPlotCanvas *canvas=nullptr)
 Constructor for QgsPlotRectangularRubberBand. More...
 
 ~QgsPlotRectangularRubberBand () override
 
QRectF finish (QPointF position=QPointF(), Qt::KeyboardModifiers modifiers=Qt::KeyboardModifiers()) override
 Called when a rubber band use has finished and the rubber band is no longer required. More...
 
void start (QPointF position, Qt::KeyboardModifiers modifiers) override
 Called when a rubber band should be created at the specified starting position (in canvas coordinate space). More...
 
void update (QPointF position, Qt::KeyboardModifiers modifiers) override
 Called when a rubber band should be updated to reflect a temporary ending position (in canvas coordinate space). More...
 
- Public Member Functions inherited from QgsPlotRubberBand
 QgsPlotRubberBand (QgsPlotCanvas *canvas=nullptr)
 Constructor for QgsPlotRubberBand. More...
 
 ~QgsPlotRubberBand () override=default
 
QBrush brush () const
 Returns the brush used for drawing the rubber band. More...
 
QgsPlotCanvascanvas () const
 Returns the canvas associated with the rubber band. More...
 
virtual QRectF finish (QPointF position=QPointF(), Qt::KeyboardModifiers modifiers=Qt::KeyboardModifiers())=0
 Called when a rubber band use has finished and the rubber band is no longer required. More...
 
QPen pen () const
 Returns the pen used for drawing the rubber band. More...
 
void setBrush (const QBrush &brush)
 Sets the brush used for drawing the rubber band. More...
 
void setPen (const QPen &pen)
 Sets the pen used for drawing the rubber band. More...
 
virtual void start (QPointF position, Qt::KeyboardModifiers modifiers)=0
 Called when a rubber band should be created at the specified starting position (in canvas coordinate space). More...
 
virtual void update (QPointF position, Qt::KeyboardModifiers modifiers)=0
 Called when a rubber band should be updated to reflect a temporary ending position (in canvas coordinate space). More...
 

Additional Inherited Members

- Protected Member Functions inherited from QgsPlotRubberBand
QRectF updateRect (QPointF start, QPointF position, bool constrainSquare, bool fromCenter)
 Calculates an updated bounding box rectangle from a original start position and new position. More...
 

Detailed Description

QgsPlotRectangularRubberBand is rectangular rubber band for use within QgsPlotCanvas widgets.

Since
QGIS 3.26

Definition at line 128 of file qgsplotrubberband.h.

Constructor & Destructor Documentation

◆ QgsPlotRectangularRubberBand()

QgsPlotRectangularRubberBand::QgsPlotRectangularRubberBand ( QgsPlotCanvas canvas = nullptr)

Constructor for QgsPlotRectangularRubberBand.

Definition at line 121 of file qgsplotrubberband.cpp.

◆ ~QgsPlotRectangularRubberBand()

QgsPlotRectangularRubberBand::~QgsPlotRectangularRubberBand ( )
override

Definition at line 126 of file qgsplotrubberband.cpp.

Member Function Documentation

◆ finish()

QRectF QgsPlotRectangularRubberBand::finish ( QPointF  position = QPointF(),
Qt::KeyboardModifiers  modifiers = Qt::KeyboardModifiers() 
)
overridevirtual

Called when a rubber band use has finished and the rubber band is no longer required.

Returns the final bounding box of the rubber band.

Implements QgsPlotRubberBand.

Definition at line 166 of file qgsplotrubberband.cpp.

◆ start()

void QgsPlotRectangularRubberBand::start ( QPointF  position,
Qt::KeyboardModifiers  modifiers 
)
overridevirtual

Called when a rubber band should be created at the specified starting position (in canvas coordinate space).

Implements QgsPlotRubberBand.

Definition at line 135 of file qgsplotrubberband.cpp.

◆ update()

void QgsPlotRectangularRubberBand::update ( QPointF  position,
Qt::KeyboardModifiers  modifiers 
)
overridevirtual

Called when a rubber band should be updated to reflect a temporary ending position (in canvas coordinate space).

Implements QgsPlotRubberBand.

Definition at line 149 of file qgsplotrubberband.cpp.


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