diff --git a/python/core/auto_generated/qgsdataitem.sip.in b/python/core/auto_generated/qgsdataitem.sip.in index 83a3b905def..73cab169073 100644 --- a/python/core/auto_generated/qgsdataitem.sip.in +++ b/python/core/auto_generated/qgsdataitem.sip.in @@ -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(); diff --git a/python/core/auto_generated/qgsmimedatautils.sip.in b/python/core/auto_generated/qgsmimedatautils.sip.in index 8ac5917b5a7..ba1042e8437 100644 --- a/python/core/auto_generated/qgsmimedatautils.sip.in +++ b/python/core/auto_generated/qgsmimedatautils.sip.in @@ -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; diff --git a/src/core/qgsdataitem.h b/src/core/qgsdataitem.h index c02a3c42b5e..31ea5b77d4f 100644 --- a/src/core/qgsdataitem.h +++ b/src/core/qgsdataitem.h @@ -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 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; diff --git a/src/core/qgsmimedatautils.h b/src/core/qgsmimedatautils.h index 9f5a67b5311..7c83c8446e6 100644 --- a/src/core/qgsmimedatautils.h +++ b/src/core/qgsmimedatautils.h @@ -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