QGIS API Documentation  3.4.15-Madeira (e83d02e274)
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...
 
QgsQuickMapSettings mapSettings
 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 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 ( QObject *  parent = nullptr)
explicit

Constructor of new identify kit.

Definition at line 27 of file qgsquickidentifykit.cpp.

Member Function Documentation

int QgsQuickIdentifyKit::featuresLimit ( ) const

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

Default is 100.

void QgsQuickIdentifyKit::featuresLimitChanged ( )
signal

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

Default is 100.

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 46 of file qgsquickidentifykit.cpp.

void QgsQuickIdentifyKit::identifyModeChanged ( )
signal

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

Default is TopDownAll.

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 136 of file qgsquickidentifykit.cpp.

QgsQuickMapSettings* QgsQuickIdentifyKit::mapSettings ( ) const

Map settings.

Set directly when creating QML object.

void QgsQuickIdentifyKit::mapSettingsChanged ( )
signal

Map settings.

Set directly when creating QML object.

double QgsQuickIdentifyKit::searchRadiusMm ( ) const

Search radius for the identify functions.

Default is 8.

void QgsQuickIdentifyKit::searchRadiusMmChanged ( )
signal

Search radius for the identify functions.

Default is 8.

void QgsQuickIdentifyKit::setFeaturesLimit ( int  limit)

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

Default is 100.

Definition at line 251 of file qgsquickidentifykit.cpp.

void QgsQuickIdentifyKit::setMapSettings ( QgsQuickMapSettings mapSettings)

Map settings.

Set directly when creating QML object.

Definition at line 37 of file qgsquickidentifykit.cpp.

void QgsQuickIdentifyKit::setSearchRadiusMm ( double  searchRadiusMm)

Search radius for the identify functions.

Default is 8.

Definition at line 237 of file qgsquickidentifykit.cpp.

Property Documentation

int QgsQuickIdentifyKit::featuresLimit
readwrite

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

Default is 100.

Definition at line 67 of file qgsquickidentifykit.h.

IdentifyMode QgsQuickIdentifyKit::identifyMode

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

Default is TopDownAll.

Definition at line 74 of file qgsquickidentifykit.h.

QgsQuickMapSettings * QgsQuickIdentifyKit::mapSettings
readwrite

Map settings.

Set directly when creating QML object.

Definition at line 53 of file qgsquickidentifykit.h.

double QgsQuickIdentifyKit::searchRadiusMm
readwrite

Search radius for the identify functions.

Default is 8.

Definition at line 60 of file qgsquickidentifykit.h.


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