18#ifndef QGSMAPCANVASANNOTATIONITEM_H
19#define QGSMAPCANVASANNOTATIONITEM_H
47 sipType = sipType_QgsMapCanvasAnnotationItem;
95 void paint( QPainter *painter )
override;
100 MouseMoveAction moveActionForPosition( QPointF pos )
const;
105 Qt::CursorShape cursorShapeForAction( MouseMoveAction moveAction )
const;
109 void updateBoundingRect();
111 void onCanvasLayersChanged();
114 void setFeatureForMapPosition();
116 void annotationDeleted();
120 void drawSelectionBoxes( QPainter *p )
const;
123 double scaledSymbolSize()
const;
128 QRectF mBoundingRect;
Abstract base class for annotation items which are drawn over a map.
An interactive map canvas item which displays a QgsAnnotation.
const QgsAnnotation * annotation() const
Returns the item's annotation.
QgsMapCanvasAnnotationItem(QgsAnnotation *annotation, QgsMapCanvas *mapCanvas)
Constructor for QgsMapCanvasAnnotationItem.
QgsAnnotation * annotation()
Returns the item's annotation.
MouseMoveAction
Mouse actions for interacting with item.
@ ResizeFrameRight
Resize frame right.
@ ResizeFrameRightUp
Resize frame right up.
@ MoveFramePosition
Moving position of frame relative to annotation.
@ ResizeFrameUp
Resize frame up.
@ ResizeFrameRightDown
Resize frame right down.
@ MoveMapPosition
Moving annotation map position.
@ ResizeFrameDown
Resize frame down.
@ ResizeFrameLeftUp
Resize frame left up.
@ ResizeFrameLeft
Resize frame left.
@ ResizeFrameLeftDown
Resize frame left down.
QRectF boundingRect() const override
virtual void paint(QPainter *painter)=0
function to be implemented by derived classes
QgsMapCanvasItem(QgsMapCanvas *mapCanvas)
protected constructor: cannot be constructed directly
virtual void updatePosition()
called on changed extent or resize event to update position of the item
Map canvas is a class for displaying all GIS data types on a canvas.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)