QGIS API Documentation  3.2.0-Bonn (bc43194)
Public Member Functions | Protected Attributes | List of all members
QgsDataItemProviderFromPlugin Class Reference

Simple data item provider implementation that handles the support for provider plugins (which may contain dataCapabilities() and dataItem() functions). More...

Inheritance diagram for QgsDataItemProviderFromPlugin:
Inheritance graph
[legend]

Public Member Functions

 QgsDataItemProviderFromPlugin (const QString &name, dataCapabilities_t *capabilitiesFunc, dataItem_t *dataItemFunc, handlesDirectoryPath_t *handlesDirectoryPathFunc)
 QgsDataItemProviderFromPlugin constructor. More...
 
int capabilities () override
 Returns combination of flags from QgsDataProvider::DataCapabilities. More...
 
QgsDataItemcreateDataItem (const QString &path, QgsDataItem *parentItem) override
 Create a new instance of QgsDataItem (or null) for given path and parent item. More...
 
bool handlesDirectoryPath (const QString &path) override
 Returns true if the provider will handle the directory at the specified path. More...
 
QString name () override
 Human-readable name of the provider name. More...
 
- Public Member Functions inherited from QgsDataItemProvider
virtual ~QgsDataItemProvider ()=default
 
virtual QVector< QgsDataItem * > createDataItems (const QString &path, QgsDataItem *parentItem)
 Create a vector of instances of QgsDataItem (or null) for given path and parent item. More...
 

Protected Attributes

dataCapabilities_tmCapabilitiesFunc = nullptr
 
dataItem_tmDataItemFunc = nullptr
 
handlesDirectoryPath_tmHandlesDirectoryPathFunc = nullptr
 
QString mName
 

Detailed Description

Simple data item provider implementation that handles the support for provider plugins (which may contain dataCapabilities() and dataItem() functions).

Ideally the provider plugins should directly provide implementation of QgsDataItemProvider, for the time being this is a wrapper for the legacy interface.

Note
not available in Python bindings

Definition at line 36 of file qgsdataitemproviderregistry.cpp.

Constructor & Destructor Documentation

◆ QgsDataItemProviderFromPlugin()

QgsDataItemProviderFromPlugin::QgsDataItemProviderFromPlugin ( const QString &  name,
dataCapabilities_t capabilitiesFunc,
dataItem_t dataItemFunc,
handlesDirectoryPath_t handlesDirectoryPathFunc 
)
inline

QgsDataItemProviderFromPlugin constructor.

Parameters
nameplugin name
capabilitiesFuncfunction pointer to the data capabilities
dataItemFuncfunction pointer to the data items
handlesDirectoryPathFuncfunction pointer to handlesDirectoryPath

Definition at line 47 of file qgsdataitemproviderregistry.cpp.

Member Function Documentation

◆ capabilities()

int QgsDataItemProviderFromPlugin::capabilities ( )
inlineoverridevirtual

Returns combination of flags from QgsDataProvider::DataCapabilities.

Implements QgsDataItemProvider.

Definition at line 57 of file qgsdataitemproviderregistry.cpp.

◆ createDataItem()

QgsDataItem* QgsDataItemProviderFromPlugin::createDataItem ( const QString &  path,
QgsDataItem parentItem 
)
inlineoverridevirtual

Create a new instance of QgsDataItem (or null) for given path and parent item.

Caller takes responsibility of deleting created items.

Implements QgsDataItemProvider.

Definition at line 59 of file qgsdataitemproviderregistry.cpp.

◆ handlesDirectoryPath()

bool QgsDataItemProviderFromPlugin::handlesDirectoryPath ( const QString &  path)
inlineoverridevirtual

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.

Since
QGIS 3.0

Reimplemented from QgsDataItemProvider.

Definition at line 61 of file qgsdataitemproviderregistry.cpp.

◆ name()

QString QgsDataItemProviderFromPlugin::name ( )
inlineoverridevirtual

Human-readable name of the provider name.

Implements QgsDataItemProvider.

Definition at line 55 of file qgsdataitemproviderregistry.cpp.

Member Data Documentation

◆ mCapabilitiesFunc

dataCapabilities_t* QgsDataItemProviderFromPlugin::mCapabilitiesFunc = nullptr
protected

Definition at line 71 of file qgsdataitemproviderregistry.cpp.

◆ mDataItemFunc

dataItem_t* QgsDataItemProviderFromPlugin::mDataItemFunc = nullptr
protected

Definition at line 72 of file qgsdataitemproviderregistry.cpp.

◆ mHandlesDirectoryPathFunc

handlesDirectoryPath_t* QgsDataItemProviderFromPlugin::mHandlesDirectoryPathFunc = nullptr
protected

Definition at line 73 of file qgsdataitemproviderregistry.cpp.

◆ mName

QString QgsDataItemProviderFromPlugin::mName
protected

Definition at line 70 of file qgsdataitemproviderregistry.cpp.


The documentation for this class was generated from the following file: