18#ifndef QGSPLOTRUBBERBAND_H
19#define QGSPLOTRUBBERBAND_H
30class QGraphicsRectItem;
56 virtual void start( QPointF position, Qt::KeyboardModifiers modifiers ) = 0;
62 virtual void update( QPointF position, Qt::KeyboardModifiers modifiers ) = 0;
69 virtual QRectF
finish( QPointF position = QPointF(), Qt::KeyboardModifiers modifiers = Qt::KeyboardModifiers() ) = 0;
88 void setBrush(
const QBrush &brush );
102 void setPen(
const QPen &pen );
112 QRectF updateRect( QPointF start, QPointF position,
bool constrainSquare,
bool fromCenter );
118 QBrush mBrush = Qt::NoBrush;
119 QPen mPen = QPen( QBrush( QColor( 227, 22, 22, 200 ) ), 0 );
141 void start( QPointF position, Qt::KeyboardModifiers modifiers )
override;
142 void update( QPointF position, Qt::KeyboardModifiers modifiers )
override;
143 QRectF finish( QPointF position = QPointF(), Qt::KeyboardModifiers modifiers = Qt::KeyboardModifiers() )
override;
148 QGraphicsRectItem *mRubberBandItem =
nullptr;
151 QPointF mRubberBandStartPos;
Plot canvas is a class for displaying interactive 2d charts and plots.
QgsPlotRectangularRubberBand is rectangular rubber band for use within QgsPlotCanvas widgets.
QgsPlotRubberBand is an abstract base class for temporary rubber band items in various shapes,...
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.
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 coordin...
~QgsPlotRubberBand() override=default
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 ...