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 *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
class QgsMimeDataUtils
|
|
|
|
{
|
2017-05-14 09:48:41 +02:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
%TypeHeaderCode
|
2017-05-14 09:48:41 +02:00
|
|
|
#include "qgsmimedatautils.h"
|
2012-09-24 02:28:15 +02:00
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
|
|
|
struct Uri
|
|
|
|
{
|
2016-08-09 08:49:42 +02:00
|
|
|
Uri();
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
Constructs invalid URI
|
|
|
|
%End
|
2017-05-01 16:42:33 +02:00
|
|
|
explicit Uri( QString &encData );
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
Constructs URI from encoded data
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2016-08-09 08:49:42 +02:00
|
|
|
bool isValid() const;
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
2016-08-09 08:49:42 +02:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
QString data() const;
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
Returns encoded representation of the object
|
|
|
|
:rtype: str
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
|
|
|
QString layerType;
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
Type of URI. Recognized types: "vector" / "raster" / "plugin" / "custom"
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
QString providerKey;
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
For "custom" type: key of its QgsCustomDropHandler
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
QString name;
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
Human readable name to be used e.g. in layer tree
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
QString uri;
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
Identifier of the data source recognized by its providerKey
|
|
|
|
%End
|
2015-02-03 02:21:52 +01:00
|
|
|
QStringList supportedCrs;
|
|
|
|
QStringList supportedFormats;
|
2012-09-24 02:28:15 +02:00
|
|
|
};
|
2017-05-14 18:24:07 +02:00
|
|
|
typedef QList<QgsMimeDataUtils::Uri> UriList;
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
static QMimeData *encodeUriList( const UriList &layers );
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
:rtype: QMimeData
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
static bool isUriList( const QMimeData *data );
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
static UriList decodeUriList( const QMimeData *data );
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
:rtype: UriList
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-05-14 09:48:41 +02:00
|
|
|
static QByteArray layerTreeNodesToUriList( const QList<QgsLayerTreeNode *> &nodes );
|
|
|
|
%Docstring
|
|
|
|
Returns encoded URI list from a list of layer tree nodes.
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
:rtype: QByteArray
|
|
|
|
%End
|
2016-08-21 13:24:07 +02:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
};
|
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 *
|
|
|
|
************************************************************************/
|