17#include "moc_qgslayermetadataresultsproxymodel.cpp" 
   21  : QSortFilterProxyModel( parent )
 
 
   27  mFilterExtent = extent;
 
 
   33  mFilterGeometryType = geometryType;
 
 
   45  mFilterMapLayerType = mapLayerType;
 
 
   51  QModelIndex index0 = sourceModel()->index( sourceRow, 0, sourceParent );
 
   52  bool result { QSortFilterProxyModel::filterAcceptsRow( sourceRow, sourceParent ) };
 
   58    if ( !mFilterString.isEmpty() )
 
   60      result = result && metadataResult.
contains( mFilterString );
 
   63    if ( result && !mFilterExtent.
isEmpty() )
 
   69    if ( result && mFilterMapLayerTypeEnabled )
 
   71      result = result && metadataResult.layerType() == mFilterMapLayerType;
 
   74    if ( result && mFilterGeometryTypeEnabled )
 
   82        result = result && metadataResult.geometryType() == mFilterGeometryType;
 
 
   92  mFilterMapLayerTypeEnabled = enabled;
 
 
   98  mFilterGeometryTypeEnabled = enabled;
 
 
  104  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.