The CCIMXFileSystemModel class Extends QFileSystemModel to support additional information providers. Providers can add custom data for files/directories.
More...
#include <CCIMXFileSystemModel.h>
|
| CCIMXFileSystemModel (QObject *parent=nullptr) |
| Constructor with optional parent.
|
|
void | bindProviders (QList< FileInfoProvider * > &providers) |
| bindProviders Binds a list of FileInfoProvider instances to this model.
|
|
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
| data Overrides QFileSystemModel::data to provide custom data from providers.
|
|
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
| headerData Overrides QFileSystemModel::headerData to provide custom header names.
|
|
const QList< FileInfoProvider * > & | get_providers () const |
| get_providers Returns the list of currently bound providers.
|
|
The CCIMXFileSystemModel class Extends QFileSystemModel to support additional information providers. Providers can add custom data for files/directories.
◆ CCIMXFileSystemModel()
CCIMXFileSystemModel::CCIMXFileSystemModel |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
Constructor with optional parent.
- Parameters
-
parent | Pointer to the QObject parent, default nullptr. |
◆ bindProviders()
void CCIMXFileSystemModel::bindProviders |
( |
QList< FileInfoProvider * > & |
providers | ) |
|
|
inline |
bindProviders Binds a list of FileInfoProvider instances to this model.
- Parameters
-
◆ data()
QVariant CCIMXFileSystemModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
override |
data Overrides QFileSystemModel::data to provide custom data from providers.
- Parameters
-
index | Model index. |
role | Data role. |
- Returns
- QVariant containing the data for the given index and role.
◆ get_providers()
const QList< FileInfoProvider * > & CCIMXFileSystemModel::get_providers |
( |
| ) |
const |
|
inline |
get_providers Returns the list of currently bound providers.
- Returns
- const reference to the QList of FileInfoProvider pointers.
◆ headerData()
QVariant CCIMXFileSystemModel::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
override |
headerData Overrides QFileSystemModel::headerData to provide custom header names.
- Parameters
-
section | Section index. |
orientation | Horizontal or Vertical. |
role | Data role. |
- Returns
- QVariant containing header text.
The documentation for this class was generated from the following files: