2010-01-26 15:43:54 +00:00
|
|
|
|
|
|
|
class QgsPluginLayer : QgsMapLayer
|
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgspluginlayer.h"
|
|
|
|
%End
|
|
|
|
|
|
|
|
public:
|
2015-10-07 11:55:34 +11:00
|
|
|
QgsPluginLayer( const QString& layerType, const QString& layerName = QString() );
|
2010-01-26 15:43:54 +00:00
|
|
|
|
2015-07-29 11:52:14 +02:00
|
|
|
/** Return plugin layer type (the same as used in QgsPluginLayerRegistry) */
|
2010-01-26 15:43:54 +00:00
|
|
|
QString pluginLayerType();
|
|
|
|
|
2016-02-29 17:17:14 +08:00
|
|
|
/** Set extent of the layer */
|
2012-09-24 02:28:15 +02:00
|
|
|
void setExtent( const QgsRectangle &extent );
|
2013-10-29 10:55:02 +07:00
|
|
|
|
2016-02-29 17:17:14 +08:00
|
|
|
/** Set source string. This is used for example in layer tree to show tooltip.
|
|
|
|
* @note added in 2.16
|
|
|
|
*/
|
|
|
|
void setSource( const QString& source );
|
|
|
|
|
2013-10-29 10:55:02 +07:00
|
|
|
//! return a list of symbology items for the legend
|
|
|
|
//! (defult implementation returns nothing)
|
|
|
|
//! @note Added in v2.1
|
2016-02-02 19:46:18 +11:00
|
|
|
virtual QgsLegendSymbologyList legendSymbologyItems( QSize iconSize );
|
2013-12-05 18:59:44 +07:00
|
|
|
|
|
|
|
/** Return new instance of QgsMapLayerRenderer that will be used for rendering of given context
|
|
|
|
*
|
|
|
|
* The default implementation returns map layer renderer which just calls draw().
|
|
|
|
* This may work, but it is unsafe for multi-threaded rendering because of the run
|
|
|
|
* conditions that may happen (e.g. something is changed in the layer while it is
|
|
|
|
* being rendered).
|
|
|
|
*
|
2014-02-21 17:33:09 +07:00
|
|
|
* @note added in 2.4
|
2013-12-05 18:59:44 +07:00
|
|
|
*/
|
|
|
|
virtual QgsMapLayerRenderer* createMapRenderer( QgsRenderContext& rendererContext ) /Factory/;
|
2010-01-26 15:43:54 +00:00
|
|
|
};
|