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