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

#include <qgspallabeling.h>

Inheritance diagram for QgsPalLabeling:
Inheritance graph
[legend]
Collaboration diagram for QgsPalLabeling:
Collaboration graph
[legend]

Public Types

enum  DrawLabelType {
  LabelText = 0, LabelBuffer, LabelShape, LabelSVG,
  LabelShadow
}
enum  Search {
  Chain, Popmusic_Tabu, Popmusic_Chain, Popmusic_Tabu_Chain,
  Falp
}

Public Member Functions

 QgsPalLabeling ()
 ~QgsPalLabeling ()
QgsPalLayerSettingslayer (const QString &layerName)
 returns PAL layer settings for a registered layer
void numCandidatePositions (int &candPoint, int &candLine, int &candPolygon)
void setNumCandidatePositions (int candPoint, int candLine, int candPolygon)
void setSearchMethod (Search s)
Search searchMethod () const
bool isShowingCandidates () const
void setShowingCandidates (bool showing)
const QList< QgsLabelCandidate > & candidates ()
bool isShowingShadowRectangles () const
void setShowingShadowRectangles (bool showing)
bool isShowingAllLabels () const
void setShowingAllLabels (bool showing)
virtual void init (QgsMapRenderer *mr)
 called when we're going to start with rendering
virtual bool willUseLayer (QgsVectorLayer *layer)
 called to find out whether the layer is used for labeling
virtual void clearActiveLayers ()
 clears all PAL layer settings for registered layers
virtual void clearActiveLayer (QgsVectorLayer *layer)
 clears data defined objects from PAL layer settings for a registered layer
virtual int prepareLayer (QgsVectorLayer *layer, QSet< int > &attrIndices, QgsRenderContext &ctx)
 hook called when drawing layer before issuing select()
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())
 hook called when drawing for every feature in a layer
virtual void registerDiagramFeature (QgsVectorLayer *layer, QgsFeature &feat, const QgsRenderContext &context=QgsRenderContext())
 called for every diagram feature
virtual void drawLabeling (QgsRenderContext &context)
 called when the map is drawn and labels should be placed
virtual void exit ()
 called when we're done with rendering
virtual QList< QgsLabelPositionlabelsAtPosition (const QgsPoint &p)
 return infos about labels at a given (map) position
virtual QList< QgsLabelPositionlabelsWithinRect (const QgsRectangle &r)
 return infos about labels within a given (map) rectangle
virtual
QgsLabelingEngineInterface
clone ()
 called when passing engine among map renderers
void drawLabelCandidateRect (pal::LabelPosition *lp, QPainter *painter, const QgsMapToPixel *xform)
void drawLabel (pal::LabelPosition *label, QgsRenderContext &context, QgsPalLayerSettings &tmpLyr, DrawLabelType drawType)
 drawLabel
void loadEngineSettings ()
 load/save engine settings to project file
void saveEngineSettings ()
void clearEngineSettings ()
bool isStoredWithProject () const
void setStoredWithProject (bool store)
- Public Member Functions inherited from QgsLabelingEngineInterface
virtual ~QgsLabelingEngineInterface ()

Static Public Member Functions

static void drawLabelBuffer (QgsRenderContext &context, QgsLabelComponent component, const QgsPalLayerSettings &tmpLyr)
static void drawLabelBackground (QgsRenderContext &context, QgsLabelComponent component, const QgsPalLayerSettings &tmpLyr)
static void drawLabelShadow (QgsRenderContext &context, QgsLabelComponent component, const QgsPalLayerSettings &tmpLyr)

Protected Member Functions

void dataDefinedTextStyle (QgsPalLayerSettings &tmpLyr, const QMap< QgsPalLayerSettings::DataDefinedProperties, QVariant > &ddValues)
void dataDefinedTextFormatting (QgsPalLayerSettings &tmpLyr, const QMap< QgsPalLayerSettings::DataDefinedProperties, QVariant > &ddValues)
void dataDefinedTextBuffer (QgsPalLayerSettings &tmpLyr, const QMap< QgsPalLayerSettings::DataDefinedProperties, QVariant > &ddValues)
void dataDefinedShapeBackground (QgsPalLayerSettings &tmpLyr, const QMap< QgsPalLayerSettings::DataDefinedProperties, QVariant > &ddValues)
void dataDefinedDropShadow (QgsPalLayerSettings &tmpLyr, const QMap< QgsPalLayerSettings::DataDefinedProperties, QVariant > &ddValues)

