Skip to content

Commit 8091ca4

Browse files
author
jef
committed
[FEATURE] allow opening layer properties from plugins
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12814 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent d71a5df commit 8091ca4

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

python/gui/qgslegendinterface.sip

+4
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,9 @@ class QgsLegendInterface : QObject
3333

3434
//! Move a layer to a group
3535
virtual void moveLayer( QgsMapLayer * layer, int groupIndex ) =0;
36+
37+
//! show layer propeties
38+
//! @note added in 1.5
39+
virtual void legendLayerShowProperties() =0;
3640
};
3741

src/app/legend/qgsapplegendinterface.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,8 @@ QStringList QgsAppLegendInterface::groups()
5757
{
5858
return mLegend->groups();
5959
}
60+
61+
void QgsAppLegendInterface::legendLayerShowProperties()
62+
{
63+
mLegend->legendLayerShowProperties();
64+
}

src/app/legend/qgsapplegendinterface.h

+3
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ class QgsAppLegendInterface : public QgsLegendInterface
5858
//! Update an index
5959
void updateIndex( QModelIndex oldIndex, QModelIndex newIndex );
6060

61+
//! Show layer properties
62+
void legendLayerShowProperties();
63+
6164
private:
6265

6366
//! Pointer to QgsLegend object

src/gui/qgslegendinterface.h

+4
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ class GUI_EXPORT QgsLegendInterface : public QObject
5959

6060
//! Move a layer to a group
6161
virtual void moveLayer( QgsMapLayer * ml, int groupIndex ) = 0;
62+
63+
//! Show layer properties dialog
64+
// @note added in 1.5
65+
virtual void legendLayerShowProperties() = 0;
6266
};
6367

6468
#endif

0 commit comments

Comments
 (0)