The FileInfoProvider class is such an abstract class that using in CCIMXFileSystemModel to provide the file information, which, we can modify the file information provide easily in the model.
More...
#include <FileInfoProvider.h>
|
| Q_DISABLE_COPY (FileInfoProvider) |
| disable copy object
|
|
| FileInfoProvider ()=delete |
| Construct a new File Info Provider object default is prohibited, disable this for the default constructor, prevent the non-model register.
|
|
| FileInfoProvider (CCIMXFileSystemModel *models) |
| Construct a new File Info Provider object, assigned models requires.
|
|
virtual | ~FileInfoProvider ()=default |
| Destroy the File Info Provider object.
|
|
virtual QString | provide_section_name ()=0 |
| One InfoProvider for one section header name, the function do the case :)
|
|
void | setCurrentHandlePath (const QString &path) |
| setCurrentHandlePath set the current handle path
|
|
QString | currentHandlePath () |
| currentHandlePath get the current handle path
|
|
virtual std::pair< bool, QVariant > | data (const QModelIndex &index, int role)=0 |
| functions provide what to display
|
|
The FileInfoProvider class is such an abstract class that using in CCIMXFileSystemModel to provide the file information, which, we can modify the file information provide easily in the model.
◆ FileInfoProvider()
Construct a new File Info Provider object, assigned models requires.
- Parameters
-
◆ currentHandlePath()
QString FileInfoProvider::currentHandlePath |
( |
| ) |
|
|
inline |
currentHandlePath get the current handle path
- Returns
- the current handle path
◆ data()
virtual std::pair< bool, QVariant > FileInfoProvider::data |
( |
const QModelIndex & |
index, |
|
|
int |
role |
|
) |
| |
|
pure virtual |
functions provide what to display
- Parameters
-
index | the model index |
role | the role of the index |
- Returns
- returns the data of the index, if the data is not available, it will return with {false, {}}
- Note
- for developers re-develop the sessions, you can modified to the implements with std::optional<QVariant>, QVariant itself invalid means something in model that is meaningful, so, QVariant's invalid don't mean the data itself invalid
Implemented in DirentSizeCounter, FileCountInfo, FileNameProviders, and FileTypeInfo.
◆ provide_section_name()
virtual QString FileInfoProvider::provide_section_name |
( |
| ) |
|
|
inlinepure virtual |
◆ setCurrentHandlePath()
void FileInfoProvider::setCurrentHandlePath |
( |
const QString & |
path | ) |
|
|
inline |
setCurrentHandlePath set the current handle path
- Parameters
-
The documentation for this class was generated from the following file: