2022-02-13 20:08:18 +08:00
|
|
|
#ifndef CUSTOMFILEICONPROVIDER_H
|
|
|
|
#define CUSTOMFILEICONPROVIDER_H
|
|
|
|
|
|
|
|
#include <QFileIconProvider>
|
|
|
|
|
2022-02-15 00:01:50 +08:00
|
|
|
class GitRepository;
|
2022-02-13 20:08:18 +08:00
|
|
|
class CustomFileIconProvider : public QFileIconProvider
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CustomFileIconProvider();
|
2022-02-14 00:13:00 +08:00
|
|
|
~CustomFileIconProvider();
|
2022-02-15 00:01:50 +08:00
|
|
|
void setRootFolder(const QString& folder);
|
|
|
|
void update();
|
2022-02-14 00:13:00 +08:00
|
|
|
private:
|
2022-02-15 00:01:50 +08:00
|
|
|
GitRepository* mVCSRepository;
|
2022-02-13 20:08:18 +08:00
|
|
|
// QFileIconProvider interface
|
|
|
|
public:
|
|
|
|
QIcon icon(IconType type) const override;
|
|
|
|
QIcon icon(const QFileInfo &info) const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CUSTOMFILEICONPROVIDER_H
|