18 #ifndef QGSANNOTATIONITEM_H
19 #define QGSANNOTATIONITEM_H
56 virtual QSizeF minimumFrameSize()
const;
62 Qt::CursorShape cursorShapeForAction( MouseMoveAction moveAction )
const;
65 void setMapPositionFixed(
bool fixed );
68 virtual void setMapPosition(
const QgsPoint& pos );
71 void setFrameSize(
const QSizeF& size );
74 void setOffsetFromReferencePoint(
const QPointF& offset );
124 void updateBoundingRect();
126 void updateBalloon();
129 void drawMarkerSymbol(
QPainter* p );
130 void drawSelectionBoxes(
QPainter* p );
136 QPointF pointOnLineWithDistance(
const QPointF& startPoint,
const QPointF& directionPoint,
double distance )
const;
138 double scaledSymbolSize()
const;
141 #endif // QGSANNOTATIONITEM_H
QgsPoint mapPosition() const
QgsMarkerSymbolV2 * mMarkerSymbol
Point symbol that is to be drawn at the map reference location.
double mFrameBorderWidth
Width of the frame.
QPointF mOffsetFromReferencePoint
Describes the shift of the item content box to the reference point.
An abstract class for items that can be placed on the map canvas.
Map canvas is a class for displaying all GIS data types on a canvas.
void setFrameColor(const QColor &c)
QRectF mBoundingRect
Bounding rect (including item frame and balloon)
virtual QRectF boundingRect() const override
default implementation for canvas items
QPointF mBalloonSegmentPoint1
First segment point for drawing the connection (ccw direction)
QColor frameColor() const
void setFrameBorderWidth(double w)
const QgsMarkerSymbolV2 * markerSymbol() const
int mBalloonSegment
Segment number where the connection to the map point is attached.
A class to represent a point.
double frameBorderWidth() const
An annotation item can be either placed either on screen corrdinates or on map coordinates.
bool mMapPositionFixed
True: the item stays at the same map position, False: the item stays on same screen position...
QColor mFrameColor
Frame / balloon color.
QPointF offsetFromReferencePoint() const
QColor mFrameBackgroundColor
QPointF mBalloonSegmentPoint2
Second segment point for drawing the balloon connection (ccw direction)
Represents a vector layer which manages a vector based data sets.
QgsPoint mMapPosition
Map position (in case mMapPositionFixed is true)
virtual void updatePosition()
called on changed extent or resize event to update position of the item
QSizeF mFrameSize
Size of the frame (without balloon)
bool mapPositionFixed() const
QColor frameBackgroundColor() const
void setFrameBackgroundColor(const QColor &c)