mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-24 00:47:57 -05:00
81 lines
2.4 KiB
Plaintext
81 lines
2.4 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/qgsmaplayerfactory.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.py again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QgsMapLayerFactory
|
|
{
|
|
%Docstring(signature="appended")
|
|
Contains utility functions for creating map layers.
|
|
|
|
.. versionadded:: 3.18.1
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgsmaplayerfactory.h"
|
|
%End
|
|
public:
|
|
|
|
static Qgis::LayerType typeFromString( const QString &string, bool &ok /Out/ );
|
|
%Docstring
|
|
Returns the map layer type corresponding a ``string`` value.
|
|
|
|
:param string: string to convert to map layer type
|
|
|
|
:return: - converted map layer type
|
|
- ok: ``True`` if ``string`` was successfully converted to a map layer type
|
|
|
|
.. seealso:: :py:func:`typeToString`
|
|
%End
|
|
|
|
static QString typeToString( Qgis::LayerType type );
|
|
%Docstring
|
|
Converts a map layer ``type`` to a string value.
|
|
|
|
.. seealso:: :py:func:`typeFromString`
|
|
%End
|
|
|
|
struct LayerOptions
|
|
{
|
|
|
|
explicit LayerOptions( const QgsCoordinateTransformContext &transformContext );
|
|
%Docstring
|
|
Constructor for LayerOptions with ``transformContext``.
|
|
%End
|
|
|
|
QgsCoordinateTransformContext transformContext;
|
|
|
|
bool loadDefaultStyle;
|
|
|
|
bool loadAllStoredStyles;
|
|
};
|
|
|
|
static QgsMapLayer *createLayer( const QString &uri, const QString &name, Qgis::LayerType type, const LayerOptions &options,
|
|
const QString &provider = QString() ) /Factory/;
|
|
%Docstring
|
|
Creates a map layer, given a ``uri``, ``name``, layer ``type`` and ``provider`` name.
|
|
|
|
Caller takes ownership of the returned layer.
|
|
|
|
.. versionadded:: 3.22
|
|
%End
|
|
|
|
};
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/qgsmaplayerfactory.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.py again *
|
|
************************************************************************/
|