16 #ifndef QGSMAPTOOLIDENTIFY_H
17 #define QGSMAPTOOLIDENTIFY_H
59 DefaultQgsSetting = -1,
65 Q_ENUM( IdentifyMode )
76 Q_DECLARE_FLAGS( LayerType, Type )
85 : mLayer( layer ), mFeature( feature ), mDerivedAttributes( derivedAttributes ) {}
87 IdentifyResult(
QgsMapLayer *layer,
const QString &label,
const QMap< QString, QString > &attributes,
const QMap< QString, QString > &derivedAttributes )
88 : mLayer( layer ), mLabel( label ), mAttributes( attributes ), mDerivedAttributes( derivedAttributes ) {}
91 : mLayer( layer ), mLabel( label ), mFields( fields ), mFeature( feature ), mDerivedAttributes( derivedAttributes ) {}
123 QList<QgsMapToolIdentify::IdentifyResult> identify(
int x,
int y,
const QList<QgsMapLayer *> &layerList = QList<QgsMapLayer *>(), IdentifyMode mode = DefaultQgsSetting,
const QgsIdentifyContext &identifyContext =
QgsIdentifyContext() );
136 QList<QgsMapToolIdentify::IdentifyResult> identify(
int x,
int y, IdentifyMode mode, LayerType layerType = AllLayers,
const QgsIdentifyContext &identifyContext =
QgsIdentifyContext() );
155 static void fromPointCloudIdentificationToIdentifyResults(
QgsPointCloudLayer *layer,
const QVector<QVariantMap> &identified, QList<QgsMapToolIdentify::IdentifyResult> &results )
SIP_SKIP;
215 QMap< QString, QString > derivedAttributesForPoint(
const QgsPoint &point );
229 void setCanvasPropertiesOverrides(
double searchRadiusMapUnits );
236 void restoreCanvasPropertiesOverrides();
266 QString formatDistance(
double distance )
const;
273 QString formatArea(
double area )
const;
297 void closestPointAttributes(
const QgsAbstractGeometry &geometry,
const QgsPointXY &layerPoint, QMap< QString, QString > &derivedAttributes );
299 QString formatCoordinate(
const QgsPointXY &canvasPoint )
const;
300 QString formatXCoordinate(
const QgsPointXY &canvasPoint )
const;
301 QString formatYCoordinate(
const QgsPointXY &canvasPoint )
const;
306 double mLastMapUnitsPerPixel;
310 int mCoordinatePrecision;
312 double mOverrideCanvasSearchRadius = -1;
Abstract base class for all geometries.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Container of fields for a vector layer.
A geometry is the spatial representation of a feature.
A class for highlight features on the map.
Identify contexts are used to encapsulate the settings to be used to perform an identify action.
Map canvas is a class for displaying all GIS data types on a canvas.
Base class for all map layer types.
A QgsMapMouseEvent is the result of a user interaction with the mouse on a QgsMapCanvas.
Represents a mesh layer supporting display of data on structured or unstructured meshes.
Point cloud layer specific subclass of QgsMapLayerElevationProperties.
Represents a map layer supporting display of point clouds.
A class to represent a 2D point.
Point geometry type, with support for z-dimension and m-values.
Represents a raster layer.
A rectangle specified with double values.
DistanceUnit
Units of distance.
Represents a vector layer which manages a vector based data sets.
Implements a map layer that is dedicated to rendering of vector tiles.
@ PointCloudLayer
Point cloud layer. Added in QGIS 3.18.
@ MeshLayer
Mesh layer. Added in QGIS 3.2.
@ VectorLayer
Vector layer.
@ RasterLayer
Raster layer.
@ VectorTileLayer
Vector tile layer. Added in QGIS 3.14.
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsField::ConfigurationFlags) CORE_EXPORT QDataStream &operator<<(QDataStream &out
Writes the field to stream out. QGIS version compatibility is not guaranteed.
Utility class for identifying a unique vertex within a geometry.