]> git.cworth.org Git - apitrace/blob - gui/apisurface.h
bc403af27409c103deeeb431710a67238f6481f1
[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     int numChannels() const;
17     void setNumChannels(int numChannels);
18
19     int depth() const;
20     void setDepth(int depth);
21
22     QString formatName() const;
23     void setFormatName(const QString &str);
24
25     void contentsFromBase64(const QByteArray &base64);
26
27     QImage image() const;
28     QImage thumb() const;
29
30 private:
31     QSize  m_size;
32     int m_numChannels;
33     QImage m_image;
34     QImage m_thumb;
35     int m_depth;
36     QString m_formatName;
37 };
38
39
40 class ApiTexture : public ApiSurface
41 {
42 public:
43     ApiTexture();
44
45     QString label() const;
46     void setLabel(const QString &str);
47
48 private:
49     QString m_label;
50 };
51
52 class ApiFramebuffer : public ApiSurface
53 {
54 public:
55     ApiFramebuffer();
56
57     QString type() const;
58     void setType(const QString &str);
59
60 private:
61     QString m_type;
62
63 };
64
65 #endif