openrw/rwviewer/IMGArchiveModel.hpp

32 lines
859 B
C++
Raw Normal View History

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