Files
aliendefender/ADeditor/animationmodel.h
blizer 894e55bb41 added morphs, fix some bugs, new images
added onAlienInRadius trigger
but it not work right((
2011-08-21 22:22:02 +04:00

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