16 #ifndef QGSMODELVIEWRUBBERBAND_H
17 #define QGSMODELVIEWRUBBERBAND_H
27 class QgsModelGraphicsView;
28 class QGraphicsRectItem;
29 class QGraphicsEllipseItem;
30 class QGraphicsPolygonItem;
61 virtual void start( QPointF position, Qt::KeyboardModifiers modifiers ) = 0;
67 virtual void update( QPointF position, Qt::KeyboardModifiers modifiers ) = 0;
74 virtual QRectF
finish( QPointF position = QPointF(), Qt::KeyboardModifiers modifiers = Qt::KeyboardModifiers() ) = 0;
79 QgsModelGraphicsView *view()
const;
93 void setBrush(
const QBrush &brush );
107 void setPen(
const QPen &pen );
127 QRectF updateRect( QPointF start, QPointF position,
bool constrainSquare,
bool fromCenter );
131 QgsModelGraphicsView *mView =
nullptr;
133 QBrush mBrush = Qt::NoBrush;
134 QPen mPen = QPen( QBrush( QColor( 227, 22, 22, 200 ) ), 0 );
158 void start( QPointF position, Qt::KeyboardModifiers modifiers )
override;
159 void update( QPointF position, Qt::KeyboardModifiers modifiers )
override;
160 QRectF
finish( QPointF position = QPointF(), Qt::KeyboardModifiers modifiers = Qt::KeyboardModifiers() )
override;
165 QGraphicsRectItem *mRubberBandItem =
nullptr;
168 QPointF mRubberBandStartPos;
172 #endif // QGSMODELVIEWRUBBERBAND_H