16 #ifndef QGSLABELPOSITION_H
17 #define QGSLABELPOSITION_H
19 #include "qgis_core.h"
55 QgsLabelPosition(
QgsFeatureId id,
double r,
const QVector< QgsPointXY > &corners,
const QgsRectangle &rect,
double w,
double h,
const QString &layer,
const QString &labeltext,
const QFont &labelfont,
bool upside_down,
bool diagram =
false,
bool pinned =
false,
const QString &providerId = QString(),
59 , cornerPoints( corners )
61 , labelGeometry( labelGeometry )
65 , labelText( labeltext )
66 , labelFont( labelfont )
67 , upsideDown( upside_down )
68 , isDiagram( diagram )
70 , providerID( providerId )
71 , isUnplaced( isUnplaced )
78 SIP_PYOBJECT __repr__();
80 const QString text = sipCpp->labelText;
81 QString
str = QStringLiteral(
"<QgsLabelPosition: \"%1\"%2>" ).arg( text, sipCpp->isUnplaced ? QStringLiteral(
" (unplaced)" ) : QString() );
82 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
133 bool upsideDown =
false;
138 bool isDiagram =
false;
143 bool isPinned =
false;
155 bool isUnplaced =
false;
A geometry is the spatial representation of a feature.
Represents the calculated placement of a map label.
QgsGeometry labelGeometry
A polygon geometry representing the label's bounds in map coordinates.
QgsLabelPosition(QgsFeatureId id, double r, const QVector< QgsPointXY > &corners, const QgsRectangle &rect, double w, double h, const QString &layer, const QString &labeltext, const QFont &labelfont, bool upside_down, bool diagram=false, bool pinned=false, const QString &providerId=QString(), const QgsGeometry &labelGeometry=QgsGeometry(), bool isUnplaced=false)
Constructor for QgsLabelPosition.
QString labelText
String shown in label.
QString providerID
ID of the associated label provider.
QgsLabelPosition()=default
Constructor for QgsLabelPosition.
QFont labelFont
Font which the label is rendered using.
QVector< QgsPointXY > cornerPoints
QString layerID
ID of associated map layer.
A rectangle specified with double values.
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features