mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
Allow plugin layers to set their source
This commit is contained in:
parent
317639f1e0
commit
5090491998
@ -11,8 +11,14 @@ class QgsPluginLayer : QgsMapLayer
|
|||||||
/** Return plugin layer type (the same as used in QgsPluginLayerRegistry) */
|
/** Return plugin layer type (the same as used in QgsPluginLayerRegistry) */
|
||||||
QString pluginLayerType();
|
QString pluginLayerType();
|
||||||
|
|
||||||
|
/** Set extent of the layer */
|
||||||
void setExtent( const QgsRectangle &extent );
|
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
|
//! return a list of symbology items for the legend
|
||||||
//! (defult implementation returns nothing)
|
//! (defult implementation returns nothing)
|
||||||
//! @note Added in v2.1
|
//! @note Added in v2.1
|
||||||
|
@ -33,6 +33,11 @@ void QgsPluginLayer::setExtent( const QgsRectangle &extent )
|
|||||||
mExtent = extent;
|
mExtent = extent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QgsPluginLayer::setSource( const QString& source )
|
||||||
|
{
|
||||||
|
mDataSource = source;
|
||||||
|
}
|
||||||
|
|
||||||
QgsLegendSymbologyList QgsPluginLayer::legendSymbologyItems( QSize iconSize )
|
QgsLegendSymbologyList QgsPluginLayer::legendSymbologyItems( QSize iconSize )
|
||||||
{
|
{
|
||||||
Q_UNUSED( iconSize );
|
Q_UNUSED( iconSize );
|
||||||
|
@ -37,8 +37,14 @@ class CORE_EXPORT QgsPluginLayer : public QgsMapLayer
|
|||||||
/** Return plugin layer type (the same as used in QgsPluginLayerRegistry) */
|
/** Return plugin layer type (the same as used in QgsPluginLayerRegistry) */
|
||||||
QString pluginLayerType();
|
QString pluginLayerType();
|
||||||
|
|
||||||
|
/** Set extent of the layer */
|
||||||
void setExtent( const QgsRectangle &extent ) override;
|
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
|
//! return a list of symbology items for the legend
|
||||||
//! (defult implementation returns nothing)
|
//! (defult implementation returns nothing)
|
||||||
//! @note Added in v2.1
|
//! @note Added in v2.1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user