16#ifndef QGSLABELPOSITION_H
17#define QGSLABELPOSITION_H
54 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(),
76 SIP_PYOBJECT __repr__();
78 const QString text = sipCpp->labelText;
79 QString str = QStringLiteral(
"<QgsLabelPosition: \"%1\"%2>" ).arg( text, sipCpp->isUnplaced ? QStringLiteral(
" (unplaced)" ) : QString() );
80 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
A geometry is the spatial representation of a feature.
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.
bool isDiagram
true if label is a diagram.
QgsFeatureId featureId
ID of feature associated with this label.
QString labelText
String shown in label.
QString providerID
ID of the associated label provider.
bool isUnplaced
true if label position corresponds to an unplaced label.
long long groupedLabelId
If non zero, indicates that the label position is part of a group of label positions (i....
QgsLabelPosition()=default
QFont labelFont
Font which the label is rendered using.
double width
Width of label bounding box, in map units.
double height
Heeght of label bounding box, in map units.
double rotation
Rotation of label, in degrees clockwise.
bool upsideDown
true if label is upside down.
bool isPinned
true if label position has been pinned.
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