2016-04-24 21:07:36 +02:00
|
|
|
#ifndef FILEINFOMODEL_H
|
|
|
|
#define FILEINFOMODEL_H
|
|
|
|
|
2019-06-01 12:40:02 +02:00
|
|
|
#include <QIcon>
|
2016-04-24 21:07:36 +02:00
|
|
|
#include <QStandardItemModel>
|
|
|
|
|
|
|
|
#include <list>
|
|
|
|
|
2018-03-06 23:10:13 +01:00
|
|
|
namespace TagParser {
|
2016-04-24 21:07:36 +02:00
|
|
|
class MediaFileInfo;
|
2018-03-06 02:04:35 +01:00
|
|
|
class Diagnostics;
|
2018-03-07 01:18:01 +01:00
|
|
|
} // namespace TagParser
|
2016-04-24 21:07:36 +02:00
|
|
|
|
|
|
|
namespace QtGui {
|
|
|
|
|
2018-03-07 01:18:01 +01:00
|
|
|
class FileInfoModel : public QStandardItemModel {
|
2016-04-24 21:07:36 +02:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2018-03-06 02:04:35 +01:00
|
|
|
explicit FileInfoModel(QObject *parent = nullptr);
|
2016-04-24 21:07:36 +02:00
|
|
|
|
2019-06-01 12:45:12 +02:00
|
|
|
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
2016-04-24 21:07:36 +02:00
|
|
|
|
2018-03-06 23:10:13 +01:00
|
|
|
const TagParser::MediaFileInfo *fileInfo() const;
|
|
|
|
void setFileInfo(TagParser::MediaFileInfo &fileInfo, TagParser::Diagnostics &diag, TagParser::Diagnostics *diagReparsing = nullptr);
|
2016-04-24 21:07:36 +02:00
|
|
|
|
|
|
|
static const QIcon &informationIcon();
|
|
|
|
static const QIcon &warningIcon();
|
|
|
|
static const QIcon &errorIcon();
|
|
|
|
static const QIcon &debugIcon();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void updateCache();
|
|
|
|
|
|
|
|
private:
|
2018-03-06 23:10:13 +01:00
|
|
|
TagParser::MediaFileInfo *m_file;
|
|
|
|
TagParser::Diagnostics *m_diag;
|
|
|
|
TagParser::Diagnostics *m_diagReparsing;
|
2016-04-24 21:07:36 +02:00
|
|
|
};
|
|
|
|
|
2018-03-07 01:18:01 +01:00
|
|
|
} // namespace QtGui
|
2016-04-24 21:07:36 +02:00
|
|
|
|
|
|
|
#endif // FILEINFOMODEL_H
|