Protected Attributes

QHash< QgsVectorLayer
*, QgsPalLayerSettings
mActiveLayers
QHash< QgsVectorLayer
*, QgsDiagramLayerSettings
mActiveDiagramLayers
QgsPalLayerSettings mInvalidLayerSettings
QgsMapRenderermMapRenderer
int mCandPoint
int mCandLine
int mCandPolygon
Search mSearch
pal::Pal * mPal
QList< QgsLabelCandidatemCandidates
bool mShowingCandidates
bool mShowingAllLabels
bool mSavedWithProject
bool mShowingShadowRects
QgsLabelSearchTreemLabelSearchTree

Detailed Description

Definition at line 653 of file qgspallabeling.h.

Member Enumeration Documentation

Enumerator:
LabelText 
LabelBuffer 
LabelShape 
LabelSVG 
LabelShadow 

Definition at line 656 of file qgspallabeling.h.

Enumerator:
Chain 
Popmusic_Tabu 
Popmusic_Chain 
Popmusic_Tabu_Chain 
Falp 

Definition at line 673 of file qgspallabeling.h.

Constructor & Destructor Documentation

QgsPalLabeling::QgsPalLabeling ( )
QgsPalLabeling::~QgsPalLabeling ( )

Definition at line 3056 of file qgspallabeling.cpp.

References clearActiveLayers(), exit(), and mLabelSearchTree.

Member Function Documentation

int QgsPalLabeling::addDiagramLayer ( QgsVectorLayer layer,
QgsDiagramLayerSettings s 
)
virtual
const QList<QgsLabelCandidate>& QgsPalLabeling::candidates ( )
inline

Definition at line 680 of file qgspallabeling.h.

void QgsPalLabeling::clearActiveLayer ( QgsVectorLayer layer)
virtual

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

Note
: this method was added in version 1.9

Implements QgsLabelingEngineInterface.

Definition at line 3087 of file qgspallabeling.cpp.

References QgsPalLayerSettings::dataDefinedProperties, layer(), and mActiveLayers.

Referenced by clearActiveLayers().

void QgsPalLabeling::clearActiveLayers ( )
virtual

clears all PAL layer settings for registered layers

Note
: this method was added in version 1.9

Implements QgsLabelingEngineInterface.

Definition at line 3077 of file qgspallabeling.cpp.

References clearActiveLayer(), and mActiveLayers.

Referenced by init(), and ~QgsPalLabeling().

void QgsPalLabeling::clearEngineSettings ( )
QgsLabelingEngineInterface * QgsPalLabeling::clone ( )
virtual

called when passing engine among map renderers

Implements QgsLabelingEngineInterface.

Definition at line 4842 of file qgspallabeling.cpp.

References mShowingAllLabels, mShowingCandidates, mShowingShadowRects, and QgsPalLabeling().

void QgsPalLabeling::dataDefinedDropShadow ( QgsPalLayerSettings tmpLyr,
const QMap< QgsPalLayerSettings::DataDefinedProperties, QVariant > &  ddValues 
)
protected
void QgsPalLabeling::dataDefinedShapeBackground ( QgsPalLayerSettings tmpLyr,
const QMap< QgsPalLayerSettings::DataDefinedProperties, QVariant > &  ddValues 
)
protected

Definition at line 3606 of file qgspallabeling.cpp.

