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
qwaylandviewport.cpp
Go to the documentation of this file.
1// Copyright (C) 2022 David Edmundson <davidedmundson@kde.org>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
5
7
8namespace QtWaylandClient {
9
10QWaylandViewport::QWaylandViewport(::wp_viewport *viewport)
12{
13}
14
16{
17 destroy();
18}
19
20void QWaylandViewport::setSource(const QRectF &source)
21{
22 set_source(wl_fixed_from_double(source.x()),
23 wl_fixed_from_double(source.y()),
24 wl_fixed_from_double(source.width()),
25 wl_fixed_from_double(source.height()));
26}
27
28void QWaylandViewport::setDestination(const QSize &destination)
29{
30 set_destination(destination.width(), destination.height());
31}
32
33}
34
35QT_END_NAMESPACE
void setDestination(const QSize &destination)
QWaylandViewport(::wp_viewport *viewport)
void setSource(const QRectF &source)
Combined button and popup list for selecting options.