Skip to content
Permalink
Browse files

Dox++

  • Loading branch information
nyalldawson committed Feb 8, 2019
1 parent 35ddb3b commit 48e05434e49d55131d3e05b8b5fb8f3527db907c
@@ -533,8 +533,19 @@ A Collection: logical collection of layers or subcollections, e.g. GRASS locatio

void addChild( QgsDataItem *item /Transfer/ );

static QIcon iconDir(); // shared icon: open/closed directory
static QIcon iconDataCollection(); // default icon for data collection
static QIcon iconDir();
%Docstring
Returns the standard browser directory icon.

.. seealso:: :py:func:`iconDataCollection`
%End

static QIcon iconDataCollection();
%Docstring
Returns the standard browser data collection icon.

.. seealso:: :py:func:`iconDir`
%End

protected:

@@ -593,6 +604,10 @@ Constructor.


QString dirPath() const;
%Docstring
Returns the full path to the directory the item represents.
%End

virtual bool equal( const QgsDataItem *other );

virtual QIcon icon();
@@ -67,6 +67,7 @@ Gets mesh layer from uri if possible, otherwise returns None and error is set
QString layerType;

QString providerKey;

QString name;
QString uri;
QStringList supportedCrs;
@@ -556,8 +556,17 @@ class CORE_EXPORT QgsDataCollectionItem : public QgsDataItem

void addChild( QgsDataItem *item SIP_TRANSFER ) { mChildren.append( item ); }

static QIcon iconDir(); // shared icon: open/closed directory
static QIcon iconDataCollection(); // default icon for data collection
/**
* Returns the standard browser directory icon.
* \see iconDataCollection()
*/
static QIcon iconDir();

/**
* Returns the standard browser data collection icon.
* \see iconDir()
*/
static QIcon iconDataCollection();

protected:

@@ -607,7 +616,11 @@ class CORE_EXPORT QgsDirectoryItem : public QgsDataCollectionItem

QVector<QgsDataItem *> createChildren() override;

/**
* Returns the full path to the directory the item represents.
*/
QString dirPath() const { return mDirPath; }

bool equal( const QgsDataItem *other ) override;
QIcon icon() override;
QWidget *paramWidget() override SIP_FACTORY;
@@ -72,16 +72,30 @@ class CORE_EXPORT QgsMimeDataUtils
*/
QgsMeshLayer *meshLayer( bool &owner, QString &error ) const;

//! Type of URI. Recognized types: "vector" / "raster" / "mesh" / "plugin" / "custom" / "project"
/**
* Type of URI.
*
* Recognized types include
* - "vector": vector layers
* - "raster": raster layers
* - "mesh": mesh layers
* - "plugin": plugin layers
* - "custom": custom types
* - "project": QGS/QGZ project file
* - "directory": directory path
*
* Mime data from plugins may use additional custom layer types.
*/
QString layerType;

/**
* For "vector" / "raster" type: provider id.
* For "plugin" type: plugin layer type name.
* For "custom" type: key of its QgsCustomDropHandler
* For "project" type: unused
* For "project" and "directory" types: unused
*/
QString providerKey;

//! Human readable name to be used e.g. in layer tree
QString name;
//! Identifier of the data source recognized by its providerKey

0 comments on commit 48e0543

Please sign in to comment.
You can’t perform that action at this time.