18#ifndef QGSANNOTATIONRECTANGLETEXTITEM_H
19#define QGSANNOTATIONRECTANGLETEXTITEM_H
44 QString
type()
const override;
61 QString
text()
const {
return mText; }
89 Qt::Alignment alignment()
const;
96 void setAlignment( Qt::Alignment alignment );
142 Qt::Alignment mAlignment = Qt::AlignLeft;
QFlags< AnnotationItemFlag > AnnotationItemFlags
Annotation item flags.
RenderUnit
Rendering size units.
@ Millimeters
Millimeters.
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 void renderInBounds(QgsRenderContext &context, const QRectF &painterRect, QgsFeedback *feedback)=0
Renders the item to the specified render context.
Qgis::AnnotationItemFlags flags() const override
Returns item flags.
QgsRectangle bounds() const
Returns the bounds of the item.
QgsAnnotationRectItem(const QgsRectangle &bounds)
Constructor for QgsAnnotationRectItem, rendering the annotation within the specified bounds geometry.
An annotation item which renders paragraphs of text within a rectangle.
void setMarginsUnit(Qgis::RenderUnit unit)
Sets the unit for the margins between the item's frame and the interior text.
QgsAnnotationRectangleTextItem * clone() const override
Returns a clone of the item.
static QgsAnnotationRectangleTextItem * create()
Creates a new rectangle text annotation item.
void setMargins(const QgsMargins &margins)
Sets the margins between the outside of the item's frame and the interior text.
QString text() const
Returns the text rendered by the item.
const QgsMargins & margins() const
Returns the margins between the outside of the item's frame and the interior text.
QgsAnnotationRectangleTextItem(const QString &text, const QgsRectangle &bounds)
Constructor for QgsAnnotationRectangleTextItem, containing the specified text within the specified bo...
bool readXml(const QDomElement &element, const QgsReadWriteContext &context) override
Reads the item's state from the given DOM element.
void setText(const QString &text)
Sets the text rendered by the item.
~QgsAnnotationRectangleTextItem() override
Qgis::RenderUnit marginsUnit() const
Returns the units for the margins between the item's frame and the interior text.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Defines the four margins of a rectangle.
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.
Container for all settings relating to text rendering.