blob: 9c7115ec2b4696844157be6ec757585758d82013 [file] [log] [blame]
Zack Rusin952e9d42011-04-09 23:37:21 -04001#ifndef APISURFACE_H
2#define APISURFACE_H
3
4#include <QImage>
5#include <QSize>
6#include <QString>
7
8class ApiSurface
9{
10public:
11 ApiSurface();
12
13 QSize size() const;
14 void setSize(const QSize &size);
15
José Fonsecab794df12011-04-12 08:28:45 +010016 int numChannels() const;
17 void setNumChannels(int numChannels);
18
Zack Rusinb25c4b92011-11-16 22:43:34 -050019 int depth() const;
20 void setDepth(int depth);
21
Zack Rusin952e9d42011-04-09 23:37:21 -040022 void contentsFromBase64(const QByteArray &base64);
23
24 QImage image() const;
25 QImage thumb() const;
26
27private:
28 QSize m_size;
José Fonsecab794df12011-04-12 08:28:45 +010029 int m_numChannels;
Zack Rusin952e9d42011-04-09 23:37:21 -040030 QImage m_image;
31 QImage m_thumb;
Zack Rusinb25c4b92011-11-16 22:43:34 -050032 int m_depth;
Zack Rusin952e9d42011-04-09 23:37:21 -040033};
34
35
36class ApiTexture : public ApiSurface
37{
38public:
39 ApiTexture();
40
José Fonseca18081d52011-05-07 00:10:25 +010041 QString label() const;
42 void setLabel(const QString &str);
Zack Rusin952e9d42011-04-09 23:37:21 -040043
44private:
José Fonseca18081d52011-05-07 00:10:25 +010045 QString m_label;
Zack Rusin952e9d42011-04-09 23:37:21 -040046};
47
Zack Rusina6846412011-04-10 19:51:44 -040048class ApiFramebuffer : public ApiSurface
49{
50public:
51 ApiFramebuffer();
52
53 QString type() const;
54 void setType(const QString &str);
55
56private:
57 QString m_type;
58
59};
60
Zack Rusin952e9d42011-04-09 23:37:21 -040061#endif