Skip to content
Permalink
Browse files
Update sip binding
  • Loading branch information
pblottiere committed May 18, 2017
1 parent 7b20c2e commit 42a967904a02860fd1454d4c5bfa6f403aa3f3eb
Showing with 64 additions and 0 deletions.
  1. +26 −0 python/core/qgsmaplayer.sip
  2. +9 −0 python/core/qgsmaplayerstylemanager.sip
  3. +9 −0 python/core/qgspluginlayer.sip
  4. +12 −0 python/core/qgsvectorlayer.sip
  5. +8 −0 python/core/raster/qgsrasterlayer.sip
@@ -67,6 +67,15 @@ class QgsMapLayer : QObject
virtual ~QgsMapLayer();


virtual QgsMapLayer *clone( bool deep ) const = 0;
%Docstring
Returns a new instance equivalent to this one.
\param deep If true, a deep copy is done
:return: a new layer instance
.. versionadded:: 3.0
:rtype: QgsMapLayer
%End

QgsMapLayer::LayerType type() const;
%Docstring
Returns the type of the layer.
@@ -470,6 +479,13 @@ Invoked by QgsProject.read().
:rtype: QVariant
%End

void setCustomProperties( const QgsObjectCustomProperties &properties );
%Docstring
Set custom properties for layer.
\param properties The custom properties to set.
.. versionadded:: 3.0
%End

void removeCustomProperty( const QString &key );
%Docstring
Remove a custom property from layer. Properties are stored in a map and saved in project file.
@@ -1028,6 +1044,16 @@ Signal emitted when the blend mode is changed, through QgsMapLayer.setBlendMode(
%End

protected:

void clone( QgsMapLayer *layer, bool deep = false ) const;
%Docstring
Copies attributes like name, short name, ... into another layer. The
unique ID is copied too if deep parameter is true.
\param layer The copy recipient
\param deep To copy the unique ID or not
.. versionadded:: 3.0
%End

virtual void setExtent( const QgsRectangle &rect );
%Docstring
Set the extent
@@ -133,6 +133,15 @@ Write configuration (for project saving)
Return list of all defined style names
:rtype: list of str
%End

QMap<QString, QgsMapLayerStyle> mapLayerStyles() const;
%Docstring
Gets available styles for the associated map layer.
:return: A map of map layer style by style name
.. versionadded:: 3.0
:rtype: QMap<str, QgsMapLayerStyle>
%End

QgsMapLayerStyle style( const QString &name ) const;
%Docstring
Return data of a stored style - accessed by its unique name
@@ -26,6 +26,15 @@ In order to be readable from project files, they should set these attributes in
QgsPluginLayer( const QString &layerType, const QString &layerName = QString() );
~QgsPluginLayer();

virtual QgsPluginLayer *clone( bool deep ) const = 0;
%Docstring
Returns a new instance equivalent to this one.
\param deep If true, a deep copy is done
:return: a new layer instance
.. versionadded:: 3.0
:rtype: QgsPluginLayer
%End

QString pluginLayerType();
%Docstring
Return plugin layer type (the same as used in QgsPluginLayerRegistry)
@@ -334,6 +334,18 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator, QgsFeatureSin
virtual ~QgsVectorLayer();


virtual QgsVectorLayer *clone( bool deep = false ) const /Factory/;
%Docstring
Returns a new instance equivalent to this one. A new provider is
created for the same data source and renderers for features and diagrams
are cloned too. Moreover, each attributes (transparency, extent, selected
features and so on) are identicals.
\param deep If true, a deep copy is done (unique ID is copied too)
:return: a new layer instance
.. versionadded:: 3.0
:rtype: QgsVectorLayer
%End

QString storageType() const;
%Docstring
Returns the permanent storage type for this layer as a friendly name.
@@ -41,6 +41,14 @@ class QgsRasterLayer : QgsMapLayer
/** \brief The destructor */
~QgsRasterLayer();

/** Returns a new instance equivalent to this one. A new provider is
* created for the same data source and renderer is cloned too.
* \param deep If true, a deep copy is done (unique ID is copy too)
* \returns a new layer instance
* \since QGIS 3.0
*/
virtual QgsRasterLayer *clone( bool deep = true ) const /Factory/;

/** \brief This enumerator describes the types of shading that can be used */
enum ColorShadingAlgorithm
{

0 comments on commit 42a9679

Please sign in to comment.