QGIS API Documentation
3.8.0-Zanzibar (11aff65)
|
Convenient set of tools to identify features. More...
#include <qgsquickidentifykit.h>
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... | |
QgsQuickMapSettings * | mapSettings () 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... | |
Convenient set of tools to identify features.
Definition at line 46 of file qgsquickidentifykit.h.
IdentifyMode enums used to define identify tool behavior on identifiable layers.
Definition at line 81 of file qgsquickidentifykit.h.
|
explicit |
Constructor of new identify kit.
Definition at line 28 of file qgsquickidentifykit.cpp.
int QgsQuickIdentifyKit::featuresLimit | ( | ) | const |
Maximum number of features returned from the QgsQuickIdentifyKit::identify()
Default is 100.
|
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
point | position to search features ob |
layer | if defined, search for features only from this layer |
Definition at line 47 of file qgsquickidentifykit.cpp.
|
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
point | position to search a feature from |
layer | if defined, search for a feature only from this layer |
Definition at line 161 of file qgsquickidentifykit.cpp.
QgsQuickMapSettings* QgsQuickIdentifyKit::mapSettings | ( | ) | const |
Map settings.
Set directly when creating QML object.
|
signal |
Map settings.
Set directly when creating QML object.
double QgsQuickIdentifyKit::searchRadiusMm | ( | ) | const |
Search radius for the identify functions.
Default is 8.
|
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 276 of file qgsquickidentifykit.cpp.
void QgsQuickIdentifyKit::setMapSettings | ( | QgsQuickMapSettings * | mapSettings | ) |
Map settings.
Set directly when creating QML object.
Definition at line 38 of file qgsquickidentifykit.cpp.
void QgsQuickIdentifyKit::setSearchRadiusMm | ( | double | searchRadiusMm | ) |
Search radius for the identify functions.
Default is 8.
Definition at line 262 of file qgsquickidentifykit.cpp.
|
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.
|
readwrite |
Map settings.
Set directly when creating QML object.
Definition at line 53 of file qgsquickidentifykit.h.
|
readwrite |
Search radius for the identify functions.
Default is 8.
Definition at line 60 of file qgsquickidentifykit.h.