QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
qgslayermetadataresultsproxymodel.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgslayermetadataresultsproxymodel.h - QgsLayerMetadataResultsProxyModel
3
4
---------------------
5
begin : 1.9.2022
6
copyright : (C) 2022 by Alessandro Pasotti
7
email : elpaso at itopen dot it
8
***************************************************************************
9
* *
10
* This program is free software; you can redistribute it and/or modify *
11
* it under the terms of the GNU General Public License as published by *
12
* the Free Software Foundation; either version 2 of the License, or *
13
* (at your option) any later version. *
14
* *
15
***************************************************************************/
16
#ifndef QGSLAYERMETADATARESULTSPROXYMODEL_H
17
#define QGSLAYERMETADATARESULTSPROXYMODEL_H
18
19
#include "qgis_gui.h"
20
#include "
qgsrectangle.h
"
21
22
#include <QObject>
23
#include <QSortFilterProxyModel>
24
30
class
GUI_EXPORT
QgsLayerMetadataResultsProxyModel
:
public
QSortFilterProxyModel
31
{
32
Q_OBJECT
33
34
public
:
38
explicit
QgsLayerMetadataResultsProxyModel
( QObject *parent =
nullptr
);
39
43
const
QString
filterString
()
const
;
44
48
void
setFilterGeometryTypeEnabled
(
bool
enabled );
49
53
void
setFilterMapLayerTypeEnabled
(
bool
enabled );
54
55
public
slots:
56
60
void
setFilterExtent
(
const
QgsRectangle
&extent );
61
65
void
setFilterGeometryType
(
Qgis::GeometryType
geometryType );
66
70
void
setFilterString
(
const
QString &
filterString
);
71
75
void
setFilterMapLayerType
(
const
Qgis::LayerType
mapLayerType );
76
77
// QSortFilterProxyModel interface
78
protected
:
79
bool
filterAcceptsRow
(
int
sourceRow,
const
QModelIndex &sourceParent )
const override
;
80
81
82
private
:
83
QgsRectangle
mFilterExtent;
84
QString mFilterString;
85
Qgis::GeometryType
mFilterGeometryType =
Qgis::GeometryType::Point
;
86
Qgis::LayerType
mFilterMapLayerType =
Qgis::LayerType::Vector
;
87
bool
mFilterGeometryTypeEnabled =
false
;
88
bool
mFilterMapLayerTypeEnabled =
false
;
89
};
90
91
#endif
// QGSLAYERMETADATARESULTSPROXYMODEL_H
Qgis::GeometryType
GeometryType
The geometry types are used to group Qgis::WkbType in a coarse way.
Definition
qgis.h:399
Qgis::GeometryType::Point
@ Point
Points.
Definition
qgis.h:400
Qgis::LayerType
LayerType
Types of layers that can be added to a map.
Definition
qgis.h:206
Qgis::LayerType::Vector
@ Vector
Vector layer.
Definition
qgis.h:207
QgsLayerMetadataResultsProxyModel::QgsLayerMetadataResultsProxyModel
QgsLayerMetadataResultsProxyModel(QObject *parent=nullptr)
Constructs a QgsLayerMetadataResultsProxyModel with an optional parent.
Definition
qgslayermetadataresultsproxymodel.cpp:22
QgsLayerMetadataResultsProxyModel::setFilterGeometryType
void setFilterGeometryType(Qgis::GeometryType geometryType)
Sets the geometry type filter to geometryType.
Definition
qgslayermetadataresultsproxymodel.cpp:32
QgsLayerMetadataResultsProxyModel::setFilterString
void setFilterString(const QString &filterString)
Sets the text filter to filterString.
Definition
qgslayermetadataresultsproxymodel.cpp:38
QgsLayerMetadataResultsProxyModel::setFilterExtent
void setFilterExtent(const QgsRectangle &extent)
Sets the extent filter to extent.
Definition
qgslayermetadataresultsproxymodel.cpp:26
QgsLayerMetadataResultsProxyModel::setFilterMapLayerTypeEnabled
void setFilterMapLayerTypeEnabled(bool enabled)
Sets the map layer type filter status to enabled.
Definition
qgslayermetadataresultsproxymodel.cpp:93
QgsLayerMetadataResultsProxyModel::filterAcceptsRow
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override
Definition
qgslayermetadataresultsproxymodel.cpp:50
QgsLayerMetadataResultsProxyModel::setFilterMapLayerType
void setFilterMapLayerType(const Qgis::LayerType mapLayerType)
Sets the map layer type filter to mapLayerType.
Definition
qgslayermetadataresultsproxymodel.cpp:44
QgsLayerMetadataResultsProxyModel::setFilterGeometryTypeEnabled
void setFilterGeometryTypeEnabled(bool enabled)
Sets the geometry type filter status to enabled.
Definition
qgslayermetadataresultsproxymodel.cpp:99
QgsLayerMetadataResultsProxyModel::filterString
const QString filterString() const
Returns the filter string.
Definition
qgslayermetadataresultsproxymodel.cpp:105
QgsRectangle
A rectangle specified with double values.
Definition
qgsrectangle.h:47
qgsrectangle.h
Generated on
for QGIS API Documentation by
1.17.0