Skip to content
Permalink
Browse files

Allow plugin layers to set their source

  • Loading branch information
wonder-sk committed Feb 29, 2016
1 parent 317639f commit 5090491998f7000027554491f84eae7007f6423f
Showing with 17 additions and 0 deletions.
  1. +6 −0 python/core/qgspluginlayer.sip
  2. +5 −0 src/core/qgspluginlayer.cpp
  3. +6 −0 src/core/qgspluginlayer.h
@@ -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
@@ -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 );
@@ -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

0 comments on commit 5090491

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