16 #ifndef QGSMAPTOOLIDENTIFY_H
17 #define QGSMAPTOOLIDENTIFY_H
61 DefaultQgsSetting = -1,
67 Q_ENUM( IdentifyMode )
78 Q_DECLARE_FLAGS( LayerType, Type )
87 : mLayer( layer ), mFeature( feature ), mDerivedAttributes( derivedAttributes ) {}
89 IdentifyResult(
QgsMapLayer *layer,
const QString &label,
const QMap< QString, QString > &attributes,
const QMap< QString, QString > &derivedAttributes )
90 : mLayer( layer ), mLabel( label ), mAttributes( attributes ), mDerivedAttributes( derivedAttributes ) {}
93 : mLayer( layer ), mLabel( label ), mFields( fields ), mFeature( feature ), mDerivedAttributes( derivedAttributes ) {}
125 QList<QgsMapToolIdentify::IdentifyResult> identify(
int x,
int y,
const QList<QgsMapLayer *> &layerList = QList<QgsMapLayer *>(), IdentifyMode mode = DefaultQgsSetting,
const QgsIdentifyContext &identifyContext =
QgsIdentifyContext() );
138 QList<QgsMapToolIdentify::IdentifyResult> identify(
int x,
int y, IdentifyMode mode, LayerType layerType = AllLayers,
const QgsIdentifyContext &identifyContext =
QgsIdentifyContext() );
157 static void fromPointCloudIdentificationToIdentifyResults(
QgsPointCloudLayer *layer,
const QVector<QVariantMap> &identified, QList<QgsMapToolIdentify::IdentifyResult> &results )
SIP_SKIP;
165 void fromElevationProfileLayerIdentificationToIdentifyResults(
QgsMapLayer *layer,
const QVector<QVariantMap> &identified, QList<QgsMapToolIdentify::IdentifyResult> &results )
SIP_SKIP;
171 void identifyProgress(
int,
int );
172 void identifyMessage(
const QString & );
173 void changedRasterResults( QList<QgsMapToolIdentify::IdentifyResult> & );
189 QList<QgsMapToolIdentify::IdentifyResult> identify(
int x,
int y, IdentifyMode mode,
const QList<QgsMapLayer *> &layerList, LayerType layerType = AllLayers,
const QgsIdentifyContext &identifyContext =
QgsIdentifyContext() );
225 QMap< QString, QString > derivedAttributesForPoint(
const QgsPoint &point );
239 void setCanvasPropertiesOverrides(
double searchRadiusMapUnits );
246 void restoreCanvasPropertiesOverrides();
277 QString formatDistance(
double distance )
const;
284 QString formatArea(
double area )
const;
308 void closestPointAttributes(
const QgsAbstractGeometry &geometry,
const QgsPointXY &layerPoint, QMap< QString, QString > &derivedAttributes );
310 QString formatCoordinate(
const QgsPointXY &canvasPoint )
const;
311 QString formatXCoordinate(
const QgsPointXY &canvasPoint )
const;
312 QString formatYCoordinate(
const QgsPointXY &canvasPoint )
const;
317 double mLastMapUnitsPerPixel;
321 int mCoordinatePrecision;
323 double mOverrideCanvasSearchRadius = -1;