|
QGIS API Documentation
3.0.2-Girona (307d082)
|
#include <qgsmimedatautils.h>
Public Member Functions | |
| Uri ()=default | |
| Constructs invalid URI. More... | |
| Uri (QString &encData) | |
| Constructs URI from encoded data. More... | |
| QString | data () const |
| Returns encoded representation of the object. More... | |
| bool | isValid () const |
| Returns whether the object contains valid data. More... | |
| QgsRasterLayer * | rasterLayer (bool &owner, QString &error) const |
| Get raster layer from uri if possible, otherwise returns 0 and error is set. More... | |
| QgsVectorLayer * | vectorLayer (bool &owner, QString &error) const |
| Get vector layer from uri if possible, otherwise returns 0 and error is set. More... | |
Public Attributes | |
| QString | layerType |
| Type of URI. Recognized types: "vector" / "raster" / "plugin" / "custom". More... | |
| QString | name |
| Human readable name to be used e.g. in layer tree. More... | |
| QString | providerKey |
| For "vector" / "raster" type: provider id. More... | |
| QStringList | supportedCrs |
| QStringList | supportedFormats |
| QString | uri |
| Identifier of the data source recognized by its providerKey. More... | |
Definition at line 36 of file qgsmimedatautils.h.
|
default |
Constructs invalid URI.
|
explicit |
Constructs URI from encoded data.
Definition at line 30 of file qgsmimedatautils.cpp.
| QString QgsMimeDataUtils::Uri::data | ( | ) | const |
Returns encoded representation of the object.
Definition at line 59 of file qgsmimedatautils.cpp.
|
inline |
Returns whether the object contains valid data.
Definition at line 47 of file qgsmimedatautils.h.
| QgsRasterLayer * QgsMimeDataUtils::Uri::rasterLayer | ( | bool & | owner, |
| QString & | error | ||
| ) | const |
Get raster layer from uri if possible, otherwise returns 0 and error is set.
| owner | set to true if caller becomes owner |
| error | set to error message if cannot get raster |
Definition at line 99 of file qgsmimedatautils.cpp.
| QgsVectorLayer * QgsMimeDataUtils::Uri::vectorLayer | ( | bool & | owner, |
| QString & | error | ||
| ) | const |
Get vector layer from uri if possible, otherwise returns 0 and error is set.
| owner | set to true if caller becomes owner |
| error | set to error message if cannot get vector |
Definition at line 64 of file qgsmimedatautils.cpp.
| QString QgsMimeDataUtils::Uri::layerType |
Type of URI. Recognized types: "vector" / "raster" / "plugin" / "custom".
Definition at line 67 of file qgsmimedatautils.h.
| QString QgsMimeDataUtils::Uri::name |
Human readable name to be used e.g. in layer tree.
Definition at line 76 of file qgsmimedatautils.h.
| QString QgsMimeDataUtils::Uri::providerKey |
For "vector" / "raster" type: provider id.
For "plugin" type: plugin layer type name. For "custom" type: key of its QgsCustomDropHandler
Definition at line 74 of file qgsmimedatautils.h.
| QStringList QgsMimeDataUtils::Uri::supportedCrs |
Definition at line 79 of file qgsmimedatautils.h.
| QStringList QgsMimeDataUtils::Uri::supportedFormats |
Definition at line 80 of file qgsmimedatautils.h.
| QString QgsMimeDataUtils::Uri::uri |
Identifier of the data source recognized by its providerKey.
Definition at line 78 of file qgsmimedatautils.h.
1.8.13