QGIS API Documentation 4.0.0-Norrköping (1ddcee3d0e4)
Loading...
Searching...
No Matches
qgsfeaturefiltermodel.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsfeaturefiltermodel.h - QgsFeatureFilterModel
3 ---------------------
4 begin : 10.3.2017
5 copyright : (C) 2017 by Matthias Kuhn
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 QGSFEATUREFILTERMODEL_H
16#define QGSFEATUREFILTERMODEL_H
17
18
20
28{
29 Q_OBJECT
30
37
38
42
43 public:
47 explicit QgsFeatureFilterModel( QObject *parent = nullptr );
48
55 Q_DECL_DEPRECATED QString identifierField() const;
56
62 QStringList identifierFields() const;
63
70 void setIdentifierFields( const QStringList &identifierFields );
71
77 void setExtraIdentifierValueToNull() override;
78
84 QVariantList extraIdentifierValues() const;
85
91 void setExtraIdentifierValues( const QVariantList &extraIdentifierValues );
92
93
94 signals:
95
101
107
108 private:
109 QgsFeatureExpressionValuesGatherer *createValuesGatherer( const QgsFeatureRequest &request ) const override;
110
111 void requestToReloadCurrentFeature( QgsFeatureRequest &request ) override SIP_FORCE;
112
113 QSet<QString> requestedAttributes() const override;
114
115 QVariant entryIdentifier( const QgsFeatureExpressionValuesGatherer::Entry &entry ) const override;
116
117 QgsFeatureExpressionValuesGatherer::Entry createEntry( const QVariant &identifier ) const override;
118
119 bool compareEntries( const QgsFeatureExpressionValuesGatherer::Entry &a, const QgsFeatureExpressionValuesGatherer::Entry &b ) const override;
120
121 bool identifierIsNull( const QVariant &identifier ) const override;
122
123 QVariant nullIdentifier() const override;
124
125 QStringList mIdentifierFields;
126};
127
128#endif // QGSFEATUREFILTERMODEL_H
void setExtraIdentifierValues(const QVariantList &extraIdentifierValues)
Allows specifying one value that does not need to match the filter criteria but will still be availab...
void setExtraIdentifierValueToNull() override
Allows specifying one value that does not need to match the filter criteria but will still be availab...
void extraIdentifierValuesChanged()
Allows specifying one value that does not need to match the filter criteria but will still be availab...
Q_DECL_DEPRECATED QString identifierField() const
The identifier field should be a unique field that can be used to identify individual features.
QgsFeatureFilterModel(QObject *parent=nullptr)
Create a new QgsFeatureFilterModel, optionally specifying a parent.
QStringList identifierFields
A set of fields of sourceLayer that is unique and should be used to identify features.
QVariantList extraIdentifierValues
The values that identifies the current feature.
void identifierFieldsChanged()
The identifier field should be a unique field that can be used to identify individual features.
void setIdentifierFields(const QStringList &identifierFields)
The identifier field should be a unique field that can be used to identify individual features.
QModelIndex parent(const QModelIndex &child) const override
QgsFeaturePickerModelBase(QObject *parent=nullptr)
Create a new QgsFeaturePickerModelBase, optionally specifying a parent.
Wraps a request for features to a vector layer (or directly its vector data provider).
#define SIP_FORCE
Definition qgis_sip.h:138