1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-22 18:32:44 +01:00
openrw/rwviewer/models/ObjectListModel.hpp

34 lines
900 B
C++
Raw Normal View History

#ifndef _OBJECTLISTMODEL_HPP_
#define _OBJECTLISTMODEL_HPP_
#include <QAbstractItemModel>
#include <engine/GameData.hpp>
2016-09-09 22:13:21 +02:00
class ObjectListModel : public QAbstractTableModel {
Q_OBJECT
2016-09-09 22:13:21 +02:00
GameData* _gameData;
public:
2016-09-09 22:13:21 +02:00
explicit ObjectListModel(GameData* gameDat, QObject* parent = 0);
2016-09-09 22:13:21 +02:00
GameData* gameData() const {
return _gameData;
}
2018-08-30 02:19:38 +02:00
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
2018-08-30 02:19:38 +02:00
int columnCount(const QModelIndex& parent = QModelIndex()) const override;
2018-08-30 02:19:38 +02:00
QVariant data(const QModelIndex& index,
int role = Qt::DisplayRole) const override;
2018-08-30 02:19:38 +02:00
QVariant headerData(int section, Qt::Orientation orientation,
int role = Qt::DisplayRole) const override;
2018-08-30 02:19:38 +02:00
QModelIndex index(int row, int column, const QModelIndex& parent) const override;
};
2016-09-09 22:13:21 +02:00
#endif // _OBJECTLISTMODEL_HPP_