17#include "moc_qgslayermetadataresultsproxymodel.cpp"
26 mFilterExtent = extent;
32 mFilterGeometryType = geometryType;
44 mFilterMapLayerType = mapLayerType;
50 QModelIndex index0 = sourceModel()->index( sourceRow, 0, sourceParent );
51 bool result { QSortFilterProxyModel::filterAcceptsRow( sourceRow, sourceParent ) };
57 if ( ! mFilterString.isEmpty() )
59 result = result && metadataResult.
contains( mFilterString );
62 if ( result && ! mFilterExtent.
isEmpty() )
68 if ( result && mFilterMapLayerTypeEnabled )
70 result = result && metadataResult.layerType() == mFilterMapLayerType;
73 if ( result && mFilterGeometryTypeEnabled )
81 result = result && metadataResult.geometryType() == mFilterGeometryType;
91 mFilterMapLayerTypeEnabled = enabled;
97 mFilterGeometryTypeEnabled = enabled;
103 return mFilterString;
GeometryType
The geometry types are used to group Qgis::WkbType in a coarse way.
LayerType
Types of layers that can be added to a map.
A rectangle specified with double values.
bool intersects(const QgsRectangle &rect) const
Returns true when rectangle intersects with other rectangle.
bool isEmpty() const
Returns true if the rectangle has no area.