17 #ifndef QGSANNOTATIONITEM_H
18 #define QGSANNOTATIONITEM_H
20 #include "qgis_core.h"
43 if ( sipCpp->type() == QLatin1String(
"marker" ) )
45 sipType = sipType_QgsAnnotationMarkerItem;
47 else if ( sipCpp->type() == QLatin1String(
"linestring" ) )
49 sipType = sipType_QgsAnnotationLineItem;
51 else if ( sipCpp->type() == QLatin1String(
"polygon" ) )
53 sipType = sipType_QgsAnnotationPolygonItem;
55 else if ( sipCpp->type() == QLatin1String(
"pointtext" ) )
57 sipType = sipType_QgsAnnotationPointTextItem;
90 virtual QString
type()
const = 0;
Abstract base class for annotation items which are drawn with QgsAnnotationLayers.
void setZIndex(int index)
Sets the item's z index, which controls the order in which annotation items are rendered in the layer...
virtual bool writeXml(QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context) const =0
Writes the item's state into an XML element.
virtual QgsRectangle boundingBox() const =0
Returns the bounding box of the item's geographic location, in the parent layer's coordinate referenc...
virtual QString type() const =0
Returns a unique (untranslated) string identifying the type of item.
virtual void render(QgsRenderContext &context, QgsFeedback *feedback)=0
Renders the item to the specified render context.
virtual bool readXml(const QDomElement &element, const QgsReadWriteContext &context)=0
Reads the item's state from the given DOM element.
QgsAnnotationItem(const QgsAnnotationItem &other)=delete
QgsAnnotationItem cannot be copied.
QgsAnnotationItem & operator=(const QgsAnnotationItem &other)=delete
QgsAnnotationItem cannot be copied.
virtual QgsAnnotationItem * clone()=0
Returns a clone of the item.
int zIndex() const
Returns the item's z index, which controls the order in which annotation items are rendered in the la...
virtual ~QgsAnnotationItem()=default
QgsAnnotationItem()=default
Constructor for an annotation item.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
A line symbol type, for rendering LineString and MultiLineString geometries.
A marker symbol type, for rendering Point and MultiPoint geometries.
The class is used as a container of context for various read/write operations on other objects.
A rectangle specified with double values.
Contains information about the context of a rendering operation.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)