18#ifndef QGSANNOTATIONRECTANGLETEXTITEM_H
19#define QGSANNOTATIONRECTANGLETEXTITEM_H
44 QString
type()
const override;
61 QString text()
const {
return mText; }
68 void setText(
const QString &text ) { mText = text; }
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.
Abstract base class for annotation items which render annotations in a rectangular shape.
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.
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.
void setMargins(const QgsMargins &margins)
Sets the margins between the outside of the item's frame and the interior text.
const QgsMargins & margins() const
Returns the margins between the outside of the item's frame and the interior text.
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.
The QgsMargins class defines the four margins of a rectangle.
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.
Container for all settings relating to text rendering.