QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
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
#include "
qgsmaprenderer.h
"
22
#include "
qgsrendercontext.h
"
23
#include "
qgsvectorlayerlabelprovider.h
"
24
#include "
qgsrulebasedlabeling.h
"
25
26
class
QgsDxfExport
;
27
class
QgsPalLayerSettings
;
28
class
QgsRuleBasedLabeling
;
29
30
37
class
QgsDxfLabelProvider
:
public
QgsVectorLayerLabelProvider
38
{
39
public
:
41
explicit
QgsDxfLabelProvider
(
QgsVectorLayer
* layer,
const
QString
&
providerId
,
QgsDxfExport
* dxf,
const
QgsPalLayerSettings
*settings );
42
47
void
drawLabel
(
QgsRenderContext
& context,
pal::LabelPosition
* label )
const override
;
48
54
void
registerDxfFeature
(
QgsFeature
& feature,
QgsRenderContext
&context,
const
QString
& dxfLayerName );
55
56
protected
:
58
QgsDxfExport
*
mDxfExport
;
59
};
60
68
class
QgsDxfRuleBasedLabelProvider
:
public
QgsRuleBasedLabelProvider
69
{
70
public
:
72
explicit
QgsDxfRuleBasedLabelProvider
(
const
QgsRuleBasedLabeling
&rules,
QgsVectorLayer
* layer,
QgsDxfExport
* dxf );
73
77
void
reinit(
QgsVectorLayer
* layer );
78
83
void
drawLabel
(
QgsRenderContext
&context,
pal::LabelPosition
*label )
const override
;
84
90
void
registerDxfFeature
(
QgsFeature
& feature,
QgsRenderContext
&context,
const
QString
& dxfLayerName );
91
93
virtual
QgsVectorLayerLabelProvider
*createProvider(
QgsVectorLayer
*layer,
const
QString
&
providerId
,
bool
withFeatureLoop,
const
QgsPalLayerSettings
*settings )
override
;
94
95
protected
:
97
QgsDxfExport
*
mDxfExport
;
98
};
99
100
101
102
#endif // QGSDXFPALLABELING_H
qgsrendercontext.h
QgsDxfRuleBasedLabelProvider
Implements a derived label provider for rule based labels internally used for DXF export...
Definition:
qgsdxfpallabeling.h:68
QgsPalLayerSettings
Definition:
qgspallabeling.h:68
QgsVectorLayerLabelProvider
The QgsVectorLayerLabelProvider class implements a label provider for vector layers.
Definition:
qgsvectorlayerlabelprovider.h:35
QgsFeature
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
Definition:
qgsfeature.h:187
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
QgsRuleBasedLabelProvider
Definition:
qgsrulebasedlabeling.h:325
qgsrulebasedlabeling.h
QString
QgsRenderContext
Contains information about the context of a rendering operation.
Definition:
qgsrendercontext.h:45
QgsDxfLabelProvider::mDxfExport
QgsDxfExport * mDxfExport
pointer to parent DXF export where this instance is used
Definition:
qgsdxfpallabeling.h:58
QgsRuleBasedLabeling
Definition:
qgsrulebasedlabeling.h:40
pal::LabelPosition
LabelPosition is a candidate feature label position.
Definition:
labelposition.h:51
QgsAbstractLabelProvider::providerId
QString providerId() const
Returns provider ID - useful in case there is more than one label provider within a layer (e...
Definition:
qgslabelingenginev2.h:82
QgsDxfLabelProvider::registerDxfFeature
void registerDxfFeature(QgsFeature &feature, QgsRenderContext &context, const QString &dxfLayerName)
Registration method that keeps track of DXF layer names of individual features.
Definition:
qgsdxfpallabeling.cpp:37
qgsvectorlayerlabelprovider.h
QgsDxfLabelProvider
Implements a derived label provider internally used for DXF export.
Definition:
qgsdxfpallabeling.h:37
QgsDxfRuleBasedLabelProvider::mDxfExport
QgsDxfExport * mDxfExport
pointer to parent DXF export where this instance is used
Definition:
qgsdxfpallabeling.h:97
QgsVectorLayer
Represents a vector layer which manages a vector based data sets.
Definition:
qgsvectorlayer.h:408
QgsDxfExport
Definition:
qgsdxfexport.h:43
qgsmaprenderer.h
Generated on Sun Jun 24 2018 11:42:48 for QGIS API Documentation by
1.8.13