QGIS API Documentation  3.4.15-Madeira (e83d02e274)
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::QgsOWSServerFilterRestorer ( )
default

Default constructor for 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::QgsOWSServerFilterRestorer ( const QgsOWSServerFilterRestorer rh)
delete

QgsOWSServerFilterRestorer cannot be copied.

Member Function Documentation

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

Apply filter from AccessControl.

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
QgsOWSServerFilterRestorer& QgsOWSServerFilterRestorer::operator= ( const QgsOWSServerFilterRestorer rh)
delete

QgsOWSServerFilterRestorer cannot be copied.

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.

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

Apply filter from AccessControal.

Restore layer filter as original

Definition at line 80 of file qgsfilterrestorer.cpp.


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