mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-10-31 00:06:02 -04:00 
			
		
		
		
	Because: - the /** format is much more prevalent throughout QGIS - sipify works correctly with /**
		
			
				
	
	
		
			84 lines
		
	
	
		
			3.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			84 lines
		
	
	
		
			3.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| /************************************************************************
 | |
|  * This file has been generated automatically from                      *
 | |
|  *                                                                      *
 | |
|  * src/core/qgsdataitemprovider.h                                       *
 | |
|  *                                                                      *
 | |
|  * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | |
|  ************************************************************************/
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| class QgsDataItemProvider
 | |
| {
 | |
| %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
 | |
| 
 | |
| %TypeHeaderCode
 | |
| #include "qgsdataitemprovider.h"
 | |
| %End
 | |
|   public:
 | |
|     virtual ~QgsDataItemProvider();
 | |
| 
 | |
|     virtual QString name() = 0;
 | |
| %Docstring
 | |
| Human-readable name of the provider name
 | |
|  :rtype: str
 | |
| %End
 | |
| 
 | |
|     virtual int capabilities() = 0;
 | |
| %Docstring
 | |
| Return combination of flags from QgsDataProvider.DataCapabilities
 | |
|  :rtype: int
 | |
| %End
 | |
| 
 | |
|     virtual QgsDataItem *createDataItem( const QString &path, QgsDataItem *parentItem ) = 0 /Factory/;
 | |
| %Docstring
 | |
|  Create a new instance of QgsDataItem (or null) for given path and parent item.
 | |
|  Caller takes responsibility of deleting created items.
 | |
|  :rtype: QgsDataItem
 | |
| %End
 | |
| 
 | |
|     virtual QVector<QgsDataItem *> createDataItems( const QString &path, QgsDataItem *parentItem );
 | |
| %Docstring
 | |
|  Create a vector of instances of QgsDataItem (or null) for given path and parent item.
 | |
|  Caller takes responsibility of deleting created items.
 | |
|  :rtype: list of QgsDataItem
 | |
| %End
 | |
| 
 | |
|     virtual bool handlesDirectoryPath( const QString &path );
 | |
| %Docstring
 | |
|  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.
 | |
| 
 | |
| .. versionadded:: 3.0
 | |
|  :rtype: bool
 | |
| %End
 | |
| };
 | |
| 
 | |
| /************************************************************************
 | |
|  * This file has been generated automatically from                      *
 | |
|  *                                                                      *
 | |
|  * src/core/qgsdataitemprovider.h                                       *
 | |
|  *                                                                      *
 | |
|  * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | |
|  ************************************************************************/
 |