]> git.cworth.org Git - apitrace/blobdiff - gui/apitracemodel.h
First working on demand loading!
[apitrace] / gui / apitracemodel.h
index 2cdd7d0bfe6fd9e1cfcbd83f25bfe4a018aab262..3abf248e6a5fcaa9e1f816acbd4dd0094ee62df5 100644 (file)
@@ -4,11 +4,13 @@
 
 #include <QAbstractItemModel>
 #include <QModelIndex>
+#include <QSet>
 #include <QVariant>
 
 class ApiTrace;
 class ApiTraceCall;
 class ApiTraceEvent;
+class ApiTraceFrame;
 
 class ApiTraceModel : public QAbstractItemModel
 {
@@ -45,6 +47,8 @@ public:
                     const QModelIndex &parent = QModelIndex());
     bool removeRows(int position, int rows,
                     const QModelIndex &parent = QModelIndex());
+    virtual bool canFetchMore(const QModelIndex & parent) const;
+    virtual void fetchMore(const QModelIndex &parent);
     /* } QAbstractItemModel; */
 
 private slots:
@@ -52,12 +56,14 @@ private slots:
     void beginAddingFrames(int oldCount, int numAdded);
     void endAddingFrames();
     void callChanged(ApiTraceCall *call);
+    void frameChanged(ApiTraceFrame *frame);
 
 private:
     ApiTraceEvent *item(const QModelIndex &index) const;
 
 private:
     ApiTrace *m_trace;
+    QSet<ApiTraceFrame*> m_loadingFrames;
 };
 
 #endif