QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
17 #ifndef QGSANNOTATIONITEM_H
18 #define QGSANNOTATIONITEM_H
20 #include "qgis_core.h"
47 if ( sipCpp->type() == QLatin1String(
"marker" ) )
49 sipType = sipType_QgsAnnotationMarkerItem;
51 else if ( sipCpp->type() == QLatin1String(
"linestring" ) )
53 sipType = sipType_QgsAnnotationLineItem;
55 else if ( sipCpp->type() == QLatin1String(
"polygon" ) )
57 sipType = sipType_QgsAnnotationPolygonItem;
59 else if ( sipCpp->type() == QLatin1String(
"pointtext" ) )
61 sipType = sipType_QgsAnnotationPointTextItem;
91 virtual Qgis::AnnotationItemFlags flags()
const;
105 virtual QString type()
const = 0;
133 virtual bool writeXml( QDomElement &element, QDomDocument &document,
const QgsReadWriteContext &context )
const = 0;
143 virtual bool readXml(
const QDomElement &element,
const QgsReadWriteContext &context ) = 0;
180 virtual QList< QgsAnnotationItemNode > nodes()
const;
247 bool writeCommonProperties( QDomElement &element, QDomDocument &document,
const QgsReadWriteContext &context )
const;
255 bool readCommonProperties(
const QDomElement &element,
const QgsReadWriteContext &context );
261 bool mUseReferenceScale =
false;
262 double mReferenceScale = 0;
270 #endif // QGSANNOTATIONITEM_H
bool useSymbologyReferenceScale() const
Returns true if the annotation item uses a symbology reference scale.
The class is used as a container of context for various read/write operations on other objects.
Contains information about the context of a rendering operation.
virtual QgsRectangle boundingBox(QgsRenderContext &context) const
Returns the bounding box of the item's geographic location, in the parent layer's coordinate referenc...
A rectangle specified with double values.
AnnotationItemEditOperationResult
Results from an edit operation on an annotation item.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
A marker symbol type, for rendering Point and MultiPoint geometries.
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.
Abstract base class for annotation item edit operations.
int zIndex() const
Returns the item's z index, which controls the order in which annotation items are rendered in the la...
Contains information about a node used for editing an annotation item.
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
void setSymbologyReferenceScale(double scale)
Sets the annotation's symbology reference scale.
double symbologyReferenceScale() const
Returns the annotation's symbology reference scale.
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.
Encapsulates the transient results of an in-progress annotation edit operation.
void setUseSymbologyReferenceScale(bool enabled)
Sets whether the annotation item uses a symbology reference scale.