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

101 lines
2.8 KiB
Plaintext
Raw Normal View History

2017-05-14 09:48:41 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsmimedatautils.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsMimeDataUtils
{
2017-05-14 09:48:41 +02:00
%TypeHeaderCode
2017-05-14 09:48:41 +02:00
#include "qgsmimedatautils.h"
%End
public:
struct Uri
{
Uri();
2017-05-14 09:48:41 +02:00
%Docstring
Constructs invalid URI
%End
explicit Uri( QString &encData );
2017-05-14 09:48:41 +02:00
%Docstring
Constructs URI from encoded data
%End
bool isValid() const;
2017-05-14 09:48:41 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns whether the object contains valid data
2017-05-14 09:48:41 +02:00
.. versionadded:: 3.0
%End
QString data() const;
2017-05-14 09:48:41 +02:00
%Docstring
Returns encoded representation of the object
%End
QgsVectorLayer *vectorLayer( bool &owner, QString &error ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Get vector layer from uri if possible, otherwise returns 0 and error is set
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param owner: set to true if caller becomes owner
:param error: set to error message if cannot get vector
%End
2017-08-22 11:18:11 +02:00
QgsRasterLayer *rasterLayer( bool &owner, QString &error ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Get raster layer from uri if possible, otherwise returns 0 and error is set
2017-12-15 21:36:08 -04:00
:param owner: set to true if caller becomes owner
:param error: set to error message if cannot get raster
%End
QgsMeshLayer *meshLayer( bool &owner, QString &error ) const;
%Docstring
Get mesh layer from uri if possible, otherwise returns 0 and error is set
2017-12-15 10:36:55 -04:00
:param owner: set to true if caller becomes owner
:param error: set to error message if cannot get raster
2017-08-22 11:18:11 +02:00
%End
QString layerType;
QString providerKey;
QString name;
QString uri;
2015-02-03 02:21:52 +01:00
QStringList supportedCrs;
QStringList supportedFormats;
};
2017-05-14 18:24:07 +02:00
typedef QList<QgsMimeDataUtils::Uri> UriList;
static QMimeData *encodeUriList( const UriList &layers );
static bool isUriList( const QMimeData *data );
static UriList decodeUriList( const QMimeData *data );
2017-05-14 09:48:41 +02:00
static QByteArray layerTreeNodesToUriList( const QList<QgsLayerTreeNode *> &nodes );
%Docstring
2017-12-15 10:36:55 -04:00
Returns encoded URI list from a list of layer tree nodes.
2017-05-14 09:48:41 +02:00
.. versionadded:: 3.0
%End
};
2017-05-14 09:48:41 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsmimedatautils.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/