1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-09-15 15:02:34 +02:00
openrw/rwviewer/models/ObjectListModel.hpp
2018-09-16 00:52:41 +02:00

34 lines
900 B
C++

#ifndef _OBJECTLISTMODEL_HPP_
#define _OBJECTLISTMODEL_HPP_
#include <QAbstractItemModel>
#include <engine/GameData.hpp>
class ObjectListModel : public QAbstractTableModel {
Q_OBJECT
GameData* _gameData;
public:
explicit ObjectListModel(GameData* gameDat, QObject* parent = 0);
GameData* gameData() const {
return _gameData;
}
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;
QModelIndex index(int row, int column, const QModelIndex& parent) const override;
};
#endif // _OBJECTLISTMODEL_HPP_