Quantum GIS API Documentation  1.8
src/core/qgsmimedatautils.h
Go to the documentation of this file.
00001 /***************************************************************************
00002     qgsmimedatautils.h
00003     ---------------------
00004     begin                : November 2011
00005     copyright            : (C) 2011 by Martin Dobias
00006     email                : wonder.sk at gmail.com
00007  ***************************************************************************
00008  *                                                                         *
00009  *   This program is free software; you can redistribute it and/or modify  *
00010  *   it under the terms of the GNU General Public License as published by  *
00011  *   the Free Software Foundation; either version 2 of the License, or     *
00012  *   (at your option) any later version.                                   *
00013  *                                                                         *
00014  ***************************************************************************/
00015 #ifndef QGSMIMEDATAUTILS_H
00016 #define QGSMIMEDATAUTILS_H
00017 
00018 #include <QMimeData>
00019 
00020 class QgsLayerItem;
00021 
00022 class CORE_EXPORT QgsMimeDataUtils
00023 {
00024   public:
00025 
00026     struct Uri
00027     {
00028       Uri( QgsLayerItem* layer );
00029       Uri( QString& encData );
00030 
00031       QString data() const;
00032 
00033       QString layerType;
00034       QString providerKey;
00035       QString name;
00036       QString uri;
00037     };
00038     typedef QList<Uri> UriList;
00039 
00040     static QMimeData* encodeUriList( UriList layers );
00041 
00042     static bool isUriList( const QMimeData* data );
00043 
00044     static UriList decodeUriList( const QMimeData* data );
00045 
00046 };
00047 
00048 #endif // QGSMIMEDATAUTILS_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines