QGIS API Documentation
2.0.1-Dufour
|
#include <qgspallabeling.h>
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 () | |
QgsPalLayerSettings & | layer (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< QgsLabelPosition > | labelsAtPosition (const QgsPoint &p) |
return infos about labels at a given (map) position | |
virtual QList< QgsLabelPosition > | labelsWithinRect (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 |
QgsMapRenderer * | mMapRenderer |
int | mCandPoint |
int | mCandLine |
int | mCandPolygon |
Search | mSearch |
pal::Pal * | mPal |
QList< QgsLabelCandidate > | mCandidates |
bool | mShowingCandidates |
bool | mShowingAllLabels |
bool | mSavedWithProject |
bool | mShowingShadowRects |
QgsLabelSearchTree * | mLabelSearchTree |
Definition at line 653 of file qgspallabeling.h.
Definition at line 656 of file qgspallabeling.h.
Definition at line 673 of file qgspallabeling.h.
QgsPalLabeling::QgsPalLabeling | ( | ) |
Definition at line 3030 of file qgspallabeling.cpp.
References Chain, Falp, mCandLine, mCandPoint, mCandPolygon, mLabelSearchTree, mSearch, mShowingAllLabels, mShowingCandidates, mShowingShadowRects, Popmusic_Chain, Popmusic_Tabu, and Popmusic_Tabu_Chain.
Referenced by clone().
QgsPalLabeling::~QgsPalLabeling | ( | ) |
Definition at line 3056 of file qgspallabeling.cpp.
References clearActiveLayers(), exit(), and mLabelSearchTree.
|
virtual |
adds a diagram layer to the labeling engine
Reimplemented from QgsLabelingEngineInterface.
Definition at line 3305 of file qgspallabeling.cpp.
References QgsMapRenderer::coordinateTransform(), QgsMapLayer::crs(), QgsDiagramLayerSettings::ct, QgsMapRenderer::destinationCrs(), QgsMapRenderer::hasCrsTransformEnabled(), QgsMapLayer::id(), mActiveDiagramLayers, mMapRenderer, mPal, QgsDiagramLayerSettings::obstacle, QgsDiagramLayerSettings::palLayer, QgsDiagramLayerSettings::placement, QgsDiagramLayerSettings::placementFlags, QgsDiagramLayerSettings::priority, and QgsDiagramLayerSettings::xform.
|
inline |
Definition at line 680 of file qgspallabeling.h.
|
virtual |
clears data defined objects from PAL layer settings for a registered layer
Implements QgsLabelingEngineInterface.
Definition at line 3087 of file qgspallabeling.cpp.
References QgsPalLayerSettings::dataDefinedProperties, layer(), and mActiveLayers.
Referenced by clearActiveLayers().
|
virtual |
clears all PAL layer settings for registered layers
Implements QgsLabelingEngineInterface.
Definition at line 3077 of file qgspallabeling.cpp.
References clearActiveLayer(), and mActiveLayers.
Referenced by init(), and ~QgsPalLabeling().
void QgsPalLabeling::clearEngineSettings | ( | ) |
Definition at line 4830 of file qgspallabeling.cpp.
References QgsProject::instance(), mSavedWithProject, and QgsProject::removeEntry().
|
virtual |
called when passing engine among map renderers
Implements QgsLabelingEngineInterface.
Definition at line 4842 of file qgspallabeling.cpp.
References mShowingAllLabels, mShowingCandidates, mShowingShadowRects, and QgsPalLabeling().
|
protected |
Definition at line 3717 of file qgspallabeling.cpp.
References QgsPalLayerSettings::ShadowBlendMode, QgsPalLayerSettings::shadowBlendMode, QgsPalLayerSettings::ShadowColor, QgsPalLayerSettings::shadowColor, QgsPalLayerSettings::ShadowDraw, QgsPalLayerSettings::shadowDraw, QgsPalLayerSettings::ShadowOffsetAngle, QgsPalLayerSettings::shadowOffsetAngle, QgsPalLayerSettings::ShadowOffsetDist, QgsPalLayerSettings::shadowOffsetDist, QgsPalLayerSettings::ShadowOffsetUnits, QgsPalLayerSettings::shadowOffsetUnits, QgsPalLayerSettings::ShadowRadius, QgsPalLayerSettings::shadowRadius, QgsPalLayerSettings::ShadowRadiusUnits, QgsPalLayerSettings::shadowRadiusUnits, QgsPalLayerSettings::ShadowScale, QgsPalLayerSettings::shadowScale, QgsPalLayerSettings::ShadowTransparency, QgsPalLayerSettings::shadowTransparency, QgsPalLayerSettings::ShadowUnder, and QgsPalLayerSettings::shadowUnder.
Referenced by drawLabeling().
|
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().
|
protected |
Definition at line 3549 of file qgspallabeling.cpp.
References QgsPalLayerSettings::BufferBlendMode, QgsPalLayerSettings::bufferBlendMode, QgsPalLayerSettings::BufferColor, QgsPalLayerSettings::bufferColor, QgsPalLayerSettings::BufferDraw, QgsPalLayerSettings::bufferDraw, QgsPalLayerSettings::BufferJoinStyle, QgsPalLayerSettings::bufferJoinStyle, QgsPalLayerSettings::BufferSize, QgsPalLayerSettings::bufferSize, QgsPalLayerSettings::bufferSizeInMapUnits, QgsPalLayerSettings::BufferTransp, QgsPalLayerSettings::bufferTransp, QgsPalLayerSettings::BufferUnit, and QgsPalLayerSettings::MapUnits.
Referenced by drawLabeling().
|
protected |
Definition at line 3496 of file qgspallabeling.cpp.
References QgsPalLayerSettings::addDirectionSymbol, QgsPalLayerSettings::DirSymbDraw, QgsPalLayerSettings::DirSymbLeft, QgsPalLayerSettings::DirSymbPlacement, QgsPalLayerSettings::DirSymbReverse, QgsPalLayerSettings::DirSymbRight, QgsPalLayerSettings::leftDirectionSymbol, QgsPalLayerSettings::multilineAlign, QgsPalLayerSettings::MultiLineAlignment, QgsPalLayerSettings::MultiLineHeight, QgsPalLayerSettings::multilineHeight, QgsPalLayerSettings::MultiLineWrapChar, QgsPalLayerSettings::placeDirectionSymbol, QgsPalLayerSettings::reverseDirectionSymbol, QgsPalLayerSettings::rightDirectionSymbol, and QgsPalLayerSettings::wrapChar.
Referenced by drawLabeling().
|
protected |
Definition at line 3471 of file qgspallabeling.cpp.
References QgsPalLayerSettings::blendMode, QgsPalLayerSettings::Color, QgsPalLayerSettings::FontBlendMode, QgsPalLayerSettings::FontTransp, QgsPalLayerSettings::textColor, and QgsPalLayerSettings::textTransp.
Referenced by drawLabeling().
void QgsPalLabeling::drawLabel | ( | pal::LabelPosition * | label, |
QgsRenderContext & | context, | ||
QgsPalLayerSettings & | tmpLyr, | ||
DrawLabelType | drawType | ||
) |
drawLabel
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().
|
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().
|
static |
Definition at line 4298 of file qgspallabeling.cpp.
References QgsPalLayerSettings::bufferBlendMode, QgsPalLayerSettings::bufferColor, QgsPalLayerSettings::bufferJoinStyle, QgsPalLayerSettings::bufferNoFill, QgsPalLayerSettings::bufferSize, QgsPalLayerSettings::bufferSizeInMapUnits, QgsLabelComponent::dpiRatio(), drawLabelShadow(), QgsPalLayerSettings::MapUnits, QgsPalLayerSettings::MM, QgsRenderContext::painter(), QgsPalLayerSettings::scaleToPixelContext(), QgsLabelComponent::setOrigin(), QgsLabelComponent::setPicture(), QgsLabelComponent::setPictureBuffer(), QgsPalLayerSettings::ShadowBuffer, QgsPalLayerSettings::shadowDraw, QgsPalLayerSettings::shadowUnder, QgsLabelComponent::text(), QgsPalLayerSettings::textFont, and QgsRenderContext::useAdvancedEffects().
Referenced by drawLabel().
void QgsPalLabeling::drawLabelCandidateRect | ( | pal::LabelPosition * | lp, |
QPainter * | painter, | ||
const QgsMapToPixel * | xform | ||
) |
Definition at line 4054 of file qgspallabeling.cpp.
References M_PI, mCandidates, QgsMapToPixel::transform(), QgsPoint::x(), and QgsPoint::y().
Referenced by drawLabeling().
|
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().
|
static |
Definition at line 4648 of file qgspallabeling.cpp.
References QgsSymbolLayerV2Utils::blurImageInPlace(), QgsLabelComponent::dpiRatio(), M_PI, QgsPalLayerSettings::MapUnits, QgsLabelComponent::offset(), QgsLabelComponent::origin(), QgsRenderContext::painter(), QgsLabelComponent::picture(), QgsLabelComponent::pictureBuffer(), QgsLabelComponent::rotation(), QgsLabelComponent::rotationOffset(), QgsPalLayerSettings::scaleToPixelContext(), QgsPalLayerSettings::shadowBlendMode, QgsPalLayerSettings::shadowColor, QgsPalLayerSettings::shadowOffsetAngle, QgsPalLayerSettings::shadowOffsetDist, QgsPalLayerSettings::shadowOffsetGlobal, QgsPalLayerSettings::shadowOffsetUnits, QgsPalLayerSettings::shadowRadius, QgsPalLayerSettings::shadowRadiusAlphaOnly, QgsPalLayerSettings::shadowRadiusUnits, QgsPalLayerSettings::shadowScale, QgsPalLayerSettings::shadowTransparency, QgsPalLayerSettings::showingShadowRects, QgsLabelComponent::size(), QgsRenderContext::useAdvancedEffects(), QgsLabelComponent::useOrigin(), QgsPalLayerSettings::vectorScaleFactor, QgsPoint::x(), and QgsPoint::y().
Referenced by drawLabel(), drawLabelBackground(), and drawLabelBuffer().
|
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().
|
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.
|
inline |
Definition at line 685 of file qgspallabeling.h.
|
inline |
Definition at line 678 of file qgspallabeling.h.
|
inline |
Definition at line 682 of file qgspallabeling.h.
|
inline |
Definition at line 742 of file qgspallabeling.h.
|
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.
|
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.
|
virtual |
returns PAL layer settings for a registered layer
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 | ( | ) |
load/save engine settings to project file
Definition at line 4796 of file qgspallabeling.cpp.
References QgsProject::instance(), mCandLine, mCandPoint, mCandPolygon, mSavedWithProject, mSearch, mShowingAllLabels, mShowingCandidates, mShowingShadowRects, QgsProject::readBoolEntry(), and QgsProject::readNumEntry().
void QgsPalLabeling::numCandidatePositions | ( | int & | candPoint, |
int & | candLine, | ||
int & | candPolygon | ||
) |
Definition at line 4030 of file qgspallabeling.cpp.
References mCandLine, mCandPoint, and mCandPolygon.
|
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.
|
virtual |
called for every diagram feature
Reimplemented from QgsLabelingEngineInterface.
Definition at line 3326 of file qgspallabeling.cpp.
References QgsGeometry::asGeos(), QgsFeature::attribute(), QgsFeature::attributes(), QgsFeature::geometry(), QgsFeature::id(), mActiveDiagramLayers, QgsDebugMsgLevel, QgsPalGeometry::setDiagramAttributes(), QgsPalGeometry::setIsDiagram(), QgsDiagramRendererV2::sizeMapUnits(), QgsPalGeometry::strId(), QgsGeometry::transform(), QgsCoordinateTransform::transformInPlace(), willUseLayer(), and QgsPoint::x().
|
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 | ( | ) |
Definition at line 4818 of file qgspallabeling.cpp.
References QgsProject::instance(), mCandLine, mCandPoint, mCandPolygon, mSavedWithProject, mSearch, mShowingAllLabels, mShowingCandidates, mShowingShadowRects, and QgsProject::writeEntry().
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.
|
inline |
Definition at line 686 of file qgspallabeling.h.
|
inline |
Definition at line 679 of file qgspallabeling.h.
|
inline |
Definition at line 683 of file qgspallabeling.h.
|
inline |
Definition at line 743 of file qgspallabeling.h.
|
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().
|
protected |
Definition at line 769 of file qgspallabeling.h.
Referenced by addDiagramLayer(), drawLabeling(), init(), and registerDiagramFeature().
|
protected |
Definition at line 767 of file qgspallabeling.h.
Referenced by clearActiveLayer(), clearActiveLayers(), drawLabeling(), layer(), prepareLayer(), and registerFeature().
|
protected |
Definition at line 779 of file qgspallabeling.h.
Referenced by drawLabelCandidateRect(), and drawLabeling().
|
protected |
Definition at line 773 of file qgspallabeling.h.
Referenced by init(), loadEngineSettings(), numCandidatePositions(), QgsPalLabeling(), saveEngineSettings(), and setNumCandidatePositions().
|
protected |
Definition at line 773 of file qgspallabeling.h.
Referenced by init(), loadEngineSettings(), numCandidatePositions(), QgsPalLabeling(), saveEngineSettings(), and setNumCandidatePositions().
|
protected |
Definition at line 773 of file qgspallabeling.h.
Referenced by init(), loadEngineSettings(), numCandidatePositions(), QgsPalLabeling(), saveEngineSettings(), and setNumCandidatePositions().
|
protected |
Definition at line 770 of file qgspallabeling.h.
Referenced by layer().
|
protected |
Definition at line 785 of file qgspallabeling.h.
Referenced by drawLabeling(), labelsAtPosition(), labelsWithinRect(), QgsPalLabeling(), and ~QgsPalLabeling().
|
protected |
Definition at line 772 of file qgspallabeling.h.
Referenced by addDiagramLayer(), drawLabeling(), exit(), init(), and prepareLayer().
|
protected |
Definition at line 776 of file qgspallabeling.h.
Referenced by addDiagramLayer(), drawLabeling(), exit(), init(), and prepareLayer().
|
protected |
Definition at line 782 of file qgspallabeling.h.
Referenced by clearEngineSettings(), loadEngineSettings(), and saveEngineSettings().
|
protected |
Definition at line 774 of file qgspallabeling.h.
Referenced by init(), loadEngineSettings(), QgsPalLabeling(), saveEngineSettings(), searchMethod(), and setSearchMethod().
|
protected |
Definition at line 781 of file qgspallabeling.h.
Referenced by clone(), drawLabeling(), loadEngineSettings(), QgsPalLabeling(), and saveEngineSettings().
|
protected |
Definition at line 780 of file qgspallabeling.h.
Referenced by clone(), drawLabeling(), loadEngineSettings(), QgsPalLabeling(), and saveEngineSettings().
|
protected |
Definition at line 783 of file qgspallabeling.h.
Referenced by clone(), drawLabeling(), loadEngineSettings(), QgsPalLabeling(), and saveEngineSettings().