QGIS API Documentation
2.12.0-Lyon
|
Class that runs a hit test with given map settings. More...
#include <qgsmaphittest.h>
Public Member Functions | |
QgsMapHitTest (const QgsMapSettings &settings) | |
void | run () |
bool | symbolVisible (QgsSymbolV2 *symbol, QgsVectorLayer *layer) const |
Tests whether a symbol is visible for a specified layer. More... | |
Protected Types | |
typedef QMap< QgsVectorLayer *, SymbolV2Set > | HitTest |
typedef QSet< QString > | SymbolV2Set |
Protected Member Functions | |
void | runHitTestLayer (QgsVectorLayer *vl, SymbolV2Set &usedSymbols, QgsRenderContext &context) |
Runs test for visible symbols within a layer. More... | |
Protected Attributes | |
HitTest | mHitTest |
QgsMapSettings | mSettings |
Class that runs a hit test with given map settings.
Based on the hit test it returns which symbols will be visible on the map - this is useful for content based legend.
Definition at line 18 of file qgsmaphittest.h.
|
protected |
Definition at line 35 of file qgsmaphittest.h.
|
protected |
Definition at line 34 of file qgsmaphittest.h.
QgsMapHitTest::QgsMapHitTest | ( | const QgsMapSettings & | settings | ) |
Definition at line 11 of file qgsmaphittest.cpp.
void QgsMapHitTest::run | ( | ) |
Definition at line 17 of file qgsmaphittest.cpp.
|
protected |
Runs test for visible symbols within a layer.
vl | vector layer |
usedSymbols | set for storage of visible symbols |
context | render context |
Definition at line 62 of file qgsmaphittest.cpp.
bool QgsMapHitTest::symbolVisible | ( | QgsSymbolV2 * | symbol, |
QgsVectorLayer * | layer | ||
) | const |
Tests whether a symbol is visible for a specified layer.
symbol | symbol to find |
layer | vector layer |
Definition at line 54 of file qgsmaphittest.cpp.
|
protected |
Definition at line 46 of file qgsmaphittest.h.
|
protected |
Definition at line 45 of file qgsmaphittest.h.