QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
qgsfeaturefilterprovider.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsfeaturefilterprovider.h
3
--------------------------
4
begin : 22-05-2015
5
copyright : (C) 2008 by Stéphane Brunner
6
email : stephane dot brunner at camptocamp dot com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSFEATUREFILTERPROVIDER_H
19
#define QGSFEATUREFILTERPROVIDER_H
20
21
#include "qgis_core.h"
22
#include "
qgis_sip.h
"
23
24
#include <QStringList>
25
#include <QtGlobal>
26
27
class
QString;
28
class
QgsVectorLayer
;
29
class
QgsFeatureRequest
;
30
40
41
class
CORE_EXPORT
QgsFeatureFilterProvider
42
{
43
public
:
44
#ifndef SIP_RUN
45
46
QgsFeatureFilterProvider
() =
default
;
47
48
virtual
~QgsFeatureFilterProvider
() =
default
;
49
50
#endif
51
58
Q_DECL_DEPRECATED
virtual
bool
isFilterThreadSafe
() const
SIP_DEPRECATED
{
return
true
; }
59
67
Q_DECL_DEPRECATED
virtual
void
filterFeatures
(
const
QgsVectorLayer
*layer,
QgsFeatureRequest
&featureRequest )
const
SIP_DEPRECATED
68
{
69
Q_UNUSED( layer )
70
Q_UNUSED( featureRequest )
71
};
72
80
virtual
void
filterFeatures
(
const
QString &layerId,
QgsFeatureRequest
&featureRequest )
const
81
{
82
Q_UNUSED( layerId )
83
Q_UNUSED( featureRequest )
84
};
85
90
virtual
QStringList
layerAttributes
(
const
QgsVectorLayer
*layer,
const
QStringList &attributes )
const
= 0;
91
96
virtual
QgsFeatureFilterProvider
*
clone
()
const
= 0
SIP_FACTORY
;
97
};
98
99
#endif
QgsFeatureFilterProvider::~QgsFeatureFilterProvider
virtual ~QgsFeatureFilterProvider()=default
QgsFeatureFilterProvider::filterFeatures
virtual void filterFeatures(const QString &layerId, QgsFeatureRequest &featureRequest) const
Add additional filters to the feature request to further restrict the features returned by the reques...
Definition
qgsfeaturefilterprovider.h:80
QgsFeatureFilterProvider::layerAttributes
virtual QStringList layerAttributes(const QgsVectorLayer *layer, const QStringList &attributes) const =0
Returns the list of visible attribute names from a list of attributes names for the given layer.
QgsFeatureFilterProvider::filterFeatures
virtual Q_DECL_DEPRECATED void filterFeatures(const QgsVectorLayer *layer, QgsFeatureRequest &featureRequest) const
Add additional filters to the feature request to further restrict the features returned by the reques...
Definition
qgsfeaturefilterprovider.h:67
QgsFeatureFilterProvider::isFilterThreadSafe
virtual Q_DECL_DEPRECATED bool isFilterThreadSafe() const
Returns true if the filterFeature function is thread safe, which will lead to reliance on layer ID in...
Definition
qgsfeaturefilterprovider.h:58
QgsFeatureFilterProvider::QgsFeatureFilterProvider
QgsFeatureFilterProvider()=default
QgsFeatureFilterProvider::clone
virtual QgsFeatureFilterProvider * clone() const =0
Create a clone of the feature filter provider.
QgsFeatureRequest
Wraps a request for features to a vector layer (or directly its vector data provider).
Definition
qgsfeaturerequest.h:85
QgsVectorLayer
Represents a vector layer which manages a vector based dataset.
Definition
qgsvectorlayer.h:414
qgis_sip.h
SIP_DEPRECATED
#define SIP_DEPRECATED
Definition
qgis_sip.h:113
SIP_FACTORY
#define SIP_FACTORY
Definition
qgis_sip.h:83
Generated on
for QGIS API Documentation by
1.17.0