mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			160 lines
		
	
	
		
			4.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			160 lines
		
	
	
		
			4.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
/************************************************************************
 | 
						|
 * This file has been generated automatically from                      *
 | 
						|
 *                                                                      *
 | 
						|
 * src/core/browser/qgslayeritem.h                                      *
 | 
						|
 *                                                                      *
 | 
						|
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 | 
						|
 ************************************************************************/
 | 
						|
 | 
						|
 | 
						|
 | 
						|
class QgsLayerItem : QgsDataItem
 | 
						|
{
 | 
						|
%Docstring(signature="appended")
 | 
						|
Item that represents a layer that can be opened with one of the providers
 | 
						|
%End
 | 
						|
 | 
						|
%TypeHeaderCode
 | 
						|
#include "qgslayeritem.h"
 | 
						|
%End
 | 
						|
  public:
 | 
						|
 | 
						|
    QgsLayerItem( QgsDataItem *parent, const QString &name, const QString &path, const QString &uri, Qgis::BrowserLayerType layerType, const QString &providerKey );
 | 
						|
%Docstring
 | 
						|
Constructor for QgsLayerItem.
 | 
						|
%End
 | 
						|
 | 
						|
    SIP_PYOBJECT __repr__();
 | 
						|
%MethodCode
 | 
						|
    QString str = QStringLiteral( "<QgsLayerItem: \"%1\" %2>" ).arg( sipCpp->name(), sipCpp->path() );
 | 
						|
    sipRes = PyUnicode_FromString( str.toUtf8().constData() );
 | 
						|
%End
 | 
						|
 | 
						|
 | 
						|
    virtual bool equal( const QgsDataItem *other );
 | 
						|
 | 
						|
 | 
						|
    virtual bool hasDragEnabled() const;
 | 
						|
 | 
						|
    virtual QgsMimeDataUtils::UriList mimeUris() const;
 | 
						|
 | 
						|
 | 
						|
 | 
						|
    Qgis::LayerType mapLayerType() const;
 | 
						|
%Docstring
 | 
						|
Returns the associated map layer type.
 | 
						|
%End
 | 
						|
 | 
						|
    static Qgis::BrowserLayerType typeFromMapLayer( QgsMapLayer *layer );
 | 
						|
%Docstring
 | 
						|
Returns the layer item type corresponding to a :py:class:`QgsMapLayer` ``layer``.
 | 
						|
 | 
						|
.. versionadded:: 3.6
 | 
						|
%End
 | 
						|
 | 
						|
    QString uri() const;
 | 
						|
%Docstring
 | 
						|
Returns layer uri or empty string if layer cannot be created
 | 
						|
%End
 | 
						|
 | 
						|
    QStringList supportedCrs() const;
 | 
						|
%Docstring
 | 
						|
Returns the supported CRS
 | 
						|
%End
 | 
						|
 | 
						|
    QStringList supportedFormats() const;
 | 
						|
%Docstring
 | 
						|
Returns the supported formats
 | 
						|
%End
 | 
						|
 | 
						|
    virtual QString comments() const;
 | 
						|
%Docstring
 | 
						|
Returns comments of the layer
 | 
						|
%End
 | 
						|
 | 
						|
    static QString layerTypeAsString( Qgis::BrowserLayerType layerType );
 | 
						|
%Docstring
 | 
						|
Returns the string representation of the given ``layerType``
 | 
						|
 | 
						|
.. versionadded:: 3
 | 
						|
%End
 | 
						|
 | 
						|
    static QString iconName( Qgis::BrowserLayerType layerType );
 | 
						|
%Docstring
 | 
						|
Returns the icon name of the given ``layerType``
 | 
						|
 | 
						|
.. versionadded:: 3
 | 
						|
%End
 | 
						|
 | 
						|
 virtual bool deleteLayer() /Deprecated/;
 | 
						|
%Docstring
 | 
						|
Delete this layer item
 | 
						|
Use :py:class:`QgsDataItemGuiProvider`.deleteLayer instead
 | 
						|
 | 
						|
.. deprecated:: 3.10
 | 
						|
%End
 | 
						|
 | 
						|
  protected:
 | 
						|
 | 
						|
  public:
 | 
						|
 | 
						|
    static QIcon iconForWkbType( Qgis::WkbType type );
 | 
						|
%Docstring
 | 
						|
Returns the icon for a vector layer whose geometry type is provided.
 | 
						|
 | 
						|
.. versionadded:: 3.18
 | 
						|
%End
 | 
						|
 | 
						|
    static QIcon iconPoint();
 | 
						|
    static QIcon iconLine();
 | 
						|
    static QIcon iconPolygon();
 | 
						|
    static QIcon iconTable();
 | 
						|
    static QIcon iconRaster();
 | 
						|
    static QIcon iconDefault();
 | 
						|
    static QIcon iconMesh();
 | 
						|
%Docstring
 | 
						|
Returns icon for mesh layer type
 | 
						|
%End
 | 
						|
    static QIcon iconVectorTile();
 | 
						|
%Docstring
 | 
						|
Returns icon for vector tile layer
 | 
						|
%End
 | 
						|
    static QIcon iconPointCloud();
 | 
						|
%Docstring
 | 
						|
Returns icon for point cloud layer
 | 
						|
%End
 | 
						|
    virtual QString layerName() const;
 | 
						|
%Docstring
 | 
						|
 | 
						|
:return: the layer name
 | 
						|
%End
 | 
						|
    virtual QgsAbstractDatabaseProviderConnection *databaseConnection() const;
 | 
						|
 | 
						|
 | 
						|
    const QgsLayerMetadata &layerMetadata() const;
 | 
						|
%Docstring
 | 
						|
Returns layer's metadata, it may be a default constructed metadata
 | 
						|
if metadata is not explicitly set.
 | 
						|
 | 
						|
.. versionadded:: 3.28
 | 
						|
%End
 | 
						|
 | 
						|
    void setLayerMetadata( const QgsLayerMetadata &metadata );
 | 
						|
%Docstring
 | 
						|
Set layer's ``metadata``.
 | 
						|
 | 
						|
.. versionadded:: 3.28
 | 
						|
%End
 | 
						|
 | 
						|
};
 | 
						|
 | 
						|
 | 
						|
 | 
						|
/************************************************************************
 | 
						|
 * This file has been generated automatically from                      *
 | 
						|
 *                                                                      *
 | 
						|
 * src/core/browser/qgslayeritem.h                                      *
 | 
						|
 *                                                                      *
 | 
						|
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 | 
						|
 ************************************************************************/
 |