1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-25 20:02:40 +01:00
openrw/rwviewer/models/ObjectListModel.hpp
2016-09-09 21:13:21 +01:00

34 lines
887 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;
}
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;
QModelIndex index(int row, int column, const QModelIndex& parent) const;
};
#endif // _OBJECTLISTMODEL_HPP_