26 lines
732 B
C++
26 lines
732 B
C++
#ifndef ANIMATIONMODEL_H
|
|
#define ANIMATIONMODEL_H
|
|
|
|
#include <QAbstractListModel>
|
|
#include "../loader.h"
|
|
|
|
class AnimationModel : public QAbstractListModel
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit AnimationModel(QHash <int,tbAnimation> &anims, QObject *parent = 0);
|
|
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
|
QVariant data(const QModelIndex &index, int role) const;
|
|
// void refresh(QList <tbAnimation> &anims);
|
|
Qt::ItemFlags flags(const QModelIndex &) const {return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable;}
|
|
bool setData(const QModelIndex &index, const QVariant &value, int role);
|
|
signals:
|
|
|
|
public slots:
|
|
|
|
private:
|
|
QHash <int,tbAnimation> &anims;
|
|
};
|
|
|
|
#endif // ANIMATIONMODEL_H
|