QGIS/python/core/auto_generated/qgsprovidermetadata.sip.in

231 lines
6.5 KiB
Plaintext
Raw Normal View History

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsprovidermetadata.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsProviderMetadata
{
%Docstring
2017-12-15 10:36:55 -04:00
Holds data provider key, description, and associated shared library file or function pointer information.
Provider metadata refers either to providers which are loaded via libraries or
which are native providers that are included in the core QGIS installation
and accessed through function pointers.
For library based providers, the metadata class is used in a lazy load
implementation in QgsProviderRegistry. To save memory, data providers
are only actually loaded via QLibrary calls if they're to be used. (Though they're all
iteratively loaded once to get their metadata information, and then
unloaded when the QgsProviderRegistry is created.) QgsProviderMetadata
supplies enough information to be able to later load the associated shared
library object.
%End
%TypeHeaderCode
#include "qgsprovidermetadata.h"
%End
public:
QgsProviderMetadata( const QString &key, const QString &description, const QString &library = QString() );
%Docstring
Constructor for provider metadata
:param key: provider key
:param description: provider description
:param library: plugin library file name (empty if the provider is not loaded from a library)
2018-04-19 19:23:59 +02:00
%End
virtual ~QgsProviderMetadata();
QString key() const;
%Docstring
2017-12-15 10:36:55 -04:00
This returns the unique key associated with the provider
2017-12-19 11:43:52 -04:00
This key string is used for the associative container in :py:class:`QgsProviderRegistry`
%End
QString description() const;
%Docstring
2017-12-15 10:36:55 -04:00
This returns descriptive text for the provider
This is used to provide a descriptive list of available data providers.
%End
QString library() const /Deprecated/;
%Docstring
2017-12-15 10:36:55 -04:00
This returns the library file name
This is used to QLibrary calls to load the data provider (only for dynamically loaded libraries)
.. deprecated:: QGIS 3.10 - providers may not need to be loaded from a library (empty string returned)
%End
virtual void initProvider();
%Docstring
Initialize the provider
.. versionadded:: 3.10
%End
virtual void cleanupProvider();
%Docstring
Cleanup the provider
.. versionadded:: 3.10
%End
enum class FilterType
{
FilterVector,
FilterRaster,
FilterMesh,
FilterMeshDataset
};
virtual QString filters( FilterType type );
%Docstring
Builds the list of file filter strings (supported formats)
Suitable for use in a QFileDialog.getOpenFileNames() call.
.. versionadded:: 3.10
%End
virtual QgsDataProvider *createProvider( const QString &uri, const QgsDataProvider::ProviderOptions &options ) /Factory/;
%Docstring
Class factory to return a pointer to a newly created QgsDataProvider object
.. versionadded:: 3.10
%End
virtual QgsRasterDataProvider *createRasterDataProvider(
const QString &uri,
const QString &format,
int nBands,
Qgis::DataType type,
int width,
int height,
double *geoTransform,
const QgsCoordinateReferenceSystem &crs,
const QStringList &createOptions = QStringList() ) /Factory/;
%Docstring
Creates a new instance of the raster data provider.
.. versionadded:: 3.10
%End
virtual QList<QPair<QString, QString> > pyramidResamplingMethods();
%Docstring
Returns pyramid resampling methods available for provider
.. versionadded:: 3.10
%End
virtual QVariantMap decodeUri( const QString &uri );
%Docstring
2019-06-25 15:38:07 +02:00
Breaks a provider data source URI into its component paths (e.g. file path, layer name).
:param uri: uri string
:return: map containing components. Standard components include "path", "layerName", "url".
.. note::
this function may not be supported by all providers, an empty map will be returned in such case
.. versionadded:: 3.10
%End
2019-06-25 15:38:07 +02:00
virtual QList< QgsDataItemProvider * > dataItemProviders() const /Factory/;
%Docstring
Returns data item providers. Caller is responsible for ownership of the item providers
.. seealso:: :py:func:`QgsProviderGuiMetadata.dataItemGuiProviders`
2019-06-25 15:38:07 +02:00
.. note::
Ownership of created data item providers is passed to the caller.
.. versionadded:: 3.10
%End
virtual int listStyles( const QString &uri, QStringList &ids, QStringList &names,
QStringList &descriptions, QString &errCause );
%Docstring
Lists stored layer styles in the provider defined by ``uri``
:return: -1 if not implemented by provider, otherwise number of styles stored
.. versionadded:: 3.10
%End
virtual QString getStyleById( const QString &uri, QString styleId, QString &errCause );
%Docstring
Gets a layer style defined by ``uri``
.. versionadded:: 3.10
%End
virtual bool deleteStyleById( const QString &uri, QString styleId, QString &errCause );
%Docstring
Deletes a layer style defined by ``styleId``
.. versionadded:: 3.10
%End
virtual bool saveStyle( const QString &uri, const QString &qmlStyle, const QString &sldStyle,
const QString &styleName, const QString &styleDescription,
const QString &uiFileContent, bool useAsDefault, QString &errCause );
%Docstring
Saves a layer style to provider
.. versionadded:: 3.10
%End
virtual QString loadStyle( const QString &uri, QString &errCause );
%Docstring
Loads a layer style defined by ``uri``
.. versionadded:: 3.10
%End
virtual bool createDb( const QString &dbPath, QString &errCause );
%Docstring
Creates database by the provider on the path
.. versionadded:: 3.10
%End
virtual QgsTransaction *createTransaction( const QString &connString ) /Factory/;
%Docstring
Returns new instance of transaction. Ownership is transferred to the caller
.. versionadded:: 3.10
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsprovidermetadata.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/