15 #ifndef QGSMIMEDATAUTILS_H
16 #define QGSMIMEDATAUTILS_H
19 #include <QStringList>
21 #include "qgis_core.h"
40 struct CORE_EXPORT
Uri
45 explicit Uri(
const QString &encData );
58 bool isValid()
const {
return !layerType.isEmpty(); }
82 QgsMeshLayer *meshLayer(
bool &owner, QString &error )
const;
149 SIP_PYOBJECT __repr__();
151 QString str = QStringLiteral(
"<QgsMimeDataUtils::Uri (%1): %2>" ).arg( sipCpp->providerKey, sipCpp->uri );
152 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
163 static bool isUriList(
const QMimeData *data );
165 static UriList decodeUriList(
const QMimeData *data );
171 static QByteArray layerTreeNodesToUriList(
const QList<QgsLayerTreeNode *> &nodes );
182 static QString encode(
const QStringList &items );
183 static QStringList decode(
const QString &encoded );
184 static QByteArray uriListToByteArray(
const UriList &layers );
187 friend class TestQgsMimeDataUtils;
193 #endif // QGSMIMEDATAUTILS_H