QGIS API Documentation  2.10.1-Pisa
 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 #include <QStringList>
20 
21 class QgsLayerItem;
22 
23 class CORE_EXPORT QgsMimeDataUtils
24 {
25  public:
26 
27  struct CORE_EXPORT Uri
28  {
29  Uri( QgsLayerItem* layer );
30  Uri( QString& encData );
31 
32  QString data() const;
33 
40  };
42 
43  static QMimeData* encodeUriList( UriList layers );
44 
45  static bool isUriList( const QMimeData* data );
46 
47  static UriList decodeUriList( const QMimeData* data );
48 
49  private:
50  static QString encode( const QStringList& items );
51  static QStringList decode( const QString& encoded );
52 
53 };
54 
55 #endif // QGSMIMEDATAUTILS_H
56 
QStringList supportedFormats
Item that represents a layer that can be opened with one of the providers.
Definition: qgsdataitem.h:282
QList< Uri > UriList