File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed
Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,14 @@ class QgsPluginLayer : QgsMapLayer
1111 /** Return plugin layer type (the same as used in QgsPluginLayerRegistry) */
1212 QString pluginLayerType();
1313
14+ /** Set extent of the layer */
1415 void setExtent( const QgsRectangle &extent );
1516
17+ /** Set source string. This is used for example in layer tree to show tooltip.
18+ * @note added in 2.16
19+ */
20+ void setSource( const QString& source );
21+
1622 //! return a list of symbology items for the legend
1723 //! (defult implementation returns nothing)
1824 //! @note Added in v2.1
Original file line number Diff line number Diff line change @@ -33,6 +33,11 @@ void QgsPluginLayer::setExtent( const QgsRectangle &extent )
3333 mExtent = extent;
3434}
3535
36+ void QgsPluginLayer::setSource ( const QString& source )
37+ {
38+ mDataSource = source;
39+ }
40+
3641QgsLegendSymbologyList QgsPluginLayer::legendSymbologyItems ( QSize iconSize )
3742{
3843 Q_UNUSED ( iconSize );
Original file line number Diff line number Diff line change @@ -37,8 +37,14 @@ class CORE_EXPORT QgsPluginLayer : public QgsMapLayer
3737 /* * Return plugin layer type (the same as used in QgsPluginLayerRegistry) */
3838 QString pluginLayerType ();
3939
40+ /* * Set extent of the layer */
4041 void setExtent ( const QgsRectangle &extent ) override ;
4142
43+ /* * Set source string. This is used for example in layer tree to show tooltip.
44+ * @note added in 2.16
45+ */
46+ void setSource ( const QString& source );
47+
4248 // ! return a list of symbology items for the legend
4349 // ! (defult implementation returns nothing)
4450 // ! @note Added in v2.1
You can’t perform that action at this time.
0 commit comments