mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-07 03:12:36 +01:00
32 lines
859 B
C++
32 lines
859 B
C++
#pragma once
|
|
#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) {
|
|
}
|
|
|
|
virtual int rowCount(const QModelIndex& parent = QModelIndex()) const;
|
|
|
|
virtual int columnCount(const QModelIndex& parent = QModelIndex()) const;
|
|
|
|
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;
|
|
}
|
|
};
|
|
|
|
#endif |