QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsLayoutViewRectangularRubberBand Class Reference

QgsLayoutViewRectangularRubberBand is rectangular rubber band for use within QgsLayoutView widgets. More...

#include <qgslayoutviewrubberband.h>

Inheritance diagram for QgsLayoutViewRectangularRubberBand:
Inheritance graph
[legend]

Public Member Functions

 QgsLayoutViewRectangularRubberBand (QgsLayoutView *view=nullptr)
 Constructor for QgsLayoutViewRectangularRubberBand.
 
 ~QgsLayoutViewRectangularRubberBand () override
 
QgsLayoutViewRectangularRubberBandcreate (QgsLayoutView *view) const override
 Creates a new instance of the QgsLayoutViewRubberBand subclass.
 
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 layout 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 layout coordinate space).
 
- Public Member Functions inherited from QgsLayoutViewRubberBand
 QgsLayoutViewRubberBand (QgsLayoutView *view=nullptr)
 Constructor for QgsLayoutViewRubberBand.
 
 ~QgsLayoutViewRubberBand () override=default
 
QBrush brush () const
 Returns the brush used for drawing the rubber band.
 
QgsLayoutlayout () const
 Returns the layout 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.
 
QgsLayoutViewview () const
 Returns the view associated with the rubber band.
 

Additional Inherited Members

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

QgsLayoutViewRectangularRubberBand is rectangular rubber band for use within QgsLayoutView widgets.

Definition at line 152 of file qgslayoutviewrubberband.h.

Constructor & Destructor Documentation

◆ QgsLayoutViewRectangularRubberBand()

QgsLayoutViewRectangularRubberBand::QgsLayoutViewRectangularRubberBand ( QgsLayoutView view = nullptr)

Constructor for QgsLayoutViewRectangularRubberBand.

Definition at line 125 of file qgslayoutviewrubberband.cpp.

◆ ~QgsLayoutViewRectangularRubberBand()

QgsLayoutViewRectangularRubberBand::~QgsLayoutViewRectangularRubberBand ( )
override

Definition at line 135 of file qgslayoutviewrubberband.cpp.

Member Function Documentation

◆ create()

QgsLayoutViewRectangularRubberBand * QgsLayoutViewRectangularRubberBand::create ( QgsLayoutView view) const
overridevirtual

Creates a new instance of the QgsLayoutViewRubberBand subclass.

Implements QgsLayoutViewRubberBand.

Definition at line 130 of file qgslayoutviewrubberband.cpp.

◆ finish()

QRectF QgsLayoutViewRectangularRubberBand::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 QgsLayoutViewRubberBand.

Definition at line 177 of file qgslayoutviewrubberband.cpp.

◆ start()

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

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

Implements QgsLayoutViewRubberBand.

Definition at line 144 of file qgslayoutviewrubberband.cpp.

◆ update()

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

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

Implements QgsLayoutViewRubberBand.

Definition at line 158 of file qgslayoutviewrubberband.cpp.


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