QGIS API Documentation  3.4.15-Madeira (e83d02e274)
Public Member Functions | Public Attributes | List of all members
QgsLabelPosition Class Reference

#include <qgspallabeling.h>

Public Member Functions

 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())
 Constructor for QgsLabelPosition. More...
 
 QgsLabelPosition ()=default
 Constructor for QgsLabelPosition. More...
 

Public Attributes

QVector< QgsPointXYcornerPoints
 
QgsFeatureId featureId = FID_NULL
 ID of feature associated with this label. More...
 
double height = 0
 Heeght of label bounding box, in map units. More...
 
bool isDiagram = false
 True if label is a diagram. More...
 
bool isPinned = false
 True if label position has been pinned. More...
 
QFont labelFont
 Font which the label is rendered using. More...
 
QgsGeometry labelGeometry
 A polygon geometry representing the label's bounds in map coordinates. More...
 
QgsRectangle labelRect
 
QString labelText
 String shown in label. More...
 
QString layerID
 ID of associated map layer. More...
 
QString providerID
 ID of the associated label provider. More...
 
double rotation = 0
 Rotation of label, in degrees clockwise. More...
 
bool upsideDown = false
 True if label is upside down. More...
 
double width = 0
 Width of label bounding box, in map units. More...
 

Detailed Description

Definition at line 80 of file qgspallabeling.h.

Constructor & Destructor Documentation

QgsLabelPosition::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() 
)
inline

Constructor for QgsLabelPosition.

Parameters
idassociated feature ID
rlabel rotation in degrees clockwise
cornerscorner points of label bounding box, in map units
rectlabel bounding box, in map units
wwidth of label, in map units
hheight of label, in map units
layerID of associated map layer
labeltexttext rendered for label
labelfontfont used to render label
upside_downTRUE if label is upside down
diagramTRUE if label is a diagram
pinnedTRUE if label has pinned placement
providerIdID of associated label provider
labelGeometrypolygon geometry of label boundary

Definition at line 101 of file qgspallabeling.h.

QgsLabelPosition::QgsLabelPosition ( )
default

Constructor for QgsLabelPosition.

Member Data Documentation

QVector< QgsPointXY > QgsLabelPosition::cornerPoints

Definition at line 132 of file qgspallabeling.h.

QgsFeatureId QgsLabelPosition::featureId = FID_NULL

ID of feature associated with this label.

Definition at line 125 of file qgspallabeling.h.

double QgsLabelPosition::height = 0

Heeght of label bounding box, in map units.

Definition at line 149 of file qgspallabeling.h.

bool QgsLabelPosition::isDiagram = false

True if label is a diagram.

Definition at line 174 of file qgspallabeling.h.

bool QgsLabelPosition::isPinned = false

True if label position has been pinned.

Definition at line 179 of file qgspallabeling.h.

QFont QgsLabelPosition::labelFont

Font which the label is rendered using.

Definition at line 164 of file qgspallabeling.h.

QgsGeometry QgsLabelPosition::labelGeometry

A polygon geometry representing the label's bounds in map coordinates.

Since
QGIS 3.4.9

Definition at line 139 of file qgspallabeling.h.

QgsRectangle QgsLabelPosition::labelRect

Definition at line 133 of file qgspallabeling.h.

QString QgsLabelPosition::labelText

String shown in label.

Definition at line 159 of file qgspallabeling.h.

QString QgsLabelPosition::layerID

ID of associated map layer.

Definition at line 154 of file qgspallabeling.h.

QString QgsLabelPosition::providerID

ID of the associated label provider.

Since
QGIS 2.14

Definition at line 185 of file qgspallabeling.h.

double QgsLabelPosition::rotation = 0

Rotation of label, in degrees clockwise.

Definition at line 130 of file qgspallabeling.h.

bool QgsLabelPosition::upsideDown = false

True if label is upside down.

Definition at line 169 of file qgspallabeling.h.

double QgsLabelPosition::width = 0

Width of label bounding box, in map units.

Definition at line 144 of file qgspallabeling.h.


The documentation for this class was generated from the following file: