CCIMXDesktop
 
Loading...
Searching...
No Matches
FileTypeInfo.h
1#ifndef FILETYPEINFO_H
2#define FILETYPEINFO_H
3
4#include "FileInfoProvider.h"
5
7public:
18 FileTypeInfo() = delete;
24 ~FileTypeInfo() override = default;
25
30 inline QString provide_section_name() override {
31 return "File Type";
32 }
40 std::pair<bool, QVariant> data(const QModelIndex& index, int role) override;
45 QString typeInfo(const QString& suffix) { return mappings.value(suffix); };
46
47private:
48 QMap<QString, QString> mappings;
49};
50
51#endif // FILETYPEINFO_H
The CCIMXFileSystemModel class Extends QFileSystemModel to support additional information providers....
Definition CCIMXFileSystemModel.h:13
The FileInfoProvider class is such an abstract class that using in CCIMXFileSystemModel to provide th...
Definition FileInfoProvider.h:15
Definition FileTypeInfo.h:6
Q_DISABLE_COPY(FileTypeInfo)
disable copy object
FileTypeInfo()=delete
Construct a new File delete defaulty.
std::pair< bool, QVariant > data(const QModelIndex &index, int role) override
data provide the data to the views
Definition FileTypeInfo.cpp:4
QString provide_section_name() override
provide_section_name means everything in the name lol
Definition FileTypeInfo.h:30
QString typeInfo(const QString &suffix)
registerTypeInfo register the type info
Definition FileTypeInfo.h:45