QGIS API Documentation  2.0.1-Dufour
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | List of all members
QgsLabelingEngineInterface Class Reference

Labeling engine interface. More...

#include <qgsmaprenderer.h>

Inheritance diagram for QgsLabelingEngineInterface:
Inheritance graph
[legend]

Public Member Functions

virtual ~QgsLabelingEngineInterface ()
virtual void init (QgsMapRenderer *mp)=0
 called when we're going to start with rendering
virtual bool willUseLayer (QgsVectorLayer *layer)=0
 called to find out whether the layer is used for labeling
virtual void clearActiveLayers ()=0
 clears all PAL layer settings for registered layers
virtual void clearActiveLayer (QgsVectorLayer *layer)=0
 clears data defined objects from PAL layer settings for a registered layer
virtual int prepareLayer (QgsVectorLayer *layer, QSet< int > &attrIndices, QgsRenderContext &ctx)=0
 called when starting rendering of a layer
virtual QgsPalLayerSettingslayer (const QString &layerName)=0
 returns PAL layer settings for a registered layer
virtual int addDiagramLayer (QgsVectorLayer *layer, QgsDiagramLayerSettings *s)
 adds a diagram layer to the labeling engine
virtual void registerFeature (QgsVectorLayer *layer, QgsFeature &feat, const QgsRenderContext &context=QgsRenderContext())=0
 called for every feature
virtual void registerDiagramFeature (QgsVectorLayer *layer, QgsFeature &feat, const QgsRenderContext &context=QgsRenderContext())
 called for every diagram feature
virtual void drawLabeling (QgsRenderContext &context)=0
 called when the map is drawn and labels should be placed
virtual void exit ()=0
 called when we're done with rendering
virtual QList< QgsLabelPositionlabelsAtPosition (const QgsPoint &p)=0
 return infos about labels at a given (map) position
virtual QList< QgsLabelPositionlabelsWithinRect (const QgsRectangle &r)=0
 return infos about labels within a given (map) rectangle
virtual
QgsLabelingEngineInterface
clone ()=0
 called when passing engine among map renderers

Detailed Description

Labeling engine interface.

Note
Added in QGIS v1.4

Definition at line 68 of file qgsmaprenderer.h.

Constructor & Destructor Documentation

virtual QgsLabelingEngineInterface::~QgsLabelingEngineInterface ( )
inlinevirtual

Definition at line 72 of file qgsmaprenderer.h.

Member Function Documentation

virtual int QgsLabelingEngineInterface::addDiagramLayer ( QgsVectorLayer layer,
QgsDiagramLayerSettings s 
)
inlinevirtual

adds a diagram layer to the labeling engine

Reimplemented in QgsPalLabeling.

Definition at line 91 of file qgsmaprenderer.h.

Referenced by QgsVectorLayer::prepareLabelingAndDiagrams().

virtual void QgsLabelingEngineInterface::clearActiveLayer ( QgsVectorLayer layer)
pure virtual

clears data defined objects from PAL layer settings for a registered layer

Note
: this method was added in version 1.9

Implemented in QgsPalLabeling.

virtual void QgsLabelingEngineInterface::clearActiveLayers ( )
pure virtual

clears all PAL layer settings for registered layers

Note
: this method was added in version 1.9

Implemented in QgsPalLabeling.

virtual QgsLabelingEngineInterface* QgsLabelingEngineInterface::clone ( )
pure virtual

called when passing engine among map renderers

Implemented in QgsPalLabeling.

Referenced by QgsComposerMap::draw().

virtual void QgsLabelingEngineInterface::drawLabeling ( QgsRenderContext context)
pure virtual

called when the map is drawn and labels should be placed

Implemented in QgsPalLabeling.

Referenced by QgsMapRenderer::render().

virtual void QgsLabelingEngineInterface::exit ( )
pure virtual

called when we're done with rendering

Implemented in QgsPalLabeling.

Referenced by QgsMapRenderer::render().

virtual void QgsLabelingEngineInterface::init ( QgsMapRenderer mp)
pure virtual

called when we're going to start with rendering

Implemented in QgsPalLabeling.

Referenced by QgsMapRenderer::render().

virtual QList<QgsLabelPosition> QgsLabelingEngineInterface::labelsAtPosition ( const QgsPoint p)
pure virtual

return infos about labels at a given (map) position

Note
: this method was added in version 1.7

Implemented in QgsPalLabeling.

virtual QList<QgsLabelPosition> QgsLabelingEngineInterface::labelsWithinRect ( const QgsRectangle r)
pure virtual

return infos about labels within a given (map) rectangle

Note
: this method was added in version 1.9

Implemented in QgsPalLabeling.

virtual QgsPalLayerSettings& QgsLabelingEngineInterface::layer ( const QString &  layerName)
pure virtual

returns PAL layer settings for a registered layer

Note
: this method was added in version 1.9

Implemented in QgsPalLabeling.

Referenced by QgsVectorLayer::prepareLabelingAndDiagrams().

virtual int QgsLabelingEngineInterface::prepareLayer ( QgsVectorLayer layer,
QSet< int > &  attrIndices,
QgsRenderContext ctx 
)
pure virtual

called when starting rendering of a layer

Note
: this method was added in version 1.6

Implemented in QgsPalLabeling.

Referenced by QgsVectorLayer::prepareLabelingAndDiagrams().

virtual void QgsLabelingEngineInterface::registerDiagramFeature ( QgsVectorLayer layer,
QgsFeature feat,
const QgsRenderContext context = QgsRenderContext() 
)
inlinevirtual

called for every diagram feature

Reimplemented in QgsPalLabeling.

Definition at line 96 of file qgsmaprenderer.h.

Referenced by QgsVectorLayer::drawRendererV2(), and QgsVectorLayer::drawRendererV2Levels().

virtual void QgsLabelingEngineInterface::registerFeature ( QgsVectorLayer layer,
QgsFeature feat,
const QgsRenderContext context = QgsRenderContext() 
)
pure virtual

called for every feature

Implemented in QgsPalLabeling.

Referenced by QgsVectorLayer::drawRendererV2(), and QgsVectorLayer::drawRendererV2Levels().

virtual bool QgsLabelingEngineInterface::willUseLayer ( QgsVectorLayer layer)
pure virtual

called to find out whether the layer is used for labeling

Implemented in QgsPalLabeling.

Referenced by QgsMapRenderer::render().


The documentation for this class was generated from the following file: