1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-02 00:42:33 +01:00
openrw/rwviewer/models/IMGArchiveModel.hpp
2018-09-16 00:52:41 +02:00

32 lines
851 B
C++

#ifndef _IMGARCHIVEMODEL_HPP_
#define _IMGARCHIVEMODEL_HPP_
#include <QAbstractItemModel>
#include <loaders/LoaderIMG.hpp>
class IMGArchiveModel : public QAbstractListModel {
Q_OBJECT
LoaderIMG archive;
public:
IMGArchiveModel(const LoaderIMG& archive, QObject* parent = 0)
: QAbstractListModel(parent), archive(archive) {
}
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
int columnCount(const QModelIndex& parent = QModelIndex()) const override;
QVariant data(const QModelIndex& index,
int role = Qt::DisplayRole) const override;
QVariant headerData(int section, Qt::Orientation orientation,
int role = Qt::DisplayRole) const override;
const LoaderIMG& getArchive() const {
return archive;
}
};
#endif