blob: 37502e45b79e5d580396c2eb34db1bb4df592ac5 [file] [log] [blame]
Zack Rusin3acde362011-04-06 01:11:55 -04001#ifndef RETRACER_H
2#define RETRACER_H
3
4#include <QObject>
5#include <QProcess>
6
7class Retracer : public QObject
8{
9 Q_OBJECT
10public:
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
28public slots:
29 void start();
30 void terminate();
31
32signals:
33 void finished(const QByteArray &output);
34 void error(const QString &msg);
35
36private slots:
37 void replayFinished();
38 void replayError(QProcess::ProcessError err);
39private:
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