References QgsPalLayerSettings::ShapeBlendMode, QgsPalLayerSettings::shapeBlendMode, QgsPalLayerSettings::ShapeBorderColor, QgsPalLayerSettings::shapeBorderColor, QgsPalLayerSettings::ShapeBorderWidth, QgsPalLayerSettings::shapeBorderWidth, QgsPalLayerSettings::ShapeBorderWidthUnits, QgsPalLayerSettings::shapeBorderWidthUnits, QgsPalLayerSettings::ShapeDraw, QgsPalLayerSettings::shapeDraw, QgsPalLayerSettings::ShapeFillColor, QgsPalLayerSettings::shapeFillColor, QgsPalLayerSettings::ShapeJoinStyle, QgsPalLayerSettings::shapeJoinStyle, QgsPalLayerSettings::ShapeKind, QgsPalLayerSettings::ShapeOffset, QgsPalLayerSettings::shapeOffset, QgsPalLayerSettings::ShapeOffsetUnits, QgsPalLayerSettings::shapeOffsetUnits, QgsPalLayerSettings::ShapeRadii, QgsPalLayerSettings::shapeRadii, QgsPalLayerSettings::ShapeRadiiUnits, QgsPalLayerSettings::shapeRadiiUnits, QgsPalLayerSettings::ShapeRotation, QgsPalLayerSettings::shapeRotation, QgsPalLayerSettings::ShapeRotationType, QgsPalLayerSettings::shapeRotationType, QgsPalLayerSettings::shapeSize, QgsPalLayerSettings::ShapeSizeType, QgsPalLayerSettings::shapeSizeType, QgsPalLayerSettings::ShapeSizeUnits, QgsPalLayerSettings::shapeSizeUnits, QgsPalLayerSettings::ShapeSizeX, QgsPalLayerSettings::ShapeSizeY, QgsPalLayerSettings::ShapeSVGFile, QgsPalLayerSettings::shapeSVGFile, QgsPalLayerSettings::ShapeTransparency, QgsPalLayerSettings::shapeTransparency, and QgsPalLayerSettings::shapeType.

Referenced by drawLabeling().

void QgsPalLabeling::dataDefinedTextBuffer ( QgsPalLayerSettings tmpLyr,
const QMap< QgsPalLayerSettings::DataDefinedProperties, QVariant > &  ddValues 
)
protected
void QgsPalLabeling::dataDefinedTextFormatting ( QgsPalLayerSettings tmpLyr,
const QMap< QgsPalLayerSettings::DataDefinedProperties, QVariant > &  ddValues 
)
protected
void QgsPalLabeling::dataDefinedTextStyle ( QgsPalLayerSettings tmpLyr,
const QMap< QgsPalLayerSettings::DataDefinedProperties, QVariant > &  ddValues 
)
protected
void QgsPalLabeling::drawLabel ( pal::LabelPosition *  label,
QgsRenderContext context,
QgsPalLayerSettings tmpLyr,
DrawLabelType  drawType 
)

drawLabel

Note
not available in python bindings

Definition at line 4075 of file qgspallabeling.cpp.

References QgsPalLayerSettings::addDirectionSymbol, MathUtils::angle(), QgsPalLayerSettings::blendMode, QgsLabelComponent::dpiRatio(), drawLabelBackground(), drawLabelBuffer(), drawLabelShadow(), LabelBuffer, LabelShape, LabelText, QgsPalLayerSettings::leftDirectionSymbol, QgsPalLayerSettings::Line, M_PI, QgsRenderContext::mapToPixel(), QgsPalLayerSettings::MultiCenter, QgsPalLayerSettings::MultiLeft, QgsPalLayerSettings::multilineAlign, QgsPalLayerSettings::multilineHeight, QgsRenderContext::painter(), QgsPalLayerSettings::placeDirectionSymbol, QgsPalLayerSettings::placement, qgsDoubleNear(), QgsPalLayerSettings::rasterCompressFactor, QgsRenderContext::rasterScaleFactor(), QgsPalLayerSettings::reverseDirectionSymbol, QgsPalLayerSettings::rightDirectionSymbol, QgsLabelComponent::rotation(), QgsLabelComponent::setCenter(), QgsLabelComponent::setDpiRatio(), QgsLabelComponent::setOffset(), QgsLabelComponent::setOrigin(), QgsLabelComponent::setPicture(), QgsLabelComponent::setPictureBuffer(), QgsLabelComponent::setRotation(), QgsLabelComponent::setRotationOffset(), QgsLabelComponent::setSize(), QgsLabelComponent::setText(), QgsPoint::setX(), QgsPoint::setY(), QgsPalLayerSettings::shadowDraw, QgsPalLayerSettings::ShadowText, QgsPalLayerSettings::shadowUnder, QgsPalLayerSettings::SymbolAbove, QgsPalLayerSettings::SymbolBelow, QgsLabelComponent::text(), QgsPalLayerSettings::textColor, QgsPalLayerSettings::textFont, QgsMapToPixel::transform(), QgsRenderContext::useAdvancedEffects(), QgsPalLayerSettings::wrapChar, QgsPoint::x(), and QgsPoint::y().

