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 | 952e9d4 | 2011-04-09 23:37:21 -0400 | [diff] [blame] | 19 | void contentsFromBase64(const QByteArray &base64); |
| 20 | |
| 21 | QImage image() const; |
| 22 | QImage thumb() const; |
| 23 | |
| 24 | private: |
| 25 | QSize m_size; |
José Fonseca | b794df1 | 2011-04-12 08:28:45 +0100 | [diff] [blame] | 26 | int m_numChannels; |
Zack Rusin | 952e9d4 | 2011-04-09 23:37:21 -0400 | [diff] [blame] | 27 | QImage m_image; |
| 28 | QImage m_thumb; |
| 29 | }; |
| 30 | |
| 31 | |
| 32 | class ApiTexture : public ApiSurface |
| 33 | { |
| 34 | public: |
| 35 | ApiTexture(); |
| 36 | |
José Fonseca | 18081d5 | 2011-05-07 00:10:25 +0100 | [diff] [blame^] | 37 | QString label() const; |
| 38 | void setLabel(const QString &str); |
Zack Rusin | 952e9d4 | 2011-04-09 23:37:21 -0400 | [diff] [blame] | 39 | |
| 40 | private: |
José Fonseca | 18081d5 | 2011-05-07 00:10:25 +0100 | [diff] [blame^] | 41 | QString m_label; |
Zack Rusin | 952e9d4 | 2011-04-09 23:37:21 -0400 | [diff] [blame] | 42 | }; |
| 43 | |
Zack Rusin | a684641 | 2011-04-10 19:51:44 -0400 | [diff] [blame] | 44 | class ApiFramebuffer : public ApiSurface |
| 45 | { |
| 46 | public: |
| 47 | ApiFramebuffer(); |
| 48 | |
| 49 | QString type() const; |
| 50 | void setType(const QString &str); |
| 51 | |
| 52 | private: |
| 53 | QString m_type; |
| 54 | |
| 55 | }; |
| 56 | |
Zack Rusin | 952e9d4 | 2011-04-09 23:37:21 -0400 | [diff] [blame] | 57 | #endif |