16 #ifndef QGSLAYOUTVIEWRUBBERBAND_H
17 #define QGSLAYOUTVIEWRUBBERBAND_H
26 class QGraphicsRectItem;
27 class QGraphicsEllipseItem;
28 class QGraphicsPolygonItem;
45 sipType = sipType_QgsLayoutViewMouseEvent;
69 virtual void start( QPointF position, Qt::KeyboardModifiers modifiers ) = 0;
75 virtual void update( QPointF position, Qt::KeyboardModifiers modifiers ) = 0;
82 virtual QRectF
finish( QPointF position = QPointF(), Qt::KeyboardModifiers modifiers = Qt::KeyboardModifiers() ) = 0;
101 QBrush brush()
const;
108 void setBrush(
const QBrush &brush );
122 void setPen(
const QPen &pen );
142 QRectF updateRect( QPointF start, QPointF position,
bool constrainSquare,
bool fromCenter );
148 QBrush mBrush = Qt::NoBrush;
149 QPen mPen = QPen( QBrush( QColor( 227, 22, 22, 200 ) ), 0 );
173 void start( QPointF position, Qt::KeyboardModifiers modifiers )
override;
174 void update( QPointF position, Qt::KeyboardModifiers modifiers )
override;
175 QRectF
finish( QPointF position = QPointF(), Qt::KeyboardModifiers modifiers = Qt::KeyboardModifiers() )
override;
180 QGraphicsRectItem *mRubberBandItem =
nullptr;
183 QPointF mRubberBandStartPos;
206 void start( QPointF position, Qt::KeyboardModifiers modifiers )
override;
207 void update( QPointF position, Qt::KeyboardModifiers modifiers )
override;
208 QRectF
finish( QPointF position = QPointF(), Qt::KeyboardModifiers modifiers = Qt::KeyboardModifiers() )
override;
213 QGraphicsEllipseItem *mRubberBandItem =
nullptr;
216 QPointF mRubberBandStartPos;
239 void start( QPointF position, Qt::KeyboardModifiers modifiers )
override;
240 void update( QPointF position, Qt::KeyboardModifiers modifiers )
override;
241 QRectF
finish( QPointF position = QPointF(), Qt::KeyboardModifiers modifiers = Qt::KeyboardModifiers() )
override;
246 QGraphicsPolygonItem *mRubberBandItem =
nullptr;
249 QPointF mRubberBandStartPos;
252 #endif // QGSLAYOUTVIEWRUBBERBAND_H