18#ifndef QGSPLOTRUBBERBAND_H
19#define QGSPLOTRUBBERBAND_H
30class QGraphicsRectItem;
54 virtual void start( QPointF position, Qt::KeyboardModifiers modifiers ) = 0;
60 virtual void update( QPointF position, Qt::KeyboardModifiers modifiers ) = 0;
67 virtual QRectF
finish( QPointF position = QPointF(), Qt::KeyboardModifiers modifiers = Qt::KeyboardModifiers() ) = 0;
86 void setBrush(
const QBrush &brush );
100 void setPen(
const QPen &pen );
109 QRectF updateRect( QPointF start, QPointF position,
bool constrainSquare,
bool fromCenter );
114 QBrush mBrush = Qt::NoBrush;
115 QPen mPen = QPen( QBrush( QColor( 227, 22, 22, 200 ) ), 0 );
135 void start( QPointF position, Qt::KeyboardModifiers modifiers )
override;
136 void update( QPointF position, Qt::KeyboardModifiers modifiers )
override;
137 QRectF finish( QPointF position = QPointF(), Qt::KeyboardModifiers modifiers = Qt::KeyboardModifiers() )
override;
141 QGraphicsRectItem *mRubberBandItem =
nullptr;
144 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 ...