2014-02-10 16:34:09 +01:00
|
|
|
#pragma once
|
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>
|
|
|
|
|
2014-02-10 17:21:30 +01:00
|
|
|
class IMGArchiveModel : public QAbstractListModel
|
2014-02-10 16:34:09 +01:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
LoaderIMG archive;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2014-02-10 17:21:30 +01:00
|
|
|
IMGArchiveModel(const LoaderIMG& archive, QObject* parent = 0)
|
|
|
|
: QAbstractListModel(parent), archive(archive)
|
2014-02-10 16:34:09 +01:00
|
|
|
{}
|
|
|
|
|
|
|
|
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;
|
2014-02-10 18:22:07 +01:00
|
|
|
|
|
|
|
const LoaderIMG& getArchive() const { return archive; }
|
2014-02-10 16:34:09 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|