18#ifndef QGSANNOTATIONLINETEXTITEM_H
19#define QGSANNOTATIONLINETEXTITEM_H
45 QString
type()
const override;
70 const
QgsCurve *geometry()
const {
return mCurve.get(); }
86 QString
text()
const {
return mText; }
93 void setText(
const QString &text ) { mText = text; }
162 std::unique_ptr< QgsCurve > mCurve;
165 double mOffsetFromLineDistance = 0;
AnnotationItemEditOperationResult
Results from an edit operation on an annotation item.
QFlags< AnnotationItemFlag > AnnotationItemFlags
Annotation item flags.
RenderUnit
Rendering size units.
@ Millimeters
Millimeters.
Abstract base class for annotation item edit operations.
Encapsulates the context for an annotation item edit operation.
Encapsulates the transient results of an in-progress annotation edit operation.
Abstract base class for annotation items which are drawn with QgsAnnotationLayers.
virtual bool writeXml(QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context) const =0
Writes the item's state into an XML element.
virtual QList< QgsAnnotationItemNode > nodesV2(const QgsAnnotationItemEditContext &context) const
Returns the nodes for the item, used for editing the item.
virtual QString type() const =0
Returns a unique (untranslated) string identifying the type of item.
virtual void render(QgsRenderContext &context, QgsFeedback *feedback)=0
Renders the item to the specified render context.
virtual QgsAnnotationItemEditOperationTransientResults * transientEditResultsV2(QgsAbstractAnnotationItemEditOperation *operation, const QgsAnnotationItemEditContext &context)
Retrieves the results of a transient (in progress) edit operation on the item.
virtual Qgis::AnnotationItemFlags flags() const
Returns item flags.
virtual Qgis::AnnotationItemEditOperationResult applyEditV2(QgsAbstractAnnotationItemEditOperation *operation, const QgsAnnotationItemEditContext &context)
Applies an edit operation to the item.
An annotation item which renders text along a line geometry.
double offsetFromLine() const
Returns the offset distance from the line geometry() to the text's baseline.
void setOffsetFromLine(double distance)
Sets the offset distance from the line geometry() to the text's baseline.
void setOffsetFromLineMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the offset from line geometry() distance.
void setText(const QString &text)
Sets the text rendered by the item.
void setOffsetFromLineUnit(Qgis::RenderUnit unit)
Sets the unit for the offset from line geometry() distance.
QString text() const
Returns the text rendered by the item.
Qgis::RenderUnit offsetFromLineUnit() const
Returns the units for the offset from line geometry() distance.
~QgsAnnotationLineTextItem() override
const QgsMapUnitScale & offsetFromLineMapUnitScale() const
Returns the map unit scale for the offset from line geometry() distance.
Abstract base class for curved geometry type.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Struct for storing maximum and minimum scales for measurements in map units.
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.