Zack Rusin | 952e9d4 | 2011-04-09 23:37:21 -0400 | [diff] [blame] | 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 | |||||
José Fonseca | b794df1 | 2011-04-12 08:28:45 +0100 | [diff] [blame] | 16 | int numChannels() const; |
17 | void setNumChannels(int numChannels); | ||||
18 | |||||
Zack Rusin | b25c4b9 | 2011-11-16 22:43:34 -0500 | [diff] [blame] | 19 | int depth() const; |
20 | void setDepth(int depth); | ||||
21 | |||||
Zack Rusin | e181b99 | 2011-11-17 16:00:41 -0500 | [diff] [blame^] | 22 | QString formatName() const; |
23 | void setFormatName(const QString &str); | ||||
24 | |||||
Zack Rusin | 952e9d4 | 2011-04-09 23:37:21 -0400 | [diff] [blame] | 25 | void contentsFromBase64(const QByteArray &base64); |
26 | |||||
27 | QImage image() const; | ||||
28 | QImage thumb() const; | ||||
29 | |||||
30 | private: | ||||
31 | QSize m_size; | ||||
José Fonseca | b794df1 | 2011-04-12 08:28:45 +0100 | [diff] [blame] | 32 | int m_numChannels; |
Zack Rusin | 952e9d4 | 2011-04-09 23:37:21 -0400 | [diff] [blame] | 33 | QImage m_image; |
34 | QImage m_thumb; | ||||
Zack Rusin | b25c4b9 | 2011-11-16 22:43:34 -0500 | [diff] [blame] | 35 | int m_depth; |
Zack Rusin | e181b99 | 2011-11-17 16:00:41 -0500 | [diff] [blame^] | 36 | QString m_formatName; |
Zack Rusin | 952e9d4 | 2011-04-09 23:37:21 -0400 | [diff] [blame] | 37 | }; |
38 | |||||
39 | |||||
40 | class ApiTexture : public ApiSurface | ||||
41 | { | ||||
42 | public: | ||||
43 | ApiTexture(); | ||||
44 | |||||
José Fonseca | 18081d5 | 2011-05-07 00:10:25 +0100 | [diff] [blame] | 45 | QString label() const; |
46 | void setLabel(const QString &str); | ||||
Zack Rusin | 952e9d4 | 2011-04-09 23:37:21 -0400 | [diff] [blame] | 47 | |
48 | private: | ||||
José Fonseca | 18081d5 | 2011-05-07 00:10:25 +0100 | [diff] [blame] | 49 | QString m_label; |
Zack Rusin | 952e9d4 | 2011-04-09 23:37:21 -0400 | [diff] [blame] | 50 | }; |
51 | |||||
Zack Rusin | a684641 | 2011-04-10 19:51:44 -0400 | [diff] [blame] | 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 | |||||
Zack Rusin | 952e9d4 | 2011-04-09 23:37:21 -0400 | [diff] [blame] | 65 | #endif |