]> git.cworth.org Git - apitrace/blob - gui/mainwindow.h
Allow filling state for frames and calls.
[apitrace] / gui / mainwindow.h
1 #ifndef MAINWINDOW_H
2 #define MAINWINDOW_H
3
4 #include "ui_mainwindow.h"
5
6 #include <QMainWindow>
7 #include <QProcess>
8
9 class ApiTrace;
10 class ApiTraceEvent;
11 class ApiTraceFilter;
12 class ApiTraceFrame;
13 class ApiTraceModel;
14 class QLineEdit;
15 class QModelIndex;
16 class QProcess;
17 class QProgressBar;
18
19 namespace QJson {
20     class Parser;
21 }
22
23 class MainWindow : public QMainWindow
24 {
25     Q_OBJECT
26 public:
27     MainWindow();
28     ~MainWindow();
29
30 public slots:
31     void loadTrace(const QString &fileName);
32
33 private slots:
34     void callItemSelected(const QModelIndex &index);
35     void openTrace();
36     void filterTrace();
37     void replayStart();
38     void replayStop();
39     void replayFinished();
40     void replayError(QProcess::ProcessError err);
41     void startedLoadingTrace();
42     void finishedLoadingTrace();
43     void lookupState();
44
45 private:
46     void newTraceFile(const QString &fileName);
47     void replayTrace(bool dumpState);
48     void parseState(const QVariantMap &params);
49     void fillStateForFrame();
50
51 private:
52     Ui_MainWindow m_ui;
53     ApiTrace *m_trace;
54     ApiTraceModel *m_model;
55     ApiTraceFilter *m_proxyModel;
56     QLineEdit *m_filterEdit;
57
58     QProcess *m_replayProcess;
59
60     QProgressBar *m_progressBar;
61
62     QString m_traceFileName;
63
64     ApiTraceEvent *m_selectedEvent;
65
66     ApiTraceEvent *m_stateEvent;
67     bool m_findingState;
68
69     QJson::Parser *m_jsonParser;
70 };
71
72
73 #endif