Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qssgrendertexturedata.cpp
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
5
7
8QSSGRenderTextureData::QSSGRenderTextureData()
9 : QSSGRenderTextureData(QSSGRenderGraphObject::Type::TextureData)
10{
11
12}
13
14QSSGRenderTextureData::QSSGRenderTextureData(QSSGRenderGraphObject::Type type)
15 : QSSGRenderGraphObject(type, FlagT(Flags::HasGraphicsResources))
16{
17
18}
19
20QSSGRenderTextureData::~QSSGRenderTextureData()
21{
22
23}
24
25const QByteArray &QSSGRenderTextureData::textureData() const
26{
27 return m_textureData;
28}
29
30void QSSGRenderTextureData::setTextureData(const QByteArray &data)
31{
32 m_textureData = data;
33 // Bump the version number
34 ++m_textureDataVersion;
35}
36
37void QSSGRenderTextureData::setSize(const QSize &size)
38{
39 if (m_size == size)
40 return;
41 m_size = size;
42}
43
44void QSSGRenderTextureData::setDepth(int depth)
45{
46 if (m_depth == depth)
47 return;
48 m_depth = depth;
49}
50
51void QSSGRenderTextureData::setFormat(QSSGRenderTextureFormat format)
52{
53 if (m_format == format)
54 return;
55
56 m_format = format;
57}
58
59void QSSGRenderTextureData::setHasTransparency(bool hasTransparency)
60{
61 if (m_hasTransparency == hasTransparency)
62 return;
63
64 m_hasTransparency = hasTransparency;
65}
66
67QT_END_NAMESPACE
Combined button and popup list for selecting options.