QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
18 #ifndef QGSANNOTATIONPOINTTEXTITEM_H
19 #define QGSANNOTATIONPOINTTEXTITEM_H
21 #include "qgis_core.h"
43 QString
type()
const override;
79 QString
text()
const {
return mText; }
86 void setText(
const QString &text ) { mText = text; }
107 double angle()
const {
return mAngle; }
121 Qt::Alignment alignment()
const;
128 void setAlignment( Qt::Alignment alignment );
136 Qt::Alignment mAlignment = Qt::AlignHCenter;
144 #endif // QGSANNOTATIONPOINTTEXTITEM_H
The class is used as a container of context for various read/write operations on other objects.
double angle() const
Returns the text's rotation angle, in degrees clockwise.
Contains information about the context of a rendering operation.
A rectangle specified with double values.
~QgsAnnotationPointTextItem() override
Container for all settings relating to text rendering.
void setText(const QString &text)
Sets the text rendered by the item.
virtual bool writeXml(QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context) const =0
Writes the item's state into an XML element.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
A class to represent a 2D point.
virtual void render(QgsRenderContext &context, QgsFeedback *feedback)=0
Renders the item to the specified render context.
void setAngle(double angle)
Sets the text's rotation angle, in degrees clockwise.
void setPoint(QgsPointXY point)
Sets the point location of the text.
double ANALYSIS_EXPORT angle(QgsPoint *p1, QgsPoint *p2, QgsPoint *p3, QgsPoint *p4)
Calculates the angle between two segments (in 2 dimension, z-values are ignored)
Abstract base class for annotation items which are drawn with QgsAnnotationLayers.
An annotation item which renders a text string at a point location.
virtual QString type() const =0
Returns a unique (untranslated) string identifying the type of item.
QString text() const
Returns the text rendered by the item.