QGIS API Documentation
2.14.0-Essen
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
core
qgsmaphittest.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsmaphittest.h
3
---------------------
4
begin : September 2014
5
copyright : (C) 2014 by Martin Dobias
6
email : wonder dot sk at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
#ifndef QGSMAPHITTEST_H
16
#define QGSMAPHITTEST_H
17
18
#include "
qgsmapsettings.h
"
19
#include "
qgsgeometry.h
"
20
21
#include <QSet>
22
23
class
QgsRenderContext
;
24
class
QgsSymbolV2
;
25
class
QgsVectorLayer
;
26
class
QgsExpression
;
27
34
class
CORE_EXPORT
QgsMapHitTest
35
{
36
public
:
38
typedef
QMap<QString, QString>
LayerFilterExpression
;
39
43
QgsMapHitTest
(
const
QgsMapSettings
& settings,
const
QgsGeometry
& polygon =
QgsGeometry
(),
const
LayerFilterExpression& layerFilterExpression = LayerFilterExpression() );
44
46
QgsMapHitTest
(
const
QgsMapSettings
& settings,
const
LayerFilterExpression& layerFilterExpression );
47
49
void
run();
50
57
bool
symbolVisible(
QgsSymbolV2
* symbol,
QgsVectorLayer
* layer )
const
;
58
65
bool
legendKeyVisible(
const
QString
& ruleKey,
QgsVectorLayer
* layer )
const
;
66
67
protected
:
68
70
typedef
QSet<QString>
SymbolV2Set
;
71
73
typedef
QMap<QgsVectorLayer*, SymbolV2Set>
HitTest
;
74
83
void
runHitTestLayer(
QgsVectorLayer
* vl, SymbolV2Set& usedSymbols, SymbolV2Set& usedSymbolsRuleKey,
QgsRenderContext
& context );
84
86
QgsMapSettings
mSettings
;
87
89
HitTest
mHitTest
;
90
92
HitTest
mHitTestRuleKey
;
93
95
LayerFilterExpression
mLayerFilterExpression
;
96
98
QgsGeometry
mPolygon
;
99
101
bool
mOnlyExpressions
;
102
};
103
104
#endif // QGSMAPHITTEST_H
QgsMapHitTest::mHitTest
HitTest mHitTest
The hit test.
Definition:
qgsmaphittest.h:89
QgsExpression
Class for parsing and evaluation of expressions (formerly called "search strings").
Definition:
qgsexpression.h:107
QgsMapHitTest::HitTest
QMap< QgsVectorLayer *, SymbolV2Set > HitTest
Definition:
qgsmaphittest.h:73
QgsMapHitTest::mHitTestRuleKey
HitTest mHitTestRuleKey
The hit test, using legend rule keys.
Definition:
qgsmaphittest.h:92
QMap< QString, QString >
QgsGeometry
A geometry is the spatial representation of a feature.
Definition:
qgsgeometry.h:76
qgsmapsettings.h
QgsMapSettings
The QgsMapSettings class contains configuration for rendering of the map.
Definition:
qgsmapsettings.h:53
QgsMapHitTest::mLayerFilterExpression
LayerFilterExpression mLayerFilterExpression
List of expression filter for each layer.
Definition:
qgsmaphittest.h:95
QgsMapHitTest::SymbolV2Set
QSet< QString > SymbolV2Set
Definition:
qgsmaphittest.h:70
QSet< QString >
QString
QgsMapHitTest
Class that runs a hit test with given map settings.
Definition:
qgsmaphittest.h:34
QgsSymbolV2
Definition:
qgssymbolv2.h:52
qgsgeometry.h
QgsRenderContext
Contains information about the context of a rendering operation.
Definition:
qgsrendercontext.h:44
QgsMapHitTest::LayerFilterExpression
QMap< QString, QString > LayerFilterExpression
Maps an expression string to a layer id.
Definition:
qgsmaphittest.h:38
QgsMapHitTest::mPolygon
QgsGeometry mPolygon
Polygon used for filtering items. May be empty.
Definition:
qgsmaphittest.h:98
QgsMapHitTest::mOnlyExpressions
bool mOnlyExpressions
Whether to use only expressions during the filtering.
Definition:
qgsmaphittest.h:101
QgsVectorLayer
Represents a vector layer which manages a vector based data sets.
Definition:
qgsvectorlayer.h:386
QgsMapHitTest::mSettings
QgsMapSettings mSettings
The initial map settings.
Definition:
qgsmaphittest.h:86
Generated on Sat Feb 27 2016 18:33:25 for QGIS API Documentation by
1.8.11