2017-05-14 09:48:41 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgsdataitemprovider.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-04 19:26:42 +07:00
|
|
|
|
|
|
|
class QgsDataItemProvider
|
|
|
|
{
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
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:
|
|
|
|
1. to create root items (passed path is empty, parent item is null).
|
|
|
|
2. to create items in directory structure. For this capabilities have to return at least
|
|
|
|
of the following: QgsDataProider.Dir or QgsDataProvider.File. Passed path is the file
|
|
|
|
or directory being inspected, parent item is a valid QgsDirectoryItem
|
|
|
|
|
|
|
|
.. versionadded:: 2.10
|
|
|
|
%End
|
|
|
|
|
2015-03-04 19:26:42 +07:00
|
|
|
%TypeHeaderCode
|
2017-05-14 09:48:41 +02:00
|
|
|
#include "qgsdataitemprovider.h"
|
2015-03-04 19:26:42 +07:00
|
|
|
%End
|
|
|
|
public:
|
|
|
|
virtual ~QgsDataItemProvider();
|
|
|
|
|
|
|
|
virtual QString name() = 0;
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
Human-readable name of the provider name
|
|
|
|
:rtype: str
|
|
|
|
%End
|
2015-03-04 19:26:42 +07:00
|
|
|
|
|
|
|
virtual int capabilities() = 0;
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
Return combination of flags from QgsDataProvider.DataCapabilities
|
|
|
|
:rtype: int
|
|
|
|
%End
|
2015-03-04 19:26:42 +07:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
virtual QgsDataItem *createDataItem( const QString &path, QgsDataItem *parentItem ) = 0 /Factory/;
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
Caller takes responsibility of deleting created items.
|
|
|
|
:rtype: QgsDataItem
|
|
|
|
%End
|
2015-03-04 19:26:42 +07:00
|
|
|
|
|
|
|
};
|
2017-05-14 09:48:41 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgsdataitemprovider.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|