QGIS API Documentation
3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
src
core
labeling
qgslabelplacementsettings.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgslabelplacementsettings.h
3
--------------------------
4
Date : May 2022
5
Copyright : (C) 2022 by Nyall Dawson
6
Email : nyall dot dawson at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSLABELPLACEMENTSETTINGS_H
17
#define QGSLABELPLACEMENTSETTINGS_H
18
19
#include "qgis_core.h"
20
#include "
qgis_sip.h
"
21
#include "
qgis.h
"
22
23
class
QgsPropertyCollection
;
24
class
QgsExpressionContext
;
25
34
class
CORE_EXPORT
QgsLabelPlacementSettings
35
{
36
public
:
37
42
Qgis::LabelOverlapHandling
overlapHandling
()
const
{
return
mOverlapHandling; }
43
48
void
setOverlapHandling
(
Qgis::LabelOverlapHandling
handling ) { mOverlapHandling = handling; }
49
59
bool
allowDegradedPlacement
()
const
{
return
mAllowDegradedPlacement; }
60
70
void
setAllowDegradedPlacement
(
bool
allow ) { mAllowDegradedPlacement = allow; }
71
79
Qgis::LabelPrioritization
prioritization
()
const
{
return
mPrioritization; }
80
88
void
setPrioritization
(
Qgis::LabelPrioritization
prioritization ) { mPrioritization = prioritization; }
89
94
void
updateDataDefinedProperties(
const
QgsPropertyCollection
&properties,
QgsExpressionContext
&context );
95
96
private
:
97
98
Qgis::LabelOverlapHandling
mOverlapHandling =
Qgis::LabelOverlapHandling::PreventOverlap
;
99
Qgis::LabelPrioritization
mPrioritization =
Qgis::LabelPrioritization::PreferCloser
;
100
101
bool
mAllowDegradedPlacement =
false
;
102
103
};
104
105
#endif
// QGSLABELPLACEMENTSETTINGS_H
Qgis::LabelPrioritization
LabelPrioritization
Label prioritization.
Definition
qgis.h:1111
Qgis::LabelPrioritization::PreferCloser
@ PreferCloser
Prefer closer labels, falling back to alternate positions before larger distances.
Qgis::LabelOverlapHandling
LabelOverlapHandling
Label overlap handling.
Definition
qgis.h:1098
Qgis::LabelOverlapHandling::PreventOverlap
@ PreventOverlap
Do not allow labels to overlap other labels.
QgsExpressionContext
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Definition
qgsexpressioncontext.h:471
QgsLabelPlacementSettings
Contains general settings related to how labels are placed.
Definition
qgslabelplacementsettings.h:35
QgsLabelPlacementSettings::setOverlapHandling
void setOverlapHandling(Qgis::LabelOverlapHandling handling)
Sets the technique used to handle overlapping labels.
Definition
qgslabelplacementsettings.h:48
QgsLabelPlacementSettings::overlapHandling
Qgis::LabelOverlapHandling overlapHandling() const
Returns the technique used to handle overlapping labels.
Definition
qgslabelplacementsettings.h:42
QgsLabelPlacementSettings::setPrioritization
void setPrioritization(Qgis::LabelPrioritization prioritization)
Sets the technique used to prioritize labels.
Definition
qgslabelplacementsettings.h:88
QgsLabelPlacementSettings::allowDegradedPlacement
bool allowDegradedPlacement() const
Returns true if labels can be placed in inferior fallback positions if they cannot otherwise be place...
Definition
qgslabelplacementsettings.h:59
QgsLabelPlacementSettings::setAllowDegradedPlacement
void setAllowDegradedPlacement(bool allow)
Sets whether labels can be placed in inferior fallback positions if they cannot otherwise be placed.
Definition
qgslabelplacementsettings.h:70
QgsLabelPlacementSettings::prioritization
Qgis::LabelPrioritization prioritization() const
Returns the label prioritization technique.
Definition
qgslabelplacementsettings.h:79
QgsPropertyCollection
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
Definition
qgspropertycollection.h:344
qgis.h
qgis_sip.h
Generated on Mon Oct 28 2024 22:06:03 for QGIS API Documentation by
1.9.8