SIEdit/app/abstractsiitemmodel.h

26 lines
467 B
C
Raw Normal View History

2022-07-03 23:45:57 -04:00
#ifndef ABSTRACTSIITEMMODEL_H
#define ABSTRACTSIITEMMODEL_H
#include <chunk.h>
#include <QAbstractItemModel>
class AbstractSIItemModel : public QAbstractItemModel
{
Q_OBJECT
public:
explicit AbstractSIItemModel(QObject *parent = nullptr);
void SetChunk(si::Chunk *c);
protected:
si::Chunk *GetChunkFromIndex(const QModelIndex &index) const;
si::Chunk *root() const { return chunk_; }
private:
si::Chunk *chunk_;
};
#endif // ABSTRACTSIITEMMODEL_H