QGIS API Documentation  2.0.1-Dufour
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
20 class QgsLayerItem;
21 
22 class CORE_EXPORT QgsMimeDataUtils
23 {
24  public:
25 
26  struct CORE_EXPORT Uri
27  {
28  Uri( QgsLayerItem* layer );
29  Uri( QString& encData );
30 
31  QString data() const;
32 
33  QString layerType;
34  QString providerKey;
35  QString name;
36  QString uri;
37  };
38  typedef QList<Uri> UriList;
39 
40  static QMimeData* encodeUriList( UriList layers );
41 
42  static bool isUriList( const QMimeData* data );
43 
44  static UriList decodeUriList( const QMimeData* data );
45 
46 };
47 
48 #endif // QGSMIMEDATAUTILS_H