15 #include <QStringList> 25 : providerKey( layerItem->providerKey() )
26 , name( layerItem->layerName() )
27 , uri( layerItem->uri() )
28 , supportedCrs( layerItem->supportedCRS() )
29 , supportedFormats( layerItem->supportedFormats() )
49 if ( decoded.
size() < 4 )
68 QgsDebugMsg(
QString(
"type:%1 key:%2 name:%3 uri:%4 supportedCRS:%5 supportedFormats:%6" )
91 QDataStream stream( &encodedData, QIODevice::WriteOnly );
92 Q_FOREACH (
const Uri& u, layers )
105 QDataStream stream( &encodedData, QIODevice::ReadOnly );
108 while ( !stream.
atEnd() )
120 Q_FOREACH (
const QString& item, items )
125 encoded += str +
':';
134 bool inEscape =
false;
135 Q_FOREACH (
QChar c, encoded )
137 if ( c ==
'\\' && inEscape )
141 else if ( c ==
'\\' )
145 else if ( c ==
':' && !inEscape )
QByteArray data(const QString &mimeType) const
static UriList decodeUriList(const QMimeData *data)
static QMimeData * encodeUriList(const UriList &layers)
QStringList supportedFormats
QString join(const QString &separator) const
static bool isUriList(const QMimeData *data)
void append(const T &value)
QString & replace(int position, int n, QChar after)
QgsMapLayer::LayerType mapLayerType()
Returns QgsMapLayer::LayerType.
QString left(int n) const
Item that represents a layer that can be opened with one of the providers.
void setData(const QString &mimeType, const QByteArray &data)
static const char * QGIS_URILIST_MIMETYPE