QgsDirectoryItem class
A directory: contains subdirectories and layers.
Contents
Base classes
- class QgsDataCollectionItem
- A Collection: logical collection of layers or subcollections, e.g.
Public static functions
- static auto hiddenPath(const QString& path) -> bool
- Check if the given path is hidden from the browser model.
Constructors, destructors, conversion operators
- QgsDirectoryItem(QgsDataItem* parent, const QString& name, const QString& dirPath, const QString& path)
- Constructor.
Public functions
- auto createChildren() -> QVector<QgsDataItem*> override
- Create children.
- auto equal(const QgsDataItem* other) -> bool override
- Returns true if this item is equal to another item (by testing item type and path).
- void setState(State state) override
- Set item state.
Function documentation
QgsDirectoryItem:: QgsDirectoryItem(QgsDataItem* parent,
const QString& name,
const QString& dirPath,
const QString& path)
Constructor.
| Parameters | |
|---|---|
| parent | |
| name | directory name |
| dirPath | path to directory in file system |
| path | item path in the tree, it may be dirPath or dirPath with some prefix, e.g. favorites: |
QVector<QgsDataItem*> QgsDirectoryItem:: createChildren() override
Create children.
Children are not expected to have parent set. This method MUST BE THREAD SAFE.