QGIS API Documentation 3.41.0-Master (3c143d501a8)
|
This is the interface for those who want to add custom data items to the browser tree. More...
#include <qgsdataitemprovider.h>
Public Member Functions | |
virtual | ~QgsDataItemProvider ()=default |
virtual Qgis::DataItemProviderCapabilities | capabilities () const =0 |
Returns combination of flags from QgsDataProvider::DataCapabilities. | |
virtual QgsDataItem * | createDataItem (const QString &path, QgsDataItem *parentItem)=0 |
Create a new instance of QgsDataItem (or nullptr ) for given path and parent item. | |
virtual QVector< QgsDataItem * > | createDataItems (const QString &path, QgsDataItem *parentItem) |
Create a vector of instances of QgsDataItem (or nullptr ) for given path and parent item. | |
virtual QString | dataProviderKey () const |
Returns the data provider key (if the data item provider is associated with a data provider), the default implementation returns an empty string. | |
virtual bool | handlesDirectoryPath (const QString &path) |
Returns true if the provider will handle the directory at the specified path. | |
virtual QString | name ()=0 |
Human-readable name of the provider name. | |
This is the interface for those who want to add custom data items to the browser tree.
The method createDataItem() is ever called only if capabilities() return non-zero value. There are two occasions when createDataItem() is called:
nullptr
).Definition at line 44 of file qgsdataitemprovider.h.
|
virtualdefault |
|
pure virtual |
Returns combination of flags from QgsDataProvider::DataCapabilities.
Implemented in QgsFileBasedDataItemProvider.
|
pure virtual |
Create a new instance of QgsDataItem (or nullptr
) for given path and parent item.
Caller takes responsibility of deleting created items.
Implemented in QgsFileBasedDataItemProvider.
|
virtual |
Create a vector of instances of QgsDataItem (or nullptr
) for given path and parent item.
Caller takes responsibility of deleting created items.
Definition at line 20 of file qgsdataitemprovider.cpp.
|
inlinevirtual |
Returns the data provider key (if the data item provider is associated with a data provider), the default implementation returns an empty string.
Definition at line 58 of file qgsdataitemprovider.h.
|
virtual |
Returns true
if the provider will handle the directory at the specified path.
If the provider indicates that it will handle the directory, the default creation and population of directory items for the path will be avoided and it is left to the provider to correctly populate relevant entries for the path.
The default implementation returns false
for all paths.
Reimplemented in QgsFileBasedDataItemProvider.
Definition at line 27 of file qgsdataitemprovider.cpp.
|
pure virtual |
Human-readable name of the provider name.
Implemented in QgsFileBasedDataItemProvider.