QGIS/python/core/auto_generated/symbology/qgssymbollayerregistry.sip.in

157 lines
5.1 KiB
Plaintext
Raw Normal View History

2017-06-07 16:07:17 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
2017-08-06 13:39:03 +02:00
* src/core/symbology/qgssymbollayerregistry.h *
2017-06-07 16:07:17 +02:00
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
2016-08-05 08:08:39 +02:00
class QgsSymbolLayerWidget /External/;
class QgsSymbolLayerAbstractMetadata
{
2017-06-07 16:07:17 +02:00
%Docstring
Stores metadata about one symbol layer class.
.. note::
It's necessary to implement createSymbolLayer() function.
2018-01-12 20:51:17 -04:00
In C++ you can use QgsSymbolLayerMetadata convenience class.
2017-06-07 16:07:17 +02:00
%End
2016-08-05 08:08:39 +02:00
%TypeHeaderCode
2017-06-07 16:07:17 +02:00
#include "qgssymbollayerregistry.h"
2016-08-05 08:08:39 +02:00
%End
public:
QgsSymbolLayerAbstractMetadata( const QString &name, const QString &visibleName, QgsSymbol::SymbolType type );
2016-08-05 08:08:39 +02:00
virtual ~QgsSymbolLayerAbstractMetadata();
QString name() const;
QString visibleName() const;
2016-08-05 08:09:43 +02:00
QgsSymbol::SymbolType type() const;
2016-08-05 08:08:39 +02:00
virtual QgsSymbolLayer *createSymbolLayer( const QgsStringMap &map ) = 0 /Factory/;
2017-06-07 16:07:17 +02:00
%Docstring
Create a symbol layer of this type given the map of properties.
%End
2017-09-01 15:34:16 +01:00
virtual QgsSymbolLayerWidget *createSymbolLayerWidget( QgsVectorLayer * ) /Factory/;
2017-06-07 16:07:17 +02:00
%Docstring
Create widget for symbol layer of this type. Can return ``None`` if there's no GUI
2017-06-07 16:07:17 +02:00
%End
2017-07-24 13:02:20 +10:00
virtual QgsSymbolLayer *createSymbolLayerFromSld( QDomElement & ) /Factory/;
2017-06-07 16:07:17 +02:00
%Docstring
Create a symbol layer of this type given the map of properties.
%End
virtual void resolvePaths( QgsStringMap &properties, const QgsPathResolver &pathResolver, bool saving );
%Docstring
2017-12-15 10:36:55 -04:00
Resolve paths in symbol layer's properties (if there are any paths).
2019-02-26 19:54:09 +10:00
When saving is ``True``, paths are converted from absolute to relative,
when saving is ``False``, paths are converted from relative to absolute.
2017-12-15 10:36:55 -04:00
This ensures that paths in project files can be relative, but in symbol layer
instances the paths are always absolute
2017-06-07 16:07:17 +02:00
.. versionadded:: 3.0
%End
protected:
2016-08-05 08:08:39 +02:00
};
class QgsSymbolLayerMetadata : QgsSymbolLayerAbstractMetadata
{
2017-06-07 16:07:17 +02:00
%Docstring
Convenience metadata class that uses static functions to create symbol layer and its widget.
2016-08-05 08:08:39 +02:00
%End
2017-06-07 16:07:17 +02:00
%TypeHeaderCode
#include "qgssymbollayerregistry.h"
%End
2016-08-05 08:08:39 +02:00
public:
2017-06-07 16:07:17 +02:00
2017-07-24 13:02:20 +10:00
virtual QgsSymbolLayer *createSymbolLayer( const QgsStringMap &map ) /Factory/;
2017-09-01 15:34:16 +01:00
virtual QgsSymbolLayerWidget *createSymbolLayerWidget( QgsVectorLayer *vl ) /Factory/;
2017-07-24 13:02:20 +10:00
virtual QgsSymbolLayer *createSymbolLayerFromSld( QDomElement &elem ) /Factory/;
2017-06-07 16:07:17 +02:00
virtual void resolvePaths( QgsStringMap &properties, const QgsPathResolver &pathResolver, bool saving );
protected:
2016-08-05 08:08:39 +02:00
private:
2017-06-07 16:07:17 +02:00
QgsSymbolLayerMetadata();
2016-08-05 08:08:39 +02:00
};
class QgsSymbolLayerRegistry
{
2017-06-07 16:07:17 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Registry of available symbol layer classes.
2017-06-07 16:07:17 +02:00
2017-12-15 10:36:55 -04:00
QgsSymbolLayerRegistry is not usually directly created, but rather accessed through
2017-12-19 11:43:52 -04:00
:py:func:`QgsApplication.symbolLayerRegistry()`
2016-08-05 08:08:39 +02:00
%End
2017-06-07 16:07:17 +02:00
%TypeHeaderCode
#include "qgssymbollayerregistry.h"
%End
2016-08-05 08:08:39 +02:00
public:
QgsSymbolLayerRegistry();
~QgsSymbolLayerRegistry();
2016-08-05 08:08:39 +02:00
2017-06-07 16:07:17 +02:00
QgsSymbolLayerAbstractMetadata *symbolLayerMetadata( const QString &name ) const;
2017-06-07 16:07:17 +02:00
%Docstring
Returns metadata for specified symbol layer. Returns ``None`` if not found
2017-06-07 16:07:17 +02:00
%End
2016-08-05 08:08:39 +02:00
bool addSymbolLayerType( QgsSymbolLayerAbstractMetadata *metadata /Transfer/ );
2017-06-07 16:07:17 +02:00
%Docstring
register a new symbol layer type. Takes ownership of the metadata instance.
%End
2016-08-05 08:08:39 +02:00
QgsSymbolLayer *createSymbolLayer( const QString &name, const QgsStringMap &properties = QgsStringMap() ) const /Factory/;
2017-06-07 16:07:17 +02:00
%Docstring
create a new instance of symbol layer given symbol layer name and properties
%End
2016-08-05 08:08:39 +02:00
2017-07-24 13:02:20 +10:00
QgsSymbolLayer *createSymbolLayerFromSld( const QString &name, QDomElement &element ) const /Factory/;
2017-06-07 16:07:17 +02:00
%Docstring
create a new instance of symbol layer given symbol layer name and SLD
%End
2016-08-05 08:08:39 +02:00
2017-06-07 16:07:17 +02:00
void resolvePaths( const QString &name, QgsStringMap &properties, const QgsPathResolver &pathResolver, bool saving ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Resolve paths in properties of a particular symbol layer.
This normally means converting relative paths to absolute paths when loading
and converting absolute paths to relative paths when saving.
2017-06-07 16:07:17 +02:00
.. versionadded:: 3.0
%End
2016-08-05 08:09:43 +02:00
QStringList symbolLayersForType( QgsSymbol::SymbolType type );
2017-06-07 16:07:17 +02:00
%Docstring
Returns a list of available symbol layers for a specified symbol type
2017-06-07 16:07:17 +02:00
%End
2016-08-05 08:08:39 +02:00
static QgsSymbolLayer *defaultSymbolLayer( QgsSymbol::SymbolType type ) /Factory/;
2017-06-07 16:07:17 +02:00
%Docstring
create a new instance of symbol layer for specified symbol type with default settings
%End
2016-08-05 08:08:39 +02:00
private:
QgsSymbolLayerRegistry( const QgsSymbolLayerRegistry &rh );
2016-08-05 08:08:39 +02:00
};
2017-06-07 16:07:17 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
2017-08-06 13:39:03 +02:00
* src/core/symbology/qgssymbollayerregistry.h *
2017-06-07 16:07:17 +02:00
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/