Referenced by drawLabeling().

void QgsPalLabeling::drawLabelBackground ( QgsRenderContext context,
QgsLabelComponent  component,
const QgsPalLayerSettings tmpLyr 
)
static

Definition at line 4352 of file qgspallabeling.cpp.

References QgsLabelComponent::center(), QgsSvgMarkerSymbolLayerV2::create(), QgsLabelComponent::dpiRatio(), drawLabelShadow(), QgsSymbolLayerV2Utils::encodeOutputUnit(), M_PI, QgsRenderContext::mapToPixel(), QgsSymbolV2::MapUnit, QgsPalLayerSettings::MapUnits, QgsMapToPixel::mapUnitsPerPixel(), QgsSymbolV2::Mixed, QgsSymbolV2::MM, QgsPalLayerSettings::MM, QgsRenderContext::painter(), QgsPalLayerSettings::Percent, QgsPalLayerSettings::rasterCompressFactor, QgsSvgMarkerSymbolLayerV2::renderPoint(), QgsLabelComponent::rotation(), QgsPalLayerSettings::RotationFixed, QgsPalLayerSettings::RotationOffset, QgsLabelComponent::rotationOffset(), QgsRenderContext::scaleFactor(), QgsPalLayerSettings::scaleToPixelContext(), QgsRenderContext::setMapToPixel(), QgsLabelComponent::setOffset(), QgsRenderContext::setPainter(), QgsLabelComponent::setPicture(), QgsLabelComponent::setPictureBuffer(), QgsLabelComponent::setRotation(), QgsLabelComponent::setRotationOffset(), QgsRenderContext::setScaleFactor(), QgsLabelComponent::setSize(), QgsPalLayerSettings::shadowColor, QgsPalLayerSettings::shadowDraw, QgsPalLayerSettings::ShadowShape, QgsPalLayerSettings::shadowUnder, QgsPalLayerSettings::shapeBlendMode, QgsPalLayerSettings::shapeBorderColor, QgsPalLayerSettings::shapeBorderWidth, QgsPalLayerSettings::shapeBorderWidthUnits, QgsPalLayerSettings::ShapeCircle, QgsPalLayerSettings::ShapeEllipse, QgsPalLayerSettings::shapeFillColor, QgsPalLayerSettings::shapeJoinStyle, QgsPalLayerSettings::shapeOffset, QgsPalLayerSettings::shapeOffsetUnits, QgsPalLayerSettings::shapeRadii, QgsPalLayerSettings::shapeRadiiUnits, QgsPalLayerSettings::ShapeRectangle, QgsPalLayerSettings::shapeRotation, QgsPalLayerSettings::shapeRotationType, QgsPalLayerSettings::shapeSize, QgsPalLayerSettings::shapeSizeType, QgsPalLayerSettings::shapeSizeUnits, QgsPalLayerSettings::ShapeSquare, QgsPalLayerSettings::ShapeSVG, QgsPalLayerSettings::shapeSVGFile, QgsPalLayerSettings::shapeTransparency, QgsPalLayerSettings::shapeType, QgsLabelComponent::size(), QgsPalLayerSettings::SizeBuffer, QgsPalLayerSettings::SizeFixed, QgsSymbolLayerV2Utils::symbolNameToPath(), QgsRenderContext::useAdvancedEffects(), QgsPoint::x(), and QgsPoint::y().

