18 #ifndef QGSANNOTATIONITEM_H 19 #define QGSANNOTATIONITEM_H 57 virtual QSizeF minimumFrameSize()
const;
63 Qt::CursorShape cursorShapeForAction(
MouseMoveAction moveAction )
const;
66 void setMapPositionFixed(
bool fixed );
69 virtual void setMapPosition(
const QgsPoint& pos );
78 void setFrameSize(
QSizeF size );
81 void setOffsetFromReferencePoint(
QPointF offset );
134 void updateBoundingRect();
136 void updateBalloon();
139 void drawMarkerSymbol(
QPainter* p );
140 void drawSelectionBoxes(
QPainter* p );
146 QPointF pointOnLineWithDistance(
QPointF startPoint,
QPointF directionPoint,
double distance )
const;
148 double scaledSymbolSize()
const;
151 #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.
QgsCoordinateReferenceSystem mapPositionCrs() const
Returns the CRS of the map position.
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.
QgsCoordinateReferenceSystem mMapPositionCrs
CRS of the map position.
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.
Class for storing a coordinate reference system (CRS)
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)