QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
16 #ifndef QGSLABELLINESETTINGS_H
17 #define QGSLABELLINESETTINGS_H
19 #include "qgis_core.h"
68 QgsLabeling::LinePlacementFlags
placementFlags()
const {
return mPlacementFlags; }
76 void setPlacementFlags( QgsLabeling::LinePlacementFlags flags ) { mPlacementFlags = flags; }
290 bool mMergeLines =
false;
291 bool mAddDirectionSymbol =
false;
292 QString mLeftDirectionSymbol = QString(
'<' );
293 QString mRightDirectionSymbol = QString(
'>' );
294 bool mReverseDirectionSymbol =
false;
296 double mOverrunDistance = 0;
300 double mLineAnchorPercent = 0.5;
301 AnchorType mAnchorType = AnchorType::HintOnly;
304 #endif // QGSLABELLINESETTINGS_H
void setDirectionSymbolPlacement(DirectionSymbolPlacement placement)
Sets the placement for direction symbols.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
RenderUnit
Rendering size units.
void setRightDirectionSymbol(const QString &symbol)
Sets the string to use for right direction arrows.
SymbolLeftRight
Place direction symbols on left/right of label.
void setOverrunDistance(double distance)
Sets the distance which labels are allowed to overrun past the start or end of line features.
void setOverrunDistanceUnit(const QgsUnitTypes::RenderUnit &unit)
Sets the unit for label overrun distance.
MapOrientation
Signifies that the AboveLine and BelowLine flags should respect the map's orientation rather than the...
AboveLine
Labels can be placed above a line feature.
@ RenderMillimeters
Millimeters.
void setMergeLines(bool merge)
Sets whether connected line features with identical label text should be merged prior to generating l...
bool reverseDirectionSymbol() const
Returns true if direction symbols should be reversed.
QString leftDirectionSymbol() const
Returns the string to use for left direction arrows.
QgsMapUnitScale overrunDistanceMapUnitScale() const
Returns the map unit scale for label overrun distance.
void setOverrunDistanceMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for label overrun distance.
double lineAnchorPercent() const
Returns the percent along the line at which labels should be placed.
bool mergeLines() const
Returns true if connected line features with identical label text should be merged prior to generatin...
double overrunDistance() const
Returns the distance which labels are allowed to overrun past the start or end of line features.
QString rightDirectionSymbol() const
Returns the string to use for right direction arrows.
AnchorType anchorType() const
Returns the line anchor type, which dictates how the lineAnchorPercent() setting is handled.
Struct for storing maximum and minimum scales for measurements in map units.
AnchorType
Line anchor types.
void setLineAnchorPercent(double percent)
Sets the percent along the line at which labels should be placed.
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
Contains settings related to how the label engine places and formats labels for line features (or pol...
QgsUnitTypes::RenderUnit overrunDistanceUnit() const
Returns the units for label overrun distance.
void setAddDirectionSymbol(bool enabled)
Sets whether '<' or '>' (or custom strings set via leftDirectionSymbol and rightDirectionSymbol) will...
void setAnchorType(AnchorType type)
Sets the line anchor type, which dictates how the lineAnchorPercent() setting is handled.
void setLeftDirectionSymbol(const QString &symbol)
Sets the string to use for left direction arrows.
QgsLabeling::LinePlacementFlags placementFlags() const
Returns the line placement flags, which dictate how line labels can be placed above or below the line...
DirectionSymbolPlacement directionSymbolPlacement() const
Returns the placement for direction symbols.
bool addDirectionSymbol() const
Returns true if '<' or '>' (or custom strings set via leftDirectionSymbol and rightDirectionSymbol) w...
void setPlacementFlags(QgsLabeling::LinePlacementFlags flags)
Returns the line placement flags, which dictate how line labels can be placed above or below the line...
DirectionSymbolPlacement
Placement options for direction symbols.
SymbolAbove
Place direction symbols on above label.
void setReverseDirectionSymbol(bool reversed)
Sets whether the direction symbols should be reversed.