QGIS API Documentation
3.8.0-Zanzibar (11aff65)
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
w
z
+
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
z
Variables
Typedefs
Enumerations
Enumerator
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
c
e
f
g
h
k
l
m
o
p
r
s
t
u
v
w
+
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
+
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Properties
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
z
+
Related Functions
a
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
v
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
u
v
w
z
+
Variables
a
b
c
d
e
g
h
i
l
n
o
p
q
r
s
t
u
w
+
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
Enumerator
+
Macros
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
w
y
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
src
core
dxf
qgsdxfpallabeling.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsdxfpallabeling.h
3
-------------------
4
begin : January 2014
5
copyright : (C) 2014 by Marco Hugentobler
6
email : marco at sourcepole dot ch
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSDXFPALLABELING_H
19
#define QGSDXFPALLABELING_H
20
21
#define SIP_NO_FILE
22
23
#include "
qgsvectorlayerlabelprovider.h
"
24
#include "
qgsrulebasedlabeling.h
"
25
26
class
QgsDxfExport
;
27
class
QgsPalLayerSettings
;
28
class
QgsRuleBasedLabeling
;
29
30
38
class
QgsDxfLabelProvider
:
public
QgsVectorLayerLabelProvider
39
{
40
public
:
42
explicit
QgsDxfLabelProvider
(
QgsVectorLayer
*
layer
,
const
QString &
providerId
,
QgsDxfExport
*dxf,
const
QgsPalLayerSettings
*settings );
43
49
void
drawLabel
(
QgsRenderContext
&context,
pal::LabelPosition
*label )
const override
;
50
57
void
registerDxfFeature
(
const
QgsFeature
&feature,
QgsRenderContext
&context,
const
QString &dxfLayerName );
58
59
protected
:
61
QgsDxfExport
*
mDxfExport
=
nullptr
;
62
};
63
72
class
QgsDxfRuleBasedLabelProvider
:
public
QgsRuleBasedLabelProvider
73
{
74
public
:
76
explicit
QgsDxfRuleBasedLabelProvider
(
const
QgsRuleBasedLabeling
&rules,
QgsVectorLayer
*
layer
,
QgsDxfExport
*dxf );
77
82
void
reinit(
QgsVectorLayer
*layer );
83
89
void
drawLabel
(
QgsRenderContext
&context,
pal::LabelPosition
*label )
const override
;
90
97
void
registerDxfFeature
(
QgsFeature
&feature,
QgsRenderContext
&context,
const
QString &dxfLayerName );
98
100
QgsVectorLayerLabelProvider
*createProvider(
QgsVectorLayer
*layer,
const
QString &
providerId
,
bool
withFeatureLoop,
const
QgsPalLayerSettings
*settings )
override
;
101
102
protected
:
104
QgsDxfExport
*
mDxfExport
=
nullptr
;
105
};
106
107
108
109
#endif // QGSDXFPALLABELING_H
QgsDxfRuleBasedLabelProvider
Implements a derived label provider for rule based labels internally used for DXF export...
Definition:
qgsdxfpallabeling.h:72
QgsPalLayerSettings
Definition:
qgspallabeling.h:192
QgsVectorLayerLabelProvider
The QgsVectorLayerLabelProvider class implements a label provider for vector layers.
Definition:
qgsvectorlayerlabelprovider.h:39
QgsFeature
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
Definition:
qgsfeature.h:55
QgsDxfLabelProvider::drawLabel
void drawLabel(QgsRenderContext &context, pal::LabelPosition *label) const override
Re-implementation that writes to DXF file instead of drawing with QPainter.
Definition:
qgsdxfpallabeling.cpp:31
QgsDxfLabelProvider::QgsDxfLabelProvider
QgsDxfLabelProvider(QgsVectorLayer *layer, const QString &providerId, QgsDxfExport *dxf, const QgsPalLayerSettings *settings)
construct the provider
Definition:
qgsdxfpallabeling.cpp:25
QgsAbstractLabelProvider::layer
QgsMapLayer * layer() const
Returns the associated layer, or nullptr if no layer is associated with the provider.
Definition:
qgslabelingengine.h:81
QgsRuleBasedLabelProvider
Definition:
qgsrulebasedlabeling.h:389
QgsDxfLabelProvider::registerDxfFeature
void registerDxfFeature(const QgsFeature &feature, QgsRenderContext &context, const QString &dxfLayerName)
Registration method that keeps track of DXF layer names of individual features.
Definition:
qgsdxfpallabeling.cpp:37
qgsrulebasedlabeling.h
QgsRenderContext
Contains information about the context of a rendering operation.
Definition:
qgsrendercontext.h:50
QgsDxfLabelProvider::mDxfExport
QgsDxfExport * mDxfExport
pointer to parent DXF export where this instance is used
Definition:
qgsdxfpallabeling.h:61
QgsRuleBasedLabeling
Definition:
qgsrulebasedlabeling.h:40
pal::LabelPosition
LabelPosition is a candidate feature label position.
Definition:
labelposition.h:55
QgsAbstractLabelProvider::providerId
QString providerId() const
Returns provider ID - useful in case there is more than one label provider within a layer (e...
Definition:
qgslabelingengine.h:88
qgsvectorlayerlabelprovider.h
QgsDxfLabelProvider
Implements a derived label provider internally used for DXF export.
Definition:
qgsdxfpallabeling.h:38
QgsVectorLayer
Represents a vector layer which manages a vector based data sets.
Definition:
qgsvectorlayer.h:362
QgsDxfExport
Definition:
qgsdxfexport.h:55
Generated on Sat Jun 22 2019 09:24:07 for QGIS API Documentation by
1.8.13