Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
5
7
8namespace QtWaylandClient {
9
10QWaylandFractionalScale::QWaylandFractionalScale(struct ::wp_fractional_scale_v1 *object)
11 : QtWayland::wp_fractional_scale_v1(object)
12{}
13
14
19
21{
22 qreal preferredScale = scale / 120.0; // hardcoded denominator determined in the spec
23 if (preferredScale != mPreferredScale) {
24 mPreferredScale = preferredScale;
26 }
27}
28
29}
30
void wp_fractional_scale_v1_preferred_scale(uint scale) override
QWaylandFractionalScale(struct ::wp_fractional_scale_v1 *object)
Combined button and popup list for selecting options.
GLuint object
[3]
GLenum GLenum GLenum GLenum GLenum scale
#define Q_EMIT
unsigned int uint
Definition qtypes.h:34
double qreal
Definition qtypes.h:187