QGIS API Documentation
2.12.0-Lyon
|
Implements a derived label provider internally used for DXF export. More...
#include <qgsdxfpallabeling.h>
Public Member Functions | |
QgsDxfLabelProvider (QgsVectorLayer *layer, QgsDxfExport *dxf) | |
construct the provider More... | |
virtual void | drawLabel (QgsRenderContext &context, pal::LabelPosition *label) const override |
re-implementation that writes to DXF file instead of drawing with QPainter More... | |
void | registerDxfFeature (QgsFeature &feature, QgsRenderContext &context, const QString &dxfLayerName) |
registration method that keeps track of DXF layer names of individual features More... | |
Public Member Functions inherited from QgsVectorLayerLabelProvider | |
QgsVectorLayerLabelProvider (QgsVectorLayer *layer, bool withFeatureLoop=true, const QgsPalLayerSettings *settings=0, const QString &layerName=QString()) | |
Convenience constructor to initialize the provider from given vector layer. More... | |
QgsVectorLayerLabelProvider (const QgsPalLayerSettings &settings, const QString &layerId, const QgsFields &fields, const QgsCoordinateReferenceSystem &crs, QgsAbstractFeatureSource *source, bool ownsSource) | |
Construct diagram provider with all the necessary configuration parameters. More... | |
~QgsVectorLayerLabelProvider () | |
virtual QList< QgsLabelFeature * > | labelFeatures (QgsRenderContext &context) override |
Return list of label features (they are owned by the provider and thus deleted on its destruction) More... | |
virtual bool | prepare (const QgsRenderContext &context, QStringList &attributeNames) |
Prepare for registration of features. More... | |
virtual void | registerFeature (QgsFeature &feature, QgsRenderContext &context) |
Register a feature for labeling as one or more QgsLabelFeature objects stored into mLabels. More... | |
Public Member Functions inherited from QgsAbstractLabelProvider | |
QgsAbstractLabelProvider () | |
Construct the provider with default values. More... | |
virtual | ~QgsAbstractLabelProvider () |
Vritual destructor. More... | |
Flags | flags () const |
Flags associated with the provider. More... | |
unsigned int | linePlacementFlags () const |
For layers with linestring geometries - extra placement flags (or-ed combination of QgsPalLayerSettings::LinePlacementFlags) More... | |
QString | name () const |
Name of the layer (for statistics, debugging etc.) - does not need to be unique. More... | |
QgsPalLayerSettings::ObstacleType | obstacleType () const |
How the feature geometries will work as obstacles. More... | |
QgsPalLayerSettings::Placement | placement () const |
What placement strategy to use for the labels. More... | |
double | priority () const |
Default priority of labels (may be overridden by individual labels) More... | |
void | setEngine (const QgsLabelingEngineV2 *engine) |
Associate provider with a labeling engine (should be only called internally from QgsLabelingEngineV2) More... | |
virtual QList< QgsAbstractLabelProvider * > | subProviders () |
Return list of child providers - useful if the provider needs to put labels into more layers with different configuration. More... | |
QgsPalLayerSettings::UpsideDownLabels | upsidedownLabels () const |
How to handle labels that would be upside down. More... | |
Protected Attributes | |
QgsDxfExport * | mDxfExport |
pointer to parent DXF export where this instance is used More... | |
QMap< QgsFeatureId, QString > | mDxfLayerNames |
DXF layer name for each label feature. More... | |
Protected Attributes inherited from QgsVectorLayerLabelProvider | |
QgsCoordinateReferenceSystem | mCrs |
Layer's CRS. More... | |
QgsFields | mFields |
Layer's fields. More... | |
QList< QgsLabelFeature * > | mLabels |
List of generated. More... | |
QString | mLayerId |
Layer's ID. More... | |
bool | mOwnsSource |
Whether layer's feature source is owned. More... | |
QgsPalLayerSettings | mSettings |
Layer's labeling configuration. More... | |
QgsAbstractFeatureSource * | mSource |
Layer's feature source. More... | |
Protected Attributes inherited from QgsAbstractLabelProvider | |
const QgsLabelingEngineV2 * | mEngine |
Associated labeling engine. More... | |
Flags | mFlags |
Flags altering drawing and registration of features. More... | |
unsigned int | mLinePlacementFlags |
Extra placement flags for linestring geometries. More... | |
QString | mName |
Name of the layer. More... | |
QgsPalLayerSettings::ObstacleType | mObstacleType |
Type of the obstacle of feature geometries. More... | |
QgsPalLayerSettings::Placement | mPlacement |
Placement strategy. More... | |
double | mPriority |
Default priority of labels. More... | |
QgsPalLayerSettings::UpsideDownLabels | mUpsidedownLabels |
How to handle labels that would be upside down. More... | |
Additional Inherited Members | |
Public Types inherited from QgsAbstractLabelProvider | |
enum | Flag { DrawLabels = 1 << 1, DrawAllLabels = 1 << 2, MergeConnectedLines = 1 << 3, CentroidMustBeInside = 1 << 4, FitInPolygonOnly = 1 << 5, LabelPerFeaturePart = 1 << 6 } |
Protected Member Functions inherited from QgsVectorLayerLabelProvider | |
void | drawLabelPrivate (pal::LabelPosition *label, QgsRenderContext &context, QgsPalLayerSettings &tmpLyr, QgsPalLabeling::DrawLabelType drawType, double dpiRatio=1.0) const |
Internal label drawing method. More... | |
void | init () |
initialization method - called from constructors More... | |
Implements a derived label provider internally used for DXF export.
Internal class, not in public API. Added in QGIS 2.12
Definition at line 32 of file qgsdxfpallabeling.h.
|
explicit |
construct the provider
Definition at line 28 of file qgsdxfpallabeling.cpp.
|
overridevirtual |
re-implementation that writes to DXF file instead of drawing with QPainter
Reimplemented from QgsVectorLayerLabelProvider.
Definition at line 34 of file qgsdxfpallabeling.cpp.
void QgsDxfLabelProvider::registerDxfFeature | ( | QgsFeature & | feature, |
QgsRenderContext & | context, | ||
const QString & | dxfLayerName | ||
) |
registration method that keeps track of DXF layer names of individual features
Definition at line 142 of file qgsdxfpallabeling.cpp.
|
protected |
pointer to parent DXF export where this instance is used
Definition at line 46 of file qgsdxfpallabeling.h.
|
protected |
DXF layer name for each label feature.
Definition at line 48 of file qgsdxfpallabeling.h.