1 #ifndef APITRACEMODEL_H
2 #define APITRACEMODEL_H
5 #include <QAbstractItemModel>
13 class ApiTraceModel : public QAbstractItemModel
18 EventRole = Qt::UserRole + 1
21 ApiTraceModel(QObject *parent = 0);
24 void setApiTrace(ApiTrace *trace);
25 const ApiTrace *apiTrace() const;
26 void stateSetOnEvent(ApiTraceEvent *event);
29 /* QAbstractItemModel { */
30 QVariant data(const QModelIndex &index, int role) const;
31 Qt::ItemFlags flags(const QModelIndex &index) const;
32 QVariant headerData(int section, Qt::Orientation orientation,
33 int role = Qt::DisplayRole) const;
34 QModelIndex index(int row, int column,
35 const QModelIndex &parent = QModelIndex()) const;
36 bool hasChildren(const QModelIndex &parent) const;
37 QModelIndex parent(const QModelIndex &index) const;
38 int rowCount(const QModelIndex &parent = QModelIndex()) const;
39 int columnCount(const QModelIndex &parent = QModelIndex()) const;
41 bool insertRows(int position, int rows,
42 const QModelIndex &parent = QModelIndex());
43 bool removeRows(int position, int rows,
44 const QModelIndex &parent = QModelIndex());
45 /* } QAbstractItemModel; */
48 void invalidateFrames();
49 void appendFrames(int oldCount, int numAdded);
52 ApiTraceEvent *item(const QModelIndex &index) const;