Referenced by drawLabel().

void QgsPalLabeling::drawLabelBuffer ( QgsRenderContext context,
QgsLabelComponent  component,
const QgsPalLayerSettings tmpLyr 
)
static
void QgsPalLabeling::drawLabelCandidateRect ( pal::LabelPosition *  lp,
QPainter *  painter,
const QgsMapToPixel xform 
)
Note
not available in python bindings

Definition at line 4054 of file qgspallabeling.cpp.

References M_PI, mCandidates, QgsMapToPixel::transform(), QgsPoint::x(), and QgsPoint::y().

Referenced by drawLabeling().

void QgsPalLabeling::drawLabeling ( QgsRenderContext context)
virtual

called when the map is drawn and labels should be placed

Implements QgsLabelingEngineInterface.

Definition at line 3783 of file qgspallabeling.cpp.

References QgsPalLayerSettings::bufferDraw, QgsLabelSearchTree::clear(), QgsMapRenderer::coordinateTransform(), dataDefinedDropShadow(), dataDefinedShapeBackground(), dataDefinedTextBuffer(), dataDefinedTextFormatting(), dataDefinedTextStyle(), QgsPalGeometry::dataDefinedValues(), QgsPalGeometry::definedFont(), QgsPalGeometry::diagramAttributes(), drawLabel(), drawLabelCandidateRect(), QgsRenderContext::extent(), QgsDiagramLayerSettings::geometries, QgsPalLayerSettings::geometries, QgsLabelSearchTree::insertLabel(), QgsPalGeometry::isDiagram(), QgsPalGeometry::isPinned(), LabelBuffer, LabelShape, LabelText, layer(), QgsPalLayerSettings::limitNumLabels, mActiveDiagramLayers, mActiveLayers, QgsPalLayerSettings::maxNumLabels, mCandidates, QgsPalLayerSettings::mFeatsSendingToPal, QgsPalLayerSettings::mFeaturesToLabel, mLabelSearchTree, mMapRenderer, mPal, mShowingAllLabels, mShowingCandidates, mShowingShadowRects, QgsRenderContext::painter(), QgsDebugMsgLevel, QgsMapRenderer::scale(), QgsPalLayerSettings::ShadowBuffer, QgsPalLayerSettings::shadowDraw, QgsPalLayerSettings::ShadowLowest, QgsPalLayerSettings::ShadowShape, QgsPalLayerSettings::ShadowText, QgsPalLayerSettings::shadowUnder, QgsPalLayerSettings::shapeDraw, QgsPalLayerSettings::showingShadowRects, QgsPalGeometry::strId(), QgsPalLayerSettings::textFont, QgsMapToPixel::transform(), QgsPoint::x(), QgsRectangle::xMaximum(), QgsRectangle::xMinimum(), QgsPoint::y(), QgsRectangle::yMaximum(), and QgsRectangle::yMinimum().

void QgsPalLabeling::drawLabelShadow ( QgsRenderContext context,
QgsLabelComponent  component,
const QgsPalLayerSettings tmpLyr 
)
static
void QgsPalLabeling::exit ( )
virtual

called when we're done with rendering

Implements QgsLabelingEngineInterface.

Definition at line 3451 of file qgspallabeling.cpp.

References mMapRenderer, and mPal.

Referenced by ~QgsPalLabeling().

void QgsPalLabeling::init ( QgsMapRenderer mr)
virtual

called when we're going to start with rendering

Implements QgsLabelingEngineInterface.

Definition at line 3420 of file qgspallabeling.cpp.

References Chain, clearActiveLayers(), Falp, mActiveDiagramLayers, mCandLine, mCandPoint, mCandPolygon, mMapRenderer, mPal, mSearch, Popmusic_Chain, Popmusic_Tabu, and Popmusic_Tabu_Chain.

bool QgsPalLabeling::isShowingAllLabels ( ) const
inline

Definition at line 685 of file qgspallabeling.h.

bool QgsPalLabeling::isShowingCandidates ( ) const
inline

Definition at line 678 of file qgspallabeling.h.

