Zack Rusin | 3acde36 | 2011-04-06 01:11:55 -0400 | [diff] [blame] | 1 | #ifndef RETRACER_H |
| 2 | #define RETRACER_H |
| 3 | |
| 4 | #include <QObject> |
| 5 | #include <QProcess> |
| 6 | |
| 7 | class Retracer : public QObject |
| 8 | { |
| 9 | Q_OBJECT |
| 10 | public: |
| 11 | Retracer(QObject *parent=0); |
| 12 | |
| 13 | QString fileName() const; |
| 14 | void setFileName(const QString &name); |
| 15 | |
| 16 | bool isBenchmarking() const; |
| 17 | void setBenchmarking(bool bench); |
| 18 | |
| 19 | bool isDoubleBuffered() const; |
| 20 | void setDoubleBuffered(bool db); |
| 21 | |
| 22 | void setCaptureAtCallNumber(qlonglong num); |
| 23 | qlonglong captureAtCallNumber() const; |
| 24 | |
| 25 | bool captureState() const; |
| 26 | void setCaptureState(bool enable); |
| 27 | |
| 28 | public slots: |
| 29 | void start(); |
| 30 | void terminate(); |
| 31 | |
| 32 | signals: |
| 33 | void finished(const QByteArray &output); |
| 34 | void error(const QString &msg); |
| 35 | |
| 36 | private slots: |
| 37 | void replayFinished(); |
| 38 | void replayError(QProcess::ProcessError err); |
| 39 | private: |
| 40 | QString m_fileName; |
| 41 | bool m_benchmarking; |
| 42 | bool m_doubleBuffered; |
| 43 | bool m_captureState; |
| 44 | qlonglong m_captureCall; |
| 45 | |
| 46 | QProcess *m_process; |
| 47 | }; |
| 48 | |
| 49 | #endif |