QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
Public Member Functions | List of all members
QgsModelViewRectangularRubberBand Class Reference

QgsModelViewRectangularRubberBand is rectangular rubber band for use within QgsModelGraphicsView widgets. More...

#include <qgsmodelviewrubberband.h>

Inheritance diagram for QgsModelViewRectangularRubberBand:
Inheritance graph
[legend]

Public Member Functions

 QgsModelViewRectangularRubberBand (QgsModelGraphicsView *view=nullptr)
 Constructor for QgsModelViewRectangularRubberBand. More...
 
 ~QgsModelViewRectangularRubberBand () override
 
QgsModelViewRectangularRubberBandcreate (QgsModelGraphicsView *view) const override
 Creates a new instance of the QgsModelViewRubberBand subclass. More...
 
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 model 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 model coordinate space). More...
 
- Public Member Functions inherited from QgsModelViewRubberBand
 QgsModelViewRubberBand (QgsModelGraphicsView *view=nullptr)
 Constructor for QgsModelViewRubberBand. More...
 
 ~QgsModelViewRubberBand () override=default
 
QBrush brush () const
 Returns the brush used for drawing the rubber band. More...
 
virtual QgsModelViewRubberBandcreate (QgsModelGraphicsView *view) const =0
 Creates a new instance of the QgsModelViewRubberBand subclass. 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 model 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 model coordinate space). More...
 
QgsModelGraphicsView * view () const
 Returns the view associated with the rubber band. More...
 

Additional Inherited Members

- Signals inherited from QgsModelViewRubberBand
void sizeChanged (const QString &size)
 Emitted when the size of the rubber band is changed. More...
 
- Protected Member Functions inherited from QgsModelViewRubberBand
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

QgsModelViewRectangularRubberBand is rectangular rubber band for use within QgsModelGraphicsView widgets.

Since
QGIS 3.14

Definition at line 144 of file qgsmodelviewrubberband.h.

Constructor & Destructor Documentation

◆ QgsModelViewRectangularRubberBand()

QgsModelViewRectangularRubberBand::QgsModelViewRectangularRubberBand ( QgsModelGraphicsView *  view = nullptr)

Constructor for QgsModelViewRectangularRubberBand.

Definition at line 117 of file qgsmodelviewrubberband.cpp.

◆ ~QgsModelViewRectangularRubberBand()

QgsModelViewRectangularRubberBand::~QgsModelViewRectangularRubberBand ( )
override

Definition at line 127 of file qgsmodelviewrubberband.cpp.

Member Function Documentation

◆ create()

QgsModelViewRectangularRubberBand * QgsModelViewRectangularRubberBand::create ( QgsModelGraphicsView *  view) const
overridevirtual

Creates a new instance of the QgsModelViewRubberBand subclass.

Implements QgsModelViewRubberBand.

Definition at line 122 of file qgsmodelviewrubberband.cpp.

◆ finish()

QRectF QgsModelViewRectangularRubberBand::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 QgsModelViewRubberBand.

Definition at line 167 of file qgsmodelviewrubberband.cpp.

◆ start()

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

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

Implements QgsModelViewRubberBand.

Definition at line 136 of file qgsmodelviewrubberband.cpp.

◆ update()

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

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

Implements QgsModelViewRubberBand.

Definition at line 150 of file qgsmodelviewrubberband.cpp.


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