15 #ifndef QGSMIMEDATAUTILS_H 16 #define QGSMIMEDATAUTILS_H 19 #include <QStringList> 21 #include "qgis_core.h" 38 struct CORE_EXPORT
Uri 43 explicit Uri( QString &encData );
49 bool isValid()
const {
return !layerType.isEmpty(); }
73 QgsMeshLayer *meshLayer(
bool &owner, QString &error )
const;
93 SIP_PYOBJECT __repr__();
95 QString str = QStringLiteral(
"<QgsMimeDataUtils::Uri (%1): %2>" ).arg( sipCpp->providerKey, sipCpp->uri );
96 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
105 static QMimeData *encodeUriList(
const UriList &layers )
SIP_FACTORY;
107 static bool isUriList(
const QMimeData *data );
109 static UriList decodeUriList(
const QMimeData *data );
115 static QByteArray layerTreeNodesToUriList(
const QList<QgsLayerTreeNode *> &nodes );
118 static QString encode(
const QStringList &items );
119 static QStringList decode(
const QString &encoded );
120 static QByteArray uriListToByteArray(
const UriList &layers );
123 friend class TestQgsMimeDataUtils;
129 #endif // QGSMIMEDATAUTILS_H QString layerType
Type of URI. Recognized types: "vector" / "raster" / "mesh" / "plugin" / "custom" / "project"...
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
Q_DECLARE_METATYPE(QModelIndex)
bool isValid() const
Returns whether the object contains valid data.
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 mesh layer supporting display of data on structured or unstructured meshes.
Represents a vector layer which manages a vector based data sets.