16#ifndef QGSFILEBASEDDATAITEMPROVIDER_H
17#define QGSFILEBASEDDATAITEMPROVIDER_H
107 QList< QgsProviderSublayerDetails > mSublayers;
137 const QList< QgsProviderSublayerDetails> &sublayers,
138 const QVariantMap &extraUriParts = QVariantMap() );
158 bool canAddVectorLayers()
const;
183 QList<QgsProviderSublayerDetails> sublayers()
const;
187 QList< QgsProviderSublayerDetails> mSublayers;
188 QVariantMap mExtraUriParts;
189 mutable bool mHasCachedCapabilities =
false;
192 mutable bool mHasCachedDropSupport =
false;
193 mutable bool mCachedSupportsDrop =
false;
210 QString
name()
override;
227 static QgsDataItem *createLayerItemForPath(
const QString &path,
QgsDataItem *parentItem,
const QStringList &providers,
228 const QVariantMap &extraUriParts,
231 bool handlesDirectoryPath(
const QString &path )
override;
235 static QgsDataItem *createDataItemForPathPrivate(
const QString &path,
QgsDataItem *parentItem,
const QStringList *allowedProviders,
237 const QVariantMap &extraUriParts );
QFlags< DataItemProviderCapability > DataItemProviderCapabilities
Capabilities for data item providers.
BrowserLayerType
Browser item layer types.
QFlags< SublayerQueryFlag > SublayerQueryFlags
Sublayer query flags.
QFlags< DatabaseProviderConnectionCapability2 > DatabaseProviderConnectionCapabilities2
The QgsAbstractDatabaseProviderConnection class provides common functionality for DB based connection...
QFlags< Capability > Capabilities
A Collection: logical collection of layers or subcollections, e.g.
This is the interface for those who want to add custom data items to the browser tree.
Base class for all items in the model.
virtual QVector< QgsDataItem * > createChildren()
Create children.
QString name() const
Returns the name of the item (the displayed text for the item).
A data item provider for file based data sources.
A data collection item for grouping of the content in file based data collections (e....
A data collection item for file based data collections (e.g.
Item that represents a layer that can be opened with one of the providers.
QgsAbstractDatabaseProviderConnection * databaseConnection() const override
For data items that represent a DB connection or one of its children, this method returns a connectio...
bool hasDragEnabled() const override
Returns true if the item may be dragged.
QgsMimeDataUtils::UriList mimeUris() const override
Returns mime URIs for the data item, most data providers will only return a single URI but some data ...
virtual QString layerName() const
QList< QgsMimeDataUtils::Uri > UriList
Contains details about a sub layer available from a dataset.
A generic data item for file based layers.