Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qwaylandquicksurface.cpp
Go to the documentation of this file.
1
// Copyright (C) 2017 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
include
<
QSGTexture
>
6
#
include
<
QQuickWindow
>
7
#
include
<
QDebug
>
8
9
#
include
"qwaylandquicksurface.h"
10
#
include
"qwaylandquicksurface_p.h"
11
#
include
"qwaylandquickcompositor.h"
12
#
include
"qwaylandquickitem.h"
13
#
include
<
QtWaylandCompositor
/
qwaylandbufferref
.
h
>
14
#
include
<
QtWaylandCompositor
/
QWaylandView
>
15
#
include
<
QtWaylandCompositor
/
private
/
qwaylandsurface_p
.
h
>
16
17
QT_BEGIN_NAMESPACE
18
19
QWaylandQuickSurface::QWaylandQuickSurface()
20
: QWaylandSurface(*
new
QWaylandQuickSurfacePrivate())
21
{
22
23
}
24
QWaylandQuickSurface::QWaylandQuickSurface(QWaylandCompositor *compositor, QWaylandClient *client, quint32 id,
int
version)
25
: QWaylandSurface(*
new
QWaylandQuickSurfacePrivate())
26
{
27
initialize(compositor, client, id, version);
28
}
29
30
QWaylandQuickSurface::QWaylandQuickSurface(QWaylandQuickSurfacePrivate &dptr)
31
: QWaylandSurface(dptr)
32
{
33
}
34
35
QWaylandQuickSurface::~QWaylandQuickSurface()
36
{
37
38
}
39
40
/*!
41
* \qmlproperty bool QtWayland.Compositor::WaylandSurface::useTextureAlpha
42
* \default true
43
*
44
* This property specifies whether the surface should use texture alpha for blending.
45
*
46
* When \c true, the surface's alpha channel will be used for blending; when
47
* \c false, the surface will be treated as opaque.
48
*/
49
50
/*!
51
* \property QWaylandQuickSurface::useTextureAlpha
52
*
53
* This property holds whether the surface should use texture alpha for
54
* blending.
55
*
56
* When \c true, the surface's alpha channel will be used for blending; when
57
* \c false, the surface will be treated as opaque.
58
*/
59
bool
QWaylandQuickSurface::useTextureAlpha()
const
60
{
61
Q_D(
const
QWaylandQuickSurface);
62
return
d->useTextureAlpha;
63
}
64
65
void
QWaylandQuickSurface::setUseTextureAlpha(
bool
useTextureAlpha)
66
{
67
Q_D(QWaylandQuickSurface);
68
if
(d->useTextureAlpha != useTextureAlpha) {
69
d->useTextureAlpha = useTextureAlpha;
70
emit useTextureAlphaChanged();
71
emit configure(d->bufferRef.hasBuffer());
72
}
73
}
74
75
QT_END_NAMESPACE
76
77
#
include
"moc_qwaylandquicksurface.cpp"
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtwayland
src
compositor
compositor_api
qwaylandquicksurface.cpp
Generated on
for Qt by
1.18.0