18#ifndef QGSANNOTATIONPICTUREITEM_H
19#define QGSANNOTATIONPICTUREITEM_H
42 QString
type()
const override;
57 QString
path()
const {
return mPath; }
77 bool lockAspectRatio()
const;
84 void setLockAspectRatio(
bool locked );
94 bool mLockAspectRatio =
true;
PictureFormat
Picture formats.
@ Unknown
Invalid or unknown image type.
virtual bool writeXml(QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context) const =0
Writes the item's state into an XML element.
virtual QString type() const =0
Returns a unique (untranslated) string identifying the type of item.
virtual bool readXml(const QDomElement &element, const QgsReadWriteContext &context)=0
Reads the item's state from the given DOM element.
virtual QgsAnnotationItem * clone() const =0
Returns a clone of the item.
An annotation item which renders a picture.
Qgis::PictureFormat format() const
Returns the picture format.
QString path() const
Returns the path of the image used to render the item.
~QgsAnnotationPictureItem() override
QgsAnnotationPictureItem(Qgis::PictureFormat format, const QString &path, const QgsRectangle &bounds)
Constructor for QgsAnnotationPictureItem, rendering the specified image path within the specified bou...
static QgsAnnotationPictureItem * create()
Creates a new polygon annotation item.
virtual void renderInBounds(QgsRenderContext &context, const QRectF &painterRect, QgsFeedback *feedback)=0
Renders the item to the specified render context.
QgsRectangle bounds() const
Returns the bounds of the item.
QgsAnnotationRectItem(const QgsRectangle &bounds)
Constructor for QgsAnnotationRectItem, rendering the annotation within the specified bounds geometry.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
A container for the context for various read/write operations on objects.
A rectangle specified with double values.
Contains information about the context of a rendering operation.