mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
Replaced call to getInt (which is just a dummy method) with a call to get the name of the currently active layer.
git-svn-id: http://svn.osgeo.org/qgis/trunk@906 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
0b3e632637
commit
0ec18dc7b2
@ -25,10 +25,10 @@
|
||||
#include <qpopupmenu.h>
|
||||
#include <qaction.h>
|
||||
#include "exampleplugin.h"
|
||||
|
||||
// xpm for creating the toolbar icon
|
||||
#include "matrix1.xpm"
|
||||
|
||||
// qgis includes
|
||||
#include "../../src/qgsmaplayer.h"
|
||||
/**
|
||||
* Constructor for the plugin. The plugin is passed a pointer to the main app
|
||||
* and an interface object that provides access to exposed functions in QGIS.
|
||||
@ -54,8 +54,8 @@ ExamplePlugin::ExamplePlugin(QgisApp * qgis, QgisIface * _qI):qgisMainWindow(qgi
|
||||
qI->zoomPrevious();
|
||||
|
||||
// call a function defined in the QgisIface class and send its value to stdout
|
||||
int foo = qI->getInt();
|
||||
std::cout << "Result of getInt is: " << foo << std::endl;
|
||||
QgsMapLayer * myMapLayer = qI->activeLayer();
|
||||
std::cout << "Current map layer is: " << myMapLayer->name() << std::endl;
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user