2014-02-10 17:21:30 +01:00
|
|
|
#ifndef _IMGARCHIVEMODEL_HPP_
|
|
|
|
#define _IMGARCHIVEMODEL_HPP_
|
2014-02-10 16:34:09 +01:00
|
|
|
#include <QAbstractItemModel>
|
|
|
|
#include <loaders/LoaderIMG.hpp>
|
|
|
|
|
2016-09-09 22:13:21 +02:00
|
|
|
class IMGArchiveModel : public QAbstractListModel {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
LoaderIMG archive;
|
|
|
|
|
2014-02-10 16:34:09 +01:00
|
|
|
public:
|
2014-02-10 17:21:30 +01:00
|
|
|
IMGArchiveModel(const LoaderIMG& archive, QObject* parent = 0)
|
2016-09-09 22:13:21 +02:00
|
|
|
: QAbstractListModel(parent), archive(archive) {
|
|
|
|
}
|
2014-02-10 16:34:09 +01:00
|
|
|
|
2018-08-30 02:19:38 +02:00
|
|
|
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
2016-09-09 22:13:21 +02:00
|
|
|
|
2018-08-30 02:19:38 +02:00
|
|
|
int columnCount(const QModelIndex& parent = QModelIndex()) const override;
|
2016-09-09 22:13:21 +02:00
|
|
|
|
2018-08-30 02:19:38 +02:00
|
|
|
QVariant data(const QModelIndex& index,
|
|
|
|
int role = Qt::DisplayRole) const override;
|
2016-09-09 22:13:21 +02:00
|
|
|
|
2018-08-30 02:19:38 +02:00
|
|
|
QVariant headerData(int section, Qt::Orientation orientation,
|
|
|
|
int role = Qt::DisplayRole) const override;
|
2016-09-09 22:13:21 +02:00
|
|
|
|
|
|
|
const LoaderIMG& getArchive() const {
|
|
|
|
return archive;
|
|
|
|
}
|
2014-02-10 16:34:09 +01:00
|
|
|
};
|
|
|
|
|
2018-08-30 02:19:38 +02:00
|
|
|
#endif
|