blob: b8e820bc82f16f333aed5639fa0e59e93207f0f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
#include "apisurface.h"
#include <QDebug>
#include <QSysInfo>
ApiSurface::ApiSurface()
{
}
QSize ApiSurface::size() const
{
return m_size;
}
void ApiSurface::setSize(const QSize &size)
{
m_size = size;
}
int ApiSurface::numChannels() const
{
return m_numChannels;
}
void ApiSurface::setNumChannels(int numChannels)
{
m_numChannels = numChannels;
}
void ApiSurface::contentsFromBase64(const QByteArray &base64)
{
QByteArray dataArray = QByteArray::fromBase64(base64);
m_image.loadFromData(dataArray, "png");
m_thumb = m_image.scaled(64, 64, Qt::KeepAspectRatio);
}
QImage ApiSurface::image() const
{
return m_image;
}
QImage ApiSurface::thumb() const
{
return m_thumb;
}
int ApiSurface::depth() const
{
return m_depth;
}
void ApiSurface::setDepth(int depth)
{
m_depth = depth;
}
ApiTexture::ApiTexture()
: ApiSurface()
{
}
QString ApiTexture::label() const
{
return m_label;
}
void ApiTexture::setLabel(const QString &str)
{
m_label = str;
}
ApiFramebuffer::ApiFramebuffer()
: ApiSurface()
{
}
QString ApiFramebuffer::type() const
{
return m_type;
}
void ApiFramebuffer::setType(const QString &str)
{
m_type = str;
}
|