18 #ifndef QGSPLOTRUBBERBAND_H
19 #define QGSPLOTRUBBERBAND_H
30 class 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;
155 #endif // QGSPLOTRUBBERBAND_H