]> git.cworth.org Git - apitrace/blob - gui/apisurface.h
Read the surface data from json.
[apitrace] / gui / apisurface.h
1 #ifndef APISURFACE_H
2 #define APISURFACE_H
3
4 #include <QImage>
5 #include <QSize>
6 #include <QString>
7
8 class ApiSurface
9 {
10 public:
11     ApiSurface();
12
13     QSize size() const;
14     void setSize(const QSize &size);
15
16     void contentsFromBase64(const QByteArray &base64);
17
18     QImage image() const;
19     QImage thumb() const;
20
21 private:
22     QSize  m_size;
23     QImage m_image;
24     QImage m_thumb;
25 };
26
27
28 class ApiTexture : public ApiSurface
29 {
30 public:
31     ApiTexture();
32
33     int unit() const;
34     void setUnit(int un);
35
36     int level() const;
37     void setLevel(int l);
38
39     QString target() const;
40     void setTarget(const QString &str);
41
42 private:
43     int m_unit;
44     int m_level;
45     QString m_target;
46 };
47
48 #endif