QGIS API Documentation 3.41.0-Master (d5b93354e9c)
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
QgsOWSServerFilterRestorer Class Reference

RAII class to restore layer filters on destruction. More...

#include <qgsfilterrestorer.h>

Public Member Functions

 QgsOWSServerFilterRestorer ()=default
 Default constructor for QgsOWSServerFilterRestorer.
 
 QgsOWSServerFilterRestorer (const QgsOWSServerFilterRestorer &rh)=delete
 
 ~QgsOWSServerFilterRestorer ()
 Destructor. When object is destroyed all original layer filters will be restored.
 
QgsOWSServerFilterRestoreroperator= (const QgsOWSServerFilterRestorer &rh)=delete
 
QHash< QgsMapLayer *, QString > & originalFilters ()
 Returns a reference to the object's hash of layers to original subsetString filters.
 
void restoreLayerFilters (const QHash< QgsMapLayer *, QString > &filterMap)
 Apply filter from AccessControal.
 

Static Public Member Functions

static void applyAccessControlLayerFilters (const QgsAccessControl *accessControl, QgsMapLayer *mapLayer)
 Applies filters from access control on layer.
 
static void applyAccessControlLayerFilters (const QgsAccessControl *accessControl, QgsMapLayer *mapLayer, QHash< QgsMapLayer *, QString > &originalLayerFilters)
 Apply filter from AccessControl.
 

Detailed Description

RAII class to restore layer filters on destruction.

Definition at line 35 of file qgsfilterrestorer.h.

Constructor & Destructor Documentation

◆ QgsOWSServerFilterRestorer() [1/2]

QgsOWSServerFilterRestorer::QgsOWSServerFilterRestorer ( )
default

Default constructor for QgsOWSServerFilterRestorer.

◆ ~QgsOWSServerFilterRestorer()

QgsOWSServerFilterRestorer::~QgsOWSServerFilterRestorer ( )
inline

Destructor. When object is destroyed all original layer filters will be restored.

Definition at line 45 of file qgsfilterrestorer.h.

◆ QgsOWSServerFilterRestorer() [2/2]

QgsOWSServerFilterRestorer::QgsOWSServerFilterRestorer ( const QgsOWSServerFilterRestorer rh)
delete

Member Function Documentation

◆ applyAccessControlLayerFilters() [1/2]

static void QgsOWSServerFilterRestorer::applyAccessControlLayerFilters ( const QgsAccessControl accessControl,
QgsMapLayer mapLayer 
)
static

Applies filters from access control on layer.

Parameters
accessControlThe access control instance
mapLayerThe layer on which the filter has to be applied

◆ applyAccessControlLayerFilters() [2/2]

static void QgsOWSServerFilterRestorer::applyAccessControlLayerFilters ( const QgsAccessControl accessControl,
QgsMapLayer mapLayer,
QHash< QgsMapLayer *, QString > &  originalLayerFilters 
)
static

Apply filter from AccessControl.

◆ operator=()

QgsOWSServerFilterRestorer & QgsOWSServerFilterRestorer::operator= ( const QgsOWSServerFilterRestorer rh)
delete

◆ originalFilters()

QHash< QgsMapLayer *, QString > & QgsOWSServerFilterRestorer::originalFilters ( )
inline

Returns a reference to the object's hash of layers to original subsetString filters.

Original layer subsetString filters MUST be inserted into this hash before modifying them.

Definition at line 59 of file qgsfilterrestorer.h.

◆ restoreLayerFilters()

void QgsOWSServerFilterRestorer::restoreLayerFilters ( const QHash< QgsMapLayer *, QString > &  filterMap)

Apply filter from AccessControal.

Restore layer filter as original

Definition at line 79 of file qgsfilterrestorer.cpp.


The documentation for this class was generated from the following files: