QGIS API Documentation 3.27.0-Master (75dc696944)
Static Public Member Functions | List of all members
QgsMapCanvasUtils Class Reference

Utility functions for working with QgsMapCanvas widgets. More...

#include <qgsmapcanvasutils.h>

Static Public Member Functions

static QString filterForLayer (QgsMapCanvas *canvas, QgsVectorLayer *layer)
 Constructs a filter to use for selecting features from the given layer, in order to apply filters which prevent some features from being displayed (e.g. More...
 
static long flashMatchingFeatures (QgsMapCanvas *canvas, QgsVectorLayer *layer, const QString &filter)
 Flashes features from the specified layer which match the given filter expression string with a map canvas. More...
 
static long zoomToMatchingFeatures (QgsMapCanvas *canvas, QgsVectorLayer *layer, const QString &filter)
 Zooms a map canvas to features from the specified layer which match the given filter expression string. More...
 

Detailed Description

Utility functions for working with QgsMapCanvas widgets.

Since
QGIS 3.14

Definition at line 31 of file qgsmapcanvasutils.h.

Member Function Documentation

◆ filterForLayer()

QString QgsMapCanvasUtils::filterForLayer ( QgsMapCanvas canvas,
QgsVectorLayer layer 
)
static

Constructs a filter to use for selecting features from the given layer, in order to apply filters which prevent some features from being displayed (e.g.

as a result of temporal range of the canvas and the layer's temporal settings).

Will return an empty string if no filtering is required, or "\c false" if ALL features are filtered out by the canvas.

Since
QGIS 3.26

Definition at line 79 of file qgsmapcanvasutils.cpp.

◆ flashMatchingFeatures()

long QgsMapCanvasUtils::flashMatchingFeatures ( QgsMapCanvas canvas,
QgsVectorLayer layer,
const QString &  filter 
)
static

Flashes features from the specified layer which match the given filter expression string with a map canvas.

The total count of matching features will be returned.

Definition at line 55 of file qgsmapcanvasutils.cpp.

◆ zoomToMatchingFeatures()

long QgsMapCanvasUtils::zoomToMatchingFeatures ( QgsMapCanvas canvas,
QgsVectorLayer layer,
const QString &  filter 
)
static

Zooms a map canvas to features from the specified layer which match the given filter expression string.

The total count of matching features will be returned.

Definition at line 22 of file qgsmapcanvasutils.cpp.


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