QgsProjectItem class
Data item that can be used to represent QGIS projects.
Contents
Base classes
- class QgsDataItem
- Base class for all items in the model.
Constructors, destructors, conversion operators
- QgsProjectItem(QgsDataItem* parent, const QString& name, const QString& path)
- A data item holding a reference to a QGIS project file.
Public functions
- auto hasDragEnabled() const -> bool override
- Returns true if the item may be dragged.
-
auto mimeUri() const -> QgsMimeDataUtils::
Uri override - Returns mime URI for the data item.
Function documentation
QgsProjectItem:: QgsProjectItem(QgsDataItem* parent,
const QString& name,
const QString& path)
A data item holding a reference to a QGIS project file.
| Parameters | |
|---|---|
| parent | The parent data item. |
| name | The name of the of the project. Displayed to the user. |
| path | The full path to the project. |
bool QgsProjectItem:: hasDragEnabled() const override
Returns true if the item may be dragged.
Default implementation returns false. A draggable item has to implement mimeUri() that will be used to pass data.
QgsMimeDataUtils:: Uri QgsProjectItem:: mimeUri() const override
Returns mime URI for the data item.
Items that return valid URI will be returned in mime data when dragging a selection from browser model.