QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
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.
 
 ~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.
 
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).
 
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).
 
- Public Member Functions inherited from QgsPlotRubberBand
 QgsPlotRubberBand (QgsPlotCanvas *canvas=nullptr)
 Constructor for QgsPlotRubberBand.
 
 ~QgsPlotRubberBand () override=default
 
QBrush brush () const
 Returns the brush used for drawing the rubber band.
 
QgsPlotCanvascanvas () const
 Returns the canvas associated with the rubber band.
 
QPen pen () const
 Returns the pen used for drawing the rubber band.
 
void setBrush (const QBrush &brush)
 Sets the brush used for drawing the rubber band.
 
void setPen (const QPen &pen)
 Sets the pen used for drawing the rubber band.
 

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.
 

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 122 of file qgsplotrubberband.cpp.

◆ ~QgsPlotRectangularRubberBand()

QgsPlotRectangularRubberBand::~QgsPlotRectangularRubberBand ( )
override

Definition at line 127 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 167 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 136 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 150 of file qgsplotrubberband.cpp.


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