1 #ifndef APITRACEMODEL_H
2 #define APITRACEMODEL_H
5 #include <QAbstractItemModel>
15 class ApiTraceModel : public QAbstractItemModel
20 ApiTraceModel(QObject *parent = 0);
23 QVariant data(const QModelIndex &index, int role) const;
24 Qt::ItemFlags flags(const QModelIndex &index) const;
25 QVariant headerData(int section, Qt::Orientation orientation,
26 int role = Qt::DisplayRole) const;
27 QModelIndex index(int row, int column,
28 const QModelIndex &parent = QModelIndex()) const;
29 bool hasChildren(const QModelIndex &parent) const;
30 QModelIndex parent(const QModelIndex &index) const;
31 int rowCount(const QModelIndex &parent = QModelIndex()) const;
32 int columnCount(const QModelIndex &parent = QModelIndex()) const;
34 bool insertRows(int position, int rows,
35 const QModelIndex &parent = QModelIndex());
36 bool removeRows(int position, int rows,
37 const QModelIndex &parent = QModelIndex());
40 void loadTraceFile(const QString &fileName);
41 void appendCalls(const QList<Trace::Call*> traceCalls);
44 QList<ApiTraceCall*> m_calls;
45 LoaderThread *m_loader;