QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
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;
141 #endif // QGSANNOTATIONITEM_H
virtual ~QgsAnnotationItem()=default
QgsAnnotationItem()=default
Constructor for an annotation item.
The class is used as a container of context for various read/write operations on other objects.
virtual bool readXml(const QDomElement &element, const QgsReadWriteContext &context)=0
Reads the item's state from the given DOM element.
Contains information about the context of a rendering operation.
virtual QgsAnnotationItem * clone()=0
Returns a clone of the item.
A rectangle specified with double values.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
A marker symbol type, for rendering Point and MultiPoint geometries.
virtual bool writeXml(QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context) const =0
Writes the item's state into an XML element.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
A line symbol type, for rendering LineString and MultiLineString geometries.
virtual void render(QgsRenderContext &context, QgsFeedback *feedback)=0
Renders the item to the specified render context.
int zIndex() const
Returns the item's z index, which controls the order in which annotation items are rendered in the la...
virtual QgsRectangle boundingBox() const =0
Returns the bounding box of the item's geographic location, in the parent layer's coordinate referenc...
QgsAnnotationItem & operator=(const QgsAnnotationItem &other)=delete
QgsAnnotationItem cannot be copied.
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
void setZIndex(int index)
Sets the item's z index, which controls the order in which annotation items are rendered in the layer...
Abstract base class for annotation items which are drawn with QgsAnnotationLayers.
virtual QString type() const =0
Returns a unique (untranslated) string identifying the type of item.