QGIS API Documentation
2.6.0-Brighton
|
#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) |
bool | isShowingPartialsLabels () const |
void | setShowingPartialsLabels (bool showing) |
bool | isDrawingOutlineLabels () const |
void | setDrawingOutlineLabels (bool outline) |
virtual Q_DECL_DEPRECATED void | init (QgsMapRenderer *mr) |
called when we're going to start with rendering | |
virtual void | init (const QgsMapSettings &mapSettings) |
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 (const QString &layerID) |
clears data defined objects from PAL layer settings for a registered layer | |
virtual int | prepareLayer (QgsVectorLayer *layer, QStringList &attrNames, QgsRenderContext &ctx) |
hook called when drawing layer before issuing select() | |
virtual int | addDiagramLayer (QgsVectorLayer *layer, const QgsDiagramLayerSettings *s) |
adds a diagram layer to the labeling engine | |
virtual void | registerFeature (const QString &layerID, QgsFeature &feat, const QgsRenderContext &context=QgsRenderContext(), QString dxfLayer=QString::null) |
hook called when drawing for every feature in a layer | |
virtual void | registerDiagramFeature (const QString &layerID, 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 Q_DECL_DEPRECATED QList< QgsLabelPosition > | labelsAtPosition (const QgsPoint &p) |
return infos about labels at a given (map) position | |
virtual Q_DECL_DEPRECATED QList< QgsLabelPosition > | labelsWithinRect (const QgsRectangle &r) |
return infos about labels within a given (map) rectangle | |
QgsLabelingResults * | takeResults () |
Return pointer to recently computed results (in drawLabeling()) and pass the ownership of results to the caller. | |
virtual QgsLabelingEngineInterface * | clone () |
called when passing engine among map renderers | |
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 | |
void | loadEngineSettings () |
load/save engine settings to project file | |
void | saveEngineSettings () |
void | clearEngineSettings () |
Q_DECL_DEPRECATED bool | isStoredWithProject () const |
Q_DECL_DEPRECATED void | setStoredWithProject (bool store) |
Public Member Functions inherited from QgsLabelingEngineInterface | |
virtual | ~QgsLabelingEngineInterface () |
Static Public Member Functions | |
static bool | staticWillUseLayer (QgsVectorLayer *layer) |
called to find out whether the layer is used for labeling | |
static bool | staticWillUseLayer (const QString &layerID) |
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) |
void | deleteTemporaryData () |
Protected Attributes | |
QHash< QString, QgsPalLayerSettings > | mActiveLayers |
QHash< QString, QgsDiagramLayerSettings > | mActiveDiagramLayers |
QgsPalLayerSettings | mInvalidLayerSettings |
const QgsMapSettings * | mMapSettings |
int | mCandPoint |
int | mCandLine |
int | mCandPolygon |
Search | mSearch |
pal::Pal * | mPal |
QList< QgsLabelCandidate > | mCandidates |
bool | mShowingCandidates |
bool | mShowingAllLabels |
bool | mShowingShadowRects |
bool | mShowingPartialsLabels |
bool | mDrawOutlineLabels |
QgsLabelingResults * | mResults |
QgsPalLabeling::QgsPalLabeling | ( | ) |
QgsPalLabeling::~QgsPalLabeling | ( | ) |
|
virtual |
adds a diagram layer to the labeling engine
Reimplemented from QgsLabelingEngineInterface.
|
inline |
|
virtual |
clears data defined objects from PAL layer settings for a registered layer
Implements QgsLabelingEngineInterface.
|
virtual |
clears all PAL layer settings for registered layers
Implements QgsLabelingEngineInterface.
void QgsPalLabeling::clearEngineSettings | ( | ) |
|
virtual |
called when passing engine among map renderers
Implements QgsLabelingEngineInterface.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
virtual |
|
static |
|
static |
void QgsPalLabeling::drawLabelCandidateRect | ( | pal::LabelPosition * | lp, |
QPainter * | painter, | ||
const QgsMapToPixel * | xform | ||
) |
|
virtual |
called when the map is drawn and labels should be placed
Implements QgsLabelingEngineInterface.
|
static |
|
virtual |
called when we're done with rendering
Implements QgsLabelingEngineInterface.
|
virtual |
called when we're going to start with rendering
Implements QgsLabelingEngineInterface.
|
virtual |
called when we're going to start with rendering
Implements QgsLabelingEngineInterface.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
virtual |
return infos about labels at a given (map) position
Implements QgsLabelingEngineInterface.
|
virtual |
return infos about labels within a given (map) rectangle
Implements QgsLabelingEngineInterface.
|
virtual |
returns PAL layer settings for a registered layer
Implements QgsLabelingEngineInterface.
void QgsPalLabeling::loadEngineSettings | ( | ) |
load/save engine settings to project file
void QgsPalLabeling::numCandidatePositions | ( | int & | candPoint, |
int & | candLine, | ||
int & | candPolygon | ||
) |
|
virtual |
hook called when drawing layer before issuing select()
Implements QgsLabelingEngineInterface.
|
virtual |
called for every diagram feature
Reimplemented from QgsLabelingEngineInterface.
|
virtual |
hook called when drawing for every feature in a layer
Implements QgsLabelingEngineInterface.
void QgsPalLabeling::saveEngineSettings | ( | ) |
QgsPalLabeling::Search QgsPalLabeling::searchMethod | ( | ) | const |
|
inline |
void QgsPalLabeling::setNumCandidatePositions | ( | int | candPoint, |
int | candLine, | ||
int | candPolygon | ||
) |
void QgsPalLabeling::setSearchMethod | ( | QgsPalLabeling::Search | s | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
called to find out whether the layer is used for labeling
|
static |
QgsLabelingResults * QgsPalLabeling::takeResults | ( | ) |
Return pointer to recently computed results (in drawLabeling()) and pass the ownership of results to the caller.
|
virtual |
called to find out whether the layer is used for labeling
Implements QgsLabelingEngineInterface.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |