QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
src
core
qgsmimedatautils.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsmimedatautils.h
3
---------------------
4
begin : November 2011
5
copyright : (C) 2011 by Martin Dobias
6
email : wonder dot sk at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
#ifndef QGSMIMEDATAUTILS_H
16
#define QGSMIMEDATAUTILS_H
17
18
#include <QMimeData>
19
#include <QStringList>
20
21
class
QgsLayerItem
;
22
26
class
CORE_EXPORT
QgsMimeDataUtils
27
{
28
public
:
29
30
struct
CORE_EXPORT
Uri
31
{
32
Uri
(
QgsLayerItem
* layer );
33
Uri(
QString
& encData );
34
35
QString
data()
const
;
36
37
QString
layerType
;
38
QString
providerKey
;
39
QString
name
;
40
QString
uri
;
41
QStringList
supportedCrs
;
42
QStringList
supportedFormats
;
43
};
44
typedef
QList<Uri>
UriList
;
45
46
static
QMimeData
* encodeUriList(
const
UriList& layers );
47
48
static
bool
isUriList(
const
QMimeData
* data );
49
50
static
UriList decodeUriList(
const
QMimeData
* data );
51
52
private
:
53
static
QString
encode(
const
QStringList
& items );
54
static
QStringList
decode(
const
QString
& encoded );
55
56
};
57
58
Q_DECLARE_METATYPE
(
QgsMimeDataUtils::UriList
);
59
60
#endif // QGSMIMEDATAUTILS_H
61
QgsMimeDataUtils::Uri::layerType
QString layerType
Definition:
qgsmimedatautils.h:37
QgsMimeDataUtils::Uri::name
QString name
Definition:
qgsmimedatautils.h:39
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(QgsMimeDataUtils::UriList)
QgsMimeDataUtils
Definition:
qgsmimedatautils.h:26
QgsMimeDataUtils::Uri::supportedFormats
QStringList supportedFormats
Definition:
qgsmimedatautils.h:42
QMimeData
QgsMimeDataUtils::Uri::supportedCrs
QStringList supportedCrs
Definition:
qgsmimedatautils.h:41
QString
QList
QStringList
QgsMimeDataUtils::Uri
Definition:
qgsmimedatautils.h:30
QgsMimeDataUtils::Uri::providerKey
QString providerKey
Definition:
qgsmimedatautils.h:38
QgsMimeDataUtils::Uri::uri
QString uri
Definition:
qgsmimedatautils.h:40
QgsLayerItem
Item that represents a layer that can be opened with one of the providers.
Definition:
qgsdataitem.h:308
QgsMimeDataUtils::UriList
QList< Uri > UriList
Definition:
qgsmimedatautils.h:44
Generated on Sun Jun 24 2018 11:42:48 for QGIS API Documentation by
1.8.13