Skip to content

Commit

Permalink
[FEATURE] allow opening layer properties from plugins
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@12814 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Jan 21, 2010
1 parent e3cde7c commit 882e7e8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/gui/qgslegendinterface.sip
Expand Up @@ -33,5 +33,9 @@ class QgsLegendInterface : QObject

//! Move a layer to a group
virtual void moveLayer( QgsMapLayer * layer, int groupIndex ) =0;

//! show layer propeties
//! @note added in 1.5
virtual void legendLayerShowProperties() =0;
};

5 changes: 5 additions & 0 deletions src/app/legend/qgsapplegendinterface.cpp
Expand Up @@ -57,3 +57,8 @@ QStringList QgsAppLegendInterface::groups()
{
return mLegend->groups();
}

void QgsAppLegendInterface::legendLayerShowProperties()
{
mLegend->legendLayerShowProperties();
}
3 changes: 3 additions & 0 deletions src/app/legend/qgsapplegendinterface.h
Expand Up @@ -58,6 +58,9 @@ class QgsAppLegendInterface : public QgsLegendInterface
//! Update an index
void updateIndex( QModelIndex oldIndex, QModelIndex newIndex );

//! Show layer properties
void legendLayerShowProperties();

private:

//! Pointer to QgsLegend object
Expand Down
4 changes: 4 additions & 0 deletions src/gui/qgslegendinterface.h
Expand Up @@ -59,6 +59,10 @@ class GUI_EXPORT QgsLegendInterface : public QObject

//! Move a layer to a group
virtual void moveLayer( QgsMapLayer * ml, int groupIndex ) = 0;

//! Show layer properties dialog
// @note added in 1.5
virtual void legendLayerShowProperties() = 0;
};

#endif

0 comments on commit 882e7e8

Please sign in to comment.