QGIS API Documentation  2.2.0-Valmiera
 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 More...
 
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)
 
bool isShowingPartialsLabels () const
 
void setShowingPartialsLabels (bool showing)
 
virtual void init (QgsMapRenderer *mr)
 called when we're going to start with rendering More...
 
virtual bool willUseLayer (QgsVectorLayer *layer)
 called to find out whether the layer is used for labeling More...
 
virtual void clearActiveLayers ()
 clears all PAL layer settings for registered layers More...
 
virtual void clearActiveLayer (QgsVectorLayer *layer)
 clears data defined objects from PAL layer settings for a registered layer More...
 
virtual int prepareLayer (QgsVectorLayer *layer, QSet< int > &attrIndices, QgsRenderContext &ctx)
 hook called when drawing layer before issuing select() More...
 
virtual int addDiagramLayer (QgsVectorLayer *layer, QgsDiagramLayerSettings *s)
 adds a diagram layer to the labeling engine More...
 
virtual void registerFeature (QgsVectorLayer *layer, QgsFeature &feat, const QgsRenderContext &context=QgsRenderContext())
 hook called when drawing for every feature in a layer More...
 
virtual void registerDiagramFeature (QgsVectorLayer *layer, QgsFeature &feat, const QgsRenderContext &context=QgsRenderContext())
 called for every diagram feature More...
 
virtual void drawLabeling (QgsRenderContext &context)
 called when the map is drawn and labels should be placed More...
 
virtual void exit ()
 called when we're done with rendering More...
 
virtual QList< QgsLabelPositionlabelsAtPosition (const QgsPoint &p)
 return infos about labels at a given (map) position More...
 
virtual QList< QgsLabelPositionlabelsWithinRect (const QgsRectangle &r)
 return infos about labels within a given (map) rectangle More...
 
virtual
QgsLabelingEngineInterface
clone ()
 called when passing engine among map renderers More...
 
void drawLabelCandidateRect (pal::LabelPosition *lp, QPainter *painter, const QgsMapToPixel *xform)
 
virtual void drawLabel (pal::LabelPosition *label, QgsRenderContext &context, QgsPalLayerSettings &tmpLyr, DrawLabelType drawType, double dpiRatio=1.0)
 drawLabel More...
 
void loadEngineSettings ()
 load/save engine settings to project file More...
 
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
 
bool mShowingPartialsLabels
 
QgsLabelSearchTreemLabelSearchTree
 

Detailed Description

Definition at line 654 of file qgspallabeling.h.

Member Enumeration Documentation

Enumerator
LabelText 
LabelBuffer 
LabelShape 
LabelSVG 
LabelShadow 

Definition at line 657 of file qgspallabeling.h.

Enumerator
Chain 
Popmusic_Tabu 
Popmusic_Chain 
Popmusic_Tabu_Chain 
Falp 

Definition at line 674 of file qgspallabeling.h.

Constructor & Destructor Documentation

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

Definition at line 3072 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 681 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 3103 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 3093 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 4871 of file qgspallabeling.cpp.

References mShowingAllLabels, mShowingCandidates, mShowingPartialsLabels, 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 3634 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,
double  dpiRatio = 1.0 
)
virtual

drawLabel

Note
not available in python bindings

Definition at line 4114 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, QgsPalLayerSettings::rasterCompressFactor, 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 4377 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 4093 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 3811 of file qgspallabeling.cpp.

References QgsPalLayerSettings::bufferDraw, QgsLabelSearchTree::clear(), QgsMapRenderer::coordinateTransform(), dataDefinedDropShadow(), dataDefinedShapeBackground(), dataDefinedTextBuffer(), dataDefinedTextFormatting(), dataDefinedTextStyle(), QgsPalGeometry::dataDefinedValues(), QgsPalGeometry::definedFont(), drawLabel(), drawLabelCandidateRect(), QgsRenderContext::extent(), QgsPalGeometry::feature(), 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 3479 of file qgspallabeling.cpp.

References mMapRenderer, and mPal.

Referenced by ~QgsPalLabeling().

void QgsPalLabeling::init ( QgsMapRenderer mr)
virtual
bool QgsPalLabeling::isShowingAllLabels ( ) const
inline

Definition at line 686 of file qgspallabeling.h.

bool QgsPalLabeling::isShowingCandidates ( ) const
inline

Definition at line 679 of file qgspallabeling.h.

bool QgsPalLabeling::isShowingPartialsLabels ( ) const
inline

Definition at line 689 of file qgspallabeling.h.

bool QgsPalLabeling::isShowingShadowRectangles ( ) const
inline

Definition at line 683 of file qgspallabeling.h.

bool QgsPalLabeling::isStoredWithProject ( ) const
inline

Definition at line 746 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 4033 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 4051 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 3486 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 4069 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 3117 of file qgspallabeling.cpp.

References QgsPalLayerSettings::AroundPoint, QgsCoordinateTransform::clone(), QgsMapRenderer::coordinateTransform(), QgsPalLayerSettings::ct, QgsPalLayerSettings::Curved, QgsPalLayerSettings::dataDefinedProperties, 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(), tr, QgsMapRenderer::transformation(), 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 3346 of file qgspallabeling.cpp.

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

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

Definition at line 4088 of file qgspallabeling.cpp.

References mSearch.

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

Definition at line 4076 of file qgspallabeling.cpp.

References mCandLine, mCandPoint, and mCandPolygon.

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

Definition at line 4083 of file qgspallabeling.cpp.

References mSearch.

void QgsPalLabeling::setShowingAllLabels ( bool  showing)
inline

Definition at line 687 of file qgspallabeling.h.

void QgsPalLabeling::setShowingCandidates ( bool  showing)
inline

Definition at line 680 of file qgspallabeling.h.

void QgsPalLabeling::setShowingPartialsLabels ( bool  showing)
inline

Definition at line 690 of file qgspallabeling.h.

void QgsPalLabeling::setShowingShadowRectangles ( bool  showing)
inline

Definition at line 684 of file qgspallabeling.h.

void QgsPalLabeling::setStoredWithProject ( bool  store)
inline

Definition at line 747 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 3083 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 773 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 783 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 774 of file qgspallabeling.h.

Referenced by layer().

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

Definition at line 776 of file qgspallabeling.h.

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

pal::Pal* QgsPalLabeling::mPal
protected

Definition at line 780 of file qgspallabeling.h.

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

bool QgsPalLabeling::mSavedWithProject
protected

Definition at line 786 of file qgspallabeling.h.

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

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

Definition at line 788 of file qgspallabeling.h.

Referenced by clone(), init(), loadEngineSettings(), QgsPalLabeling(), and saveEngineSettings().

bool QgsPalLabeling::mShowingShadowRects
protected

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