QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
i
l
m
n
o
p
s
t
+
Functions
a
b
c
d
f
g
i
l
m
n
o
p
t
Variables
Typedefs
Enumerations
Enumerator
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
2
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
2
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
+
Enumerations
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
+
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Properties
a
b
c
d
e
f
h
i
l
m
n
o
p
r
s
t
u
v
+
Related Functions
a
c
d
e
f
g
l
n
o
p
q
r
s
t
v
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
+
Variables
a
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
u
z
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
Enumerations
Enumerator
+
Macros
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
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:109
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:54
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:55
qgsgeometry.h
QgsRenderContext
Contains information about the context of a rendering operation.
Definition:
qgsrendercontext.h:45
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:408
QgsMapHitTest::mSettings
QgsMapSettings mSettings
The initial map settings.
Definition:
qgsmaphittest.h:86
Generated on Sun Jun 24 2018 11:42:48 for QGIS API Documentation by
1.8.13