QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
Public Types | Signals | Public Member Functions | Properties | List of all members
QgsQuickIdentifyKit Class Reference

Convenient set of tools to identify features. More...

#include <qgsquickidentifykit.h>

Inheritance diagram for QgsQuickIdentifyKit:
Inheritance graph
[legend]

Public Types

enum  IdentifyMode { TopDownAll = 0, TopDownStopAtFirst }
 IdentifyMode enums used to define identify tool behavior on identifiable layers. More...
 

Signals

void featuresLimitChanged ()
 Maximum number of features returned from the QgsQuickIdentifyKit::identify() More...
 
void identifyModeChanged ()
 Defines behavior of the identify tool (See description of IdentifyMode enum). More...
 
void mapSettingsChanged ()
 Map settings. More...
 
void searchRadiusMmChanged ()
 Search radius for the identify functions. More...
 

Public Member Functions

 QgsQuickIdentifyKit (QObject *parent=nullptr)
 Constructor of new identify kit. More...
 
int featuresLimit () const
 Maximum number of features returned from the QgsQuickIdentifyKit::identify() More...
 
Q_INVOKABLE QgsQuickFeatureLayerPairs identify (const QPointF &point, QgsVectorLayer *layer=nullptr)
 Gets all features in the search radius. More...
 
Q_INVOKABLE QgsQuickFeatureLayerPair identifyOne (const QPointF &point, QgsVectorLayer *layer=nullptr)
 Gets the closest feature to the point within the search radius. More...
 
QgsQuickMapSettingsmapSettings () const
 Map settings. More...
 
double searchRadiusMm () const
 Search radius for the identify functions. More...
 
void setFeaturesLimit (int limit)
 Maximum number of features returned from the QgsQuickIdentifyKit::identify() More...
 
void setMapSettings (QgsQuickMapSettings *mapSettings)
 Map settings. More...
 
void setSearchRadiusMm (double searchRadiusMm)
 Search radius for the identify functions. More...
 

Properties

int featuresLimit
 Maximum number of features returned from the QgsQuickIdentifyKit::identify() More...
 
IdentifyMode identifyMode
 Defines behavior of the identify tool (See description of IdentifyMode enum). More...
 
QgsQuickMapSettingsmapSettings
 Map settings. More...
 
double searchRadiusMm
 Search radius for the identify functions. More...
 

Detailed Description

Convenient set of tools to identify features.

Note
QML Type: IdentifyKit
Since
QGIS 3.4

Definition at line 46 of file qgsquickidentifykit.h.

Member Enumeration Documentation

◆ IdentifyMode

IdentifyMode enums used to define identify tool behavior on identifiable layers.

Enumerator
TopDownAll 

Identification is performed from top to bottom down layers returning all identified features;.

TopDownStopAtFirst 

Identification is performed from top to bottom down layers and stops on the first layer returning non-empty list of identified features.

Identification on rest layers is skipped.

Definition at line 81 of file qgsquickidentifykit.h.

Constructor & Destructor Documentation

◆ QgsQuickIdentifyKit()

QgsQuickIdentifyKit::QgsQuickIdentifyKit ( QObject *  parent = nullptr)
explicit

Constructor of new identify kit.

Definition at line 28 of file qgsquickidentifykit.cpp.

Member Function Documentation

◆ featuresLimit()

int QgsQuickIdentifyKit::featuresLimit ( ) const

Maximum number of features returned from the QgsQuickIdentifyKit::identify()

Default is 100.

Definition at line 271 of file qgsquickidentifykit.cpp.

◆ featuresLimitChanged

void QgsQuickIdentifyKit::featuresLimitChanged ( )
signal

Maximum number of features returned from the QgsQuickIdentifyKit::identify()

Default is 100.

◆ identify()

QgsQuickFeatureLayerPairs QgsQuickIdentifyKit::identify ( const QPointF &  point,
QgsVectorLayer layer = nullptr 
)

Gets all features in the search radius.

