]> git.cworth.org Git - apitrace/blob - gui/retracer.h
qapitrace: Support executing glretrace on a remote target host.
[apitrace] / gui / retracer.h
1 #ifndef RETRACER_H
2 #define RETRACER_H
3
4 #include "trace_api.hpp"
5 #include "apitracecall.h"
6
7 #include <QThread>
8 #include <QProcess>
9
10 class ApiTraceState;
11
12 namespace trace { struct Profile; }
13
14 class Retracer : public QThread
15 {
16     Q_OBJECT
17 public:
18     Retracer(QObject *parent=0);
19
20     QString fileName() const;
21     void setFileName(const QString &name);
22
23     QString remoteTarget() const;
24     void setRemoteTarget(const QString &host);
25
26     void setAPI(trace::API api);
27
28     bool isBenchmarking() const;
29     void setBenchmarking(bool bench);
30
31     bool isDoubleBuffered() const;
32     void setDoubleBuffered(bool db);
33
34     bool isProfilingGpu() const;
35     bool isProfilingCpu() const;
36     bool isProfilingPixels() const;
37     bool isProfiling() const;
38     void setProfiling(bool gpu, bool cpu, bool pixels);
39
40     void setCaptureAtCallNumber(qlonglong num);
41     qlonglong captureAtCallNumber() const;
42
43     bool captureState() const;
44     void setCaptureState(bool enable);
45
46     bool captureThumbnails() const;
47     void setCaptureThumbnails(bool enable);
48
49 signals:
50     void finished(const QString &output);
51     void foundState(ApiTraceState *state);
52     void foundProfile(trace::Profile *profile);
53     void foundThumbnails(const QList<QImage> &thumbnails);
54     void error(const QString &msg);
55     void retraceErrors(const QList<ApiTraceError> &errors);
56
57 protected:
58     virtual void run();
59
60 private:
61     QString m_fileName;
62     QString m_remoteTarget;
63     trace::API m_api;
64     bool m_benchmarking;
65     bool m_doubleBuffered;
66     bool m_captureState;
67     bool m_captureThumbnails;
68     qlonglong m_captureCall;
69     bool m_profileGpu;
70     bool m_profileCpu;
71     bool m_profilePixels;
72 };
73
74 #endif