15 #ifndef QGSMIMEDATAUTILS_H 16 #define QGSMIMEDATAUTILS_H 19 #include <QStringList> 21 #include "qgis_core.h" 36 struct CORE_EXPORT
Uri 41 explicit Uri( QString &encData );
47 bool isValid()
const {
return !layerType.isEmpty(); }
82 typedef QList<QgsMimeDataUtils::Uri>
UriList;
84 static QMimeData *encodeUriList(
const UriList &layers );
86 static bool isUriList(
const QMimeData *data );
88 static UriList decodeUriList(
const QMimeData *data );
94 static QByteArray layerTreeNodesToUriList(
const QList<QgsLayerTreeNode *> &nodes );
97 static QString encode(
const QStringList &items );
98 static QStringList decode(
const QString &encoded );
99 static QByteArray uriListToByteArray(
const UriList &layers );
105 #endif // QGSMIMEDATAUTILS_H QString layerType
Type of URI. Recognized types: "vector" / "raster" / "plugin" / "custom".
This class provides qgis with the ability to render raster datasets onto the mapcanvas.
QString name
Human readable name to be used e.g. in layer tree.
QStringList supportedFormats
bool isValid() const
Returns whether the object contains valid data.
Q_DECLARE_METATYPE(QModelIndex)
This class is a base class for nodes in a layer tree.
QList< QgsMimeDataUtils::Uri > UriList
QString providerKey
For "vector" / "raster" type: provider id.
QString uri
Identifier of the data source recognized by its providerKey.
Item that represents a layer that can be opened with one of the providers.
Represents a vector layer which manages a vector based data sets.