bool QgsPalLabeling::isShowingShadowRectangles ( ) const
inline

Definition at line 682 of file qgspallabeling.h.

bool QgsPalLabeling::isStoredWithProject ( ) const
inline

Definition at line 742 of file qgspallabeling.h.

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

return infos about labels at a given (map) position

Implements QgsLabelingEngineInterface.

Definition at line 3994 of file qgspallabeling.cpp.

References QgsLabelSearchTree::label(), and mLabelSearchTree.

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

return infos about labels within a given (map) rectangle

Implements QgsLabelingEngineInterface.

Definition at line 4012 of file qgspallabeling.cpp.

References QgsLabelSearchTree::labelsInRect(), and mLabelSearchTree.

QgsPalLayerSettings & QgsPalLabeling::layer ( const QString &  layerName)
virtual

returns PAL layer settings for a registered layer

Note
: this method was added in version 1.9

Implements QgsLabelingEngineInterface.

Definition at line 3458 of file qgspallabeling.cpp.

References mActiveLayers, and mInvalidLayerSettings.

Referenced by clearActiveLayer(), QgsComposerMap::containsAdvancedEffects(), drawLabeling(), prepareLayer(), and registerFeature().

void QgsPalLabeling::loadEngineSettings ( )
void QgsPalLabeling::numCandidatePositions ( int &  candPoint,
int &  candLine,
int &  candPolygon 
)

Definition at line 4030 of file qgspallabeling.cpp.

References mCandLine, mCandPoint, and mCandPolygon.

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

hook called when drawing layer before issuing select()

Implements QgsLabelingEngineInterface.

Definition at line 3101 of file qgspallabeling.cpp.

References QgsPalLayerSettings::AroundPoint, QgsMapRenderer::coordinateTransform(), QgsMapLayer::crs(), QgsPalLayerSettings::ct, QgsPalLayerSettings::Curved, QgsPalLayerSettings::dataDefinedProperties, QgsMapRenderer::destinationCrs(), QgsPalLayerSettings::displayAll, QgsExpression::evalErrorString(), QgsMapRenderer::extent(), QgsPalLayerSettings::extentGeom, QgsPalLayerSettings::fieldIndex, QgsVectorLayer::fieldNameIndex(), QgsPalLayerSettings::Free, QgsGeometry::fromRect(), QgsPalLayerSettings::getLabelExpression(), QgsMapRenderer::hasCrsTransformEnabled(), QgsExpression::hasEvalError(), QgsPalLayerSettings::Horizontal, QgsMapLayer::id(), QgsDataDefined::isActive(), QgsPalLayerSettings::isExpression, QgsPalLayerSettings::labelPerPart, layer(), QgsPalLayerSettings::Line, mActiveLayers, QgsPalLayerSettings::mCurFields, QgsPalLayerSettings::mergeLines, QgsPalLayerSettings::mFeatsSendingToPal, mMapRenderer, mPal, QgsPalLayerSettings::obstacle, QgsPalLayerSettings::OverPoint, QgsPalLayerSettings::palLayer, QgsVectorLayer::pendingFields(), QgsPalLayerSettings::placement, QgsPalLayerSettings::placementFlags, QgsExpression::prepare(), QgsPalLayerSettings::priority, QgsPalLayerSettings::ptOne, QgsPalLayerSettings::ptZero, QgsDebugMsgLevel, QgsPalLayerSettings::rasterCompressFactor, QgsRenderContext::rasterScaleFactor(), QgsPalLayerSettings::readFromLayer(), QgsDataDefined::referencedColumns(), QgsExpression::referencedColumns(), QgsRenderContext::rendererScale(), QgsRenderContext::scaleFactor(), QgsDataDefined::setExpressionParams(), QgsPalLayerSettings::ShowAll, QgsPalLayerSettings::ShowDefined, QgsMapToPixel::toMapCoordinates(), QgsPalLayerSettings::Upright, QgsPalLayerSettings::upsidedownLabels, QgsPalLayerSettings::vectorScaleFactor, willUseLayer(), and QgsPalLayerSettings::xform.