If layer is nullptr, identifies features from either all identifiable layers (IdentifyMode::TopDownAll) or the first layer from top to bottom layers with non-empty identified feature list (IdentifyMode::TopDownStopAtFirst) If layer is not nullptr, identifies only features from given layer regardless identify mode.

To limit number of results, use QgsQuickIdentifyKit::featuresLimit To modify search radius, use QgsQuickIdentifyKit::searchRadiusMm

Parameters
pointposition to search features ob
layerif defined, search for features only from this layer

Definition at line 47 of file qgsquickidentifykit.cpp.

◆ identifyModeChanged

void QgsQuickIdentifyKit::identifyModeChanged ( )
signal

Defines behavior of the identify tool (See description of IdentifyMode enum).

Default is TopDownAll.

◆ identifyOne()

QgsQuickFeatureLayerPair QgsQuickIdentifyKit::identifyOne ( const QPointF &  point,
QgsVectorLayer layer = nullptr 
)

Gets the closest feature to the point within the search radius.

If layer is nullptr, identifies the closest feature from either all identifiable layers (IdentifyMode::TopDownAll) or the first layer from top to bottom layers with non-empty identified feature list (IdentifyMode::TopDownStopAtFirst) If layer is not nullptr, identifies the closest feature from given layer regardless identify mode.

To modify search radius, use QgsQuickIdentifyKit::searchRadiusMm

Parameters
pointposition to search a feature from
layerif defined, search for a feature only from this layer

Definition at line 161 of file qgsquickidentifykit.cpp.

◆ mapSettings()

QgsQuickMapSettings * QgsQuickIdentifyKit::mapSettings ( ) const

Map settings.

Set directly when creating QML object.

Definition at line 33 of file qgsquickidentifykit.cpp.

◆ mapSettingsChanged

void QgsQuickIdentifyKit::mapSettingsChanged ( )
signal

Map settings.

Set directly when creating QML object.

◆ searchRadiusMm()

double QgsQuickIdentifyKit::searchRadiusMm ( ) const

Search radius for the identify functions.

Default is 8.

Definition at line 257 of file qgsquickidentifykit.cpp.

◆ searchRadiusMmChanged

void QgsQuickIdentifyKit::searchRadiusMmChanged ( )
signal

Search radius for the identify functions.

Default is 8.

◆ setFeaturesLimit()

void QgsQuickIdentifyKit::setFeaturesLimit ( int  limit)

Maximum number of features returned from the QgsQuickIdentifyKit::identify()

Default is 100.

Definition at line 276 of file qgsquickidentifykit.cpp.

◆ setMapSettings()

void QgsQuickIdentifyKit::setMapSettings ( QgsQuickMapSettings mapSettings)

Map settings.

Set directly when creating QML object.

Definition at line 38 of file qgsquickidentifykit.cpp.

◆ setSearchRadiusMm()

void QgsQuickIdentifyKit::setSearchRadiusMm ( double  searchRadiusMm)

Search radius for the identify functions.

Default is 8.

Definition at line 262 of file qgsquickidentifykit.cpp.

Property Documentation

◆ featuresLimit

int QgsQuickIdentifyKit::featuresLimit
readwrite

Maximum number of features returned from the QgsQuickIdentifyKit::identify()

Default is 100.

Definition at line 1 of file qgsquickidentifykit.h.

◆ identifyMode

IdentifyMode QgsQuickIdentifyKit::identifyMode

Defines behavior of the identify tool (See description of IdentifyMode enum).

Default is TopDownAll.

Definition at line 1 of file qgsquickidentifykit.h.

◆ mapSettings

QgsQuickMapSettings * QgsQuickIdentifyKit::mapSettings
readwrite

Map settings.

Set directly when creating QML object.

Definition at line 1 of file qgsquickidentifykit.h.

◆ searchRadiusMm

double QgsQuickIdentifyKit::searchRadiusMm
readwrite

Search radius for the identify functions.

Default is 8.

Definition at line 1 of file qgsquickidentifykit.h.


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