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;
148 SIP_PYOBJECT __repr__();
150 QString str = QStringLiteral(
"<QgsMimeDataUtils::Uri (%1): %2>" ).arg( sipCpp->providerKey, sipCpp->uri );
151 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
160 static QMimeData *encodeUriList(
const UriList &layers )
SIP_FACTORY;
162 static bool isUriList(
const QMimeData *data );
164 static UriList decodeUriList(
const QMimeData *data );
170 static QByteArray layerTreeNodesToUriList(
const QList<QgsLayerTreeNode *> &nodes );
181 static QString encode(
const QStringList &items );
182 static QStringList decode(
const QString &encoded );
183 static QByteArray uriListToByteArray(
const UriList &layers );
186 friend class TestQgsMimeDataUtils;
192 #endif // QGSMIMEDATAUTILS_H QString layerType
Type of URI.
Base class for all map layer types.
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.
Type
The WKB type describes the number of dimensions a geometry has.
Q_DECLARE_METATYPE(QgsMeshTimeSettings)
This class is a base class for nodes in a layer tree.
QString pId
Unique ID associated with application instance.
QList< QgsMimeDataUtils::Uri > UriList
QString providerKey
For "vector" / "raster" type: provider id.
QString layerId
Layer ID, if uri is associated with a layer from a QgsProject.
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.