diff --git a/python/core/qgspluginlayer.sip b/python/core/qgspluginlayer.sip index 9b403e3fe45..b66de47191c 100644 --- a/python/core/qgspluginlayer.sip +++ b/python/core/qgspluginlayer.sip @@ -11,8 +11,14 @@ class QgsPluginLayer : QgsMapLayer /** Return plugin layer type (the same as used in QgsPluginLayerRegistry) */ QString pluginLayerType(); + /** Set extent of the layer */ void setExtent( const QgsRectangle &extent ); + /** Set source string. This is used for example in layer tree to show tooltip. + * @note added in 2.16 + */ + void setSource( const QString& source ); + //! return a list of symbology items for the legend //! (defult implementation returns nothing) //! @note Added in v2.1 diff --git a/src/core/qgspluginlayer.cpp b/src/core/qgspluginlayer.cpp index 49c4797921c..c4f576ddb84 100644 --- a/src/core/qgspluginlayer.cpp +++ b/src/core/qgspluginlayer.cpp @@ -33,6 +33,11 @@ void QgsPluginLayer::setExtent( const QgsRectangle &extent ) mExtent = extent; } +void QgsPluginLayer::setSource( const QString& source ) +{ + mDataSource = source; +} + QgsLegendSymbologyList QgsPluginLayer::legendSymbologyItems( QSize iconSize ) { Q_UNUSED( iconSize ); diff --git a/src/core/qgspluginlayer.h b/src/core/qgspluginlayer.h index 64d1277f9f7..a7d3a3a76e9 100644 --- a/src/core/qgspluginlayer.h +++ b/src/core/qgspluginlayer.h @@ -37,8 +37,14 @@ class CORE_EXPORT QgsPluginLayer : public QgsMapLayer /** Return plugin layer type (the same as used in QgsPluginLayerRegistry) */ QString pluginLayerType(); + /** Set extent of the layer */ void setExtent( const QgsRectangle &extent ) override; + /** Set source string. This is used for example in layer tree to show tooltip. + * @note added in 2.16 + */ + void setSource( const QString& source ); + //! return a list of symbology items for the legend //! (defult implementation returns nothing) //! @note Added in v2.1