QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
qgsmaptoolidentifyfeature.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmaptoolidentifyfeature.h
3 --------------------------------------
4 Date : 22.5.2014
5 Copyright : (C) 2014 Denis Rouzaud
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSMAPTOOLIDENTIFYFEATURE_H
17#define QGSMAPTOOLIDENTIFYFEATURE_H
18
19#include "qgsmaptoolidentify.h"
20#include "qgis_gui.h"
21
29{
30 Q_OBJECT
31
32 public:
39
41 void setLayer( QgsVectorLayer *vl ) { mLayer = vl; }
42
43 void canvasReleaseEvent( QgsMapMouseEvent *e ) override;
44
45 signals:
46
50 void featureIdentified( const QgsFeature &feature );
51
57 Q_DECL_DEPRECATED void featureIdentified( QgsFeatureId id ) SIP_DEPRECATED;
58
59 protected:
60 void keyPressEvent( QKeyEvent *e ) override;
61
62 private:
63 QgsVectorLayer *mLayer = nullptr;
64};
65
66#endif // QGSMAPTOOLIDENTIFYFEATURE_H
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Definition qgsfeature.h:58
Map canvas is a class for displaying all GIS data types on a canvas.
A QgsMapMouseEvent is the result of a user interaction with the mouse on a QgsMapCanvas.
The QgsMapToolIdentifyFeature class is a map tool to identify a feature on a chosen layer.
void featureIdentified(const QgsFeature &feature)
Emitted when a feature has been identified.
Q_DECL_DEPRECATED void featureIdentified(QgsFeatureId id)
Emitted when a feature has been identified by its id.
void setLayer(QgsVectorLayer *vl)
change the layer used by the map tool to identify
Map tool for identifying features in layers.
void canvasReleaseEvent(QgsMapMouseEvent *e) override
Mouse release event for overriding. Default implementation does nothing.
virtual void keyPressEvent(QKeyEvent *e)
Key event for overriding. Default implementation does nothing.
Represents a vector layer which manages a vector based data sets.
#define SIP_DEPRECATED
Definition qgis_sip.h:106
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features