I am working on a project in c++/QT4.8.5 based on the api c++ 2.8.2 of QGis It is a stand alone application
I had to get information of a layer by clicking on it in the canvas
So I decide to use the class QgsMapToolIdentify ( i saw some sample in the book building mapping application with Qgis from Erik Westra )
here is my code :
mIdentify =new QgsMapToolIdentify(mpMapCanvas);
QList <struct IdentifyResult *> lResultList;
lResultList = mIdentify->identify(lCoord.x(),lCoord.y(), TopDownStopAtFirst, VectorLayer);
but when I want to build it i have an error on the enum value TopDownStopAtFirst and VectorLayer
the error message :
src/IHM/mainwindow.cpp:174:83: error: ‘VectorLayer’ was not declared in this scope lResultList = mIdentify->identify(lCoord.x(),lCoord.y(), TopDownStopAtFirst, VectorLayer);
and the same message for the TopDownStopAtFirst
I have included the header qgsmaptoolidentfy.h in main.cpp.