QGIS API Documentation  3.6.0-Noosa (5873452)
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. More...
 
 QgsOWSServerFilterRestorer (const QgsOWSServerFilterRestorer &rh)=delete
 QgsOWSServerFilterRestorer cannot be copied. More...
 
 ~QgsOWSServerFilterRestorer ()
 Destructor. When object is destroyed all original layer filters will be restored. More...
 
QgsOWSServerFilterRestoreroperator= (const QgsOWSServerFilterRestorer &rh)=delete
 QgsOWSServerFilterRestorer cannot be copied. More...
 
QHash< QgsMapLayer *, QString > & originalFilters ()
 Returns a reference to the object's hash of layers to original subsetString filters. More...
 
void restoreLayerFilters (const QHash< QgsMapLayer *, QString > &filterMap)
 Apply filter from AccessControal. More...
 

Static Public Member Functions

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

Detailed Description

RAII class to restore layer filters on destruction.

Since
QGIS 3.0

Definition at line 36 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 46 of file qgsfilterrestorer.h.

◆ QgsOWSServerFilterRestorer() [2/2]

QgsOWSServerFilterRestorer::QgsOWSServerFilterRestorer ( const QgsOWSServerFilterRestorer rh)
delete

QgsOWSServerFilterRestorer cannot be copied.

Member Function Documentation

◆ applyAccessControlLayerFilters() [1/2]

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

Apply filter from AccessControl.

◆ applyAccessControlLayerFilters() [2/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
Since
QGIS 3.0

◆ operator=()

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

QgsOWSServerFilterRestorer cannot be copied.

◆ 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 62 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: