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
4#ifndef QWAYLANDFRACTIONALSCALE_P_H
5#define QWAYLANDFRACTIONALSCALE_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtWaylandClient/private/qwayland-fractional-scale-v1.h>
19#include <QtWaylandClient/qtwaylandclientglobal.h>
20
21#include <QObject>
22
23#include <optional>
24
25QT_BEGIN_NAMESPACE
26
27namespace QtWaylandClient {
28
29class QWaylandFractionalScale : public QObject, public QtWayland::wp_fractional_scale_v1
30{
31 Q_OBJECT
32public:
33 explicit QWaylandFractionalScale(struct ::wp_fractional_scale_v1 *object);
34 ~QWaylandFractionalScale();
35
36Q_SIGNALS:
37 void preferredScaleChanged(qreal preferredScale);
38
39protected:
40 void wp_fractional_scale_v1_preferred_scale(uint scale) override;
41
42private:
43 std::optional<qreal> mPreferredScale;
44};
45
46}
47
48QT_END_NAMESPACE
49
50#endif
51

source code of qtwayland/src/client/qwaylandfractionalscale_p.h