Skip to content
Permalink
Browse files

added currentLayerChanged

git-svn-id: http://svn.osgeo.org/qgis/trunk@5113 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek
rblazek committed Mar 29, 2006
1 parent 3366197 commit e77c7ccfb67c00f1805478a67b9345dab7895f69
Showing with 18 additions and 0 deletions.
  1. +9 −0 src/gui/qgisiface.cpp
  2. +9 −0 src/gui/qgisiface.h
@@ -24,9 +24,12 @@
#include "qgisapp.h"
#include "qgsmaplayer.h"
#include "qgsmapcanvas.h"
#include "qgslegend.h"

QgisIface::QgisIface(QgisApp * _qgis, const char *name):qgis(_qgis)
{
connect ( qgis->legend(), SIGNAL(currentLayerChanged(QgsMapLayer *)),
this, SLOT(emitCurrentLayerChanged(QgsMapLayer *)) );

}

@@ -136,3 +139,9 @@ QgisIface::app()
{
return qgis;
} // QgisIface::app()

void QgisIface::emitCurrentLayerChanged ( QgsMapLayer * layer )
{
// Does not compile
//emit currentLayerChanged ( layer );
}
@@ -104,6 +104,15 @@ class QgisIface : public QgisInterface{
*/
QgisApp * app();

public slots:
void emitCurrentLayerChanged ( QgsMapLayer * layer );


signals:
//! Emited whenever current (selected) layer changes
// the pointer to layer can be null if no layer is selected
void currentLayerChanged ( QgsMapLayer * layer );

private:

/// QgisIface aren't copied

0 comments on commit e77c7cc

Please sign in to comment.
You can’t perform that action at this time.