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
qwaylandfractionalscale.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// Qt-Security score:significant reason:default
4
6
8
9namespace QtWaylandClient {
10
11QWaylandFractionalScale::QWaylandFractionalScale(struct ::wp_fractional_scale_v1 *object)
12 : QtWayland::wp_fractional_scale_v1(object)
13{}
14
15
20
22{
23 qreal preferredScale = scale / 120.0; // hardcoded denominator determined in the spec
24 if (preferredScale != mPreferredScale) {
25 mPreferredScale = preferredScale;
26 Q_EMIT preferredScaleChanged();
27 }
28}
29
30}
31
32QT_END_NAMESPACE
void wp_fractional_scale_v1_preferred_scale(uint scale) override
Combined button and popup list for selecting options.