18 #ifndef ALIGNCLIPSMODEL_H
19 #define ALIGNCLIPSMODEL_H
21 #include <QAbstractItemModel>
25 class AlignClipsModel :
public QAbstractItemModel
37 static const int INVALID_OFFSET = std::numeric_limits<int>::max();
39 explicit AlignClipsModel(QObject *parent = 0);
40 virtual ~AlignClipsModel();
42 void addClip(
const QString &name,
int offset,
int speed,
const QString &error);
43 void updateProgress(
int row,
int percent);
44 int getProgress(
int row)
const;
45 void updateOffsetAndSpeed(
int row,
int offset,
double speed,
const QString &error);
46 int getOffset(
int row);
47 double getSpeed(
int row);
51 int rowCount(
const QModelIndex &parent)
const;
52 int columnCount(
const QModelIndex &parent)
const;
53 QVariant data(
const QModelIndex &index,
int role)
const;
54 QVariant headerData(
int section, Qt::Orientation orientation,
int role)
const;
55 QModelIndex index(
int row,
int column = 0,
const QModelIndex &parent = QModelIndex())
const;
56 QModelIndex parent(
const QModelIndex &index)
const;
67 QList<ClipAlignment> m_clips;