QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
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;
157 SIP_PYOBJECT __repr__();
159 QString
str = QStringLiteral(
"<QgsMimeDataUtils::Uri (%1): %2>" ).arg( sipCpp->providerKey, sipCpp->uri );
160 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
171 static bool isUriList(
const QMimeData *data );
173 static UriList decodeUriList(
const QMimeData *data );
179 static QByteArray layerTreeNodesToUriList(
const QList<QgsLayerTreeNode *> &nodes );
190 static QString encode(
const QStringList &items );
191 static QStringList decode(
const QString &encoded );
192 static QByteArray uriListToByteArray(
const UriList &layers );
195 friend class TestQgsMimeDataUtils;
201 #endif // QGSMIMEDATAUTILS_H
QString name
Human readable name to be used e.g. in layer tree.
QString uri
Identifier of the data source recognized by its providerKey.
bool isValid() const
Returns whether the object contains valid data.
This class is a base class for nodes in a layer tree.
QStringList supportedFormats
QString layerType
Type of URI.
Type
The WKB type describes the number of dimensions a geometry has.
QList< QgsMimeDataUtils::Uri > UriList
Represents a mesh layer supporting display of data on structured or unstructured meshes.
QString filePath
Path to file, if uri is associated with a file.
QString pId
Unique ID associated with application instance.
Represents a raster layer.
QString providerKey
For "vector" / "raster" type: provider id.
QString layerId
Layer ID, if uri is associated with a layer from a QgsProject.
Represents a vector layer which manages a vector based data sets.
Base class for all map layer types. This is the base class for all map layer types (vector,...
Q_DECLARE_METATYPE(QgsDatabaseQueryLogEntry)
Item that represents a layer that can be opened with one of the providers.