void QgsPalLabeling::registerDiagramFeature ( QgsVectorLayer layer,
QgsFeature feat,
const QgsRenderContext context = QgsRenderContext() 
)
virtual
void QgsPalLabeling::registerFeature ( QgsVectorLayer layer,
QgsFeature feat,
const QgsRenderContext context = QgsRenderContext() 
)
virtual

hook called when drawing for every feature in a layer

Implements QgsLabelingEngineInterface.

Definition at line 3320 of file qgspallabeling.cpp.

References layer(), mActiveLayers, and QgsPalLayerSettings::registerFeature().

void QgsPalLabeling::saveEngineSettings ( )
QgsPalLabeling::Search QgsPalLabeling::searchMethod ( ) const

Definition at line 4049 of file qgspallabeling.cpp.

References mSearch.

void QgsPalLabeling::setNumCandidatePositions ( int  candPoint,
int  candLine,
int  candPolygon 
)

Definition at line 4037 of file qgspallabeling.cpp.

References mCandLine, mCandPoint, and mCandPolygon.

void QgsPalLabeling::setSearchMethod ( QgsPalLabeling::Search  s)

Definition at line 4044 of file qgspallabeling.cpp.

References mSearch.

void QgsPalLabeling::setShowingAllLabels ( bool  showing)
inline

Definition at line 686 of file qgspallabeling.h.

void QgsPalLabeling::setShowingCandidates ( bool  showing)
inline

Definition at line 679 of file qgspallabeling.h.

void QgsPalLabeling::setShowingShadowRectangles ( bool  showing)
inline

Definition at line 683 of file qgspallabeling.h.

void QgsPalLabeling::setStoredWithProject ( bool  store)
inline

Definition at line 743 of file qgspallabeling.h.

bool QgsPalLabeling::willUseLayer ( QgsVectorLayer layer)
virtual

called to find out whether the layer is used for labeling

Implements QgsLabelingEngineInterface.

Definition at line 3067 of file qgspallabeling.cpp.

References QgsMapLayer::customProperty().

Referenced by QgsComposerMap::containsAdvancedEffects(), prepareLayer(), and registerDiagramFeature().

Member Data Documentation

QHash<QgsVectorLayer*, QgsDiagramLayerSettings> QgsPalLabeling::mActiveDiagramLayers
protected

Definition at line 769 of file qgspallabeling.h.

Referenced by addDiagramLayer(), drawLabeling(), init(), and registerDiagramFeature().

QHash<QgsVectorLayer*, QgsPalLayerSettings> QgsPalLabeling::mActiveLayers
protected
QList<QgsLabelCandidate> QgsPalLabeling::mCandidates
protected

Definition at line 779 of file qgspallabeling.h.

Referenced by drawLabelCandidateRect(), and drawLabeling().

int QgsPalLabeling::mCandLine
protected
int QgsPalLabeling::mCandPoint
protected
int QgsPalLabeling::mCandPolygon
protected
QgsPalLayerSettings QgsPalLabeling::mInvalidLayerSettings
protected

Definition at line 770 of file qgspallabeling.h.

Referenced by layer().

QgsLabelSearchTree* QgsPalLabeling::mLabelSearchTree
protected
QgsMapRenderer* QgsPalLabeling::mMapRenderer
protected

Definition at line 772 of file qgspallabeling.h.

Referenced by addDiagramLayer(), drawLabeling(), exit(), init(), and prepareLayer().

pal::Pal* QgsPalLabeling::mPal
protected

Definition at line 776 of file qgspallabeling.h.

Referenced by addDiagramLayer(), drawLabeling(), exit(), init(), and prepareLayer().

bool QgsPalLabeling::mSavedWithProject
protected

Definition at line 782 of file qgspallabeling.h.

Referenced by clearEngineSettings(), loadEngineSettings(), and saveEngineSettings().

Search QgsPalLabeling::mSearch
protected
bool QgsPalLabeling::mShowingAllLabels
protected
bool QgsPalLabeling::mShowingCandidates
protected
bool QgsPalLabeling::mShowingShadowRects
protected

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