KWayland

outputchangeset.cpp
1 /*
2  SPDX-FileCopyrightText: 2015 Sebastian K├╝gler <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 
7 #include "outputchangeset.h"
8 #include "outputchangeset_p.h"
9 
10 namespace KWayland
11 {
12 namespace Server
13 {
14 OutputChangeSet::Private::Private(OutputDeviceInterface *outputdevice, OutputChangeSet *parent)
15  : q(parent)
16  , o(outputdevice)
17  , enabled(o->enabled())
18  , modeId(o->currentModeId())
19  , transform(o->transform())
20  , position(o->globalPosition())
21  , scale(o->scaleF())
22  , colorCurves(o->colorCurves())
23 {
24 }
25 
26 OutputChangeSet::Private::~Private() = default;
27 
28 OutputChangeSet::OutputChangeSet(OutputDeviceInterface *outputdevice, QObject *parent)
29  : QObject(parent)
30  , d(new Private(outputdevice, this))
31 {
32 }
33 
34 OutputChangeSet::~OutputChangeSet() = default;
35 
36 OutputChangeSet::Private *OutputChangeSet::d_func() const
37 {
38  return reinterpret_cast<Private *>(d.data());
39 }
40 
42 {
43  Q_D();
44  return d->enabled != d->o->enabled();
45 }
46 
47 OutputDeviceInterface::Enablement OutputChangeSet::enabled() const
48 {
49  Q_D();
50  return d->enabled;
51 }
52 
54 {
55  Q_D();
56  return d->modeId != d->o->currentModeId();
57 }
58 
60 {
61  Q_D();
62  return d->modeId;
63 }
64 
66 {
67  Q_D();
68  return d->transform != d->o->transform();
69 }
70 
71 OutputDeviceInterface::Transform OutputChangeSet::transform() const
72 {
73  Q_D();
74  return d->transform;
75 }
77 {
78  Q_D();
79  return d->position != d->o->globalPosition();
80 }
81 
83 {
84  Q_D();
85  return d->position;
86 }
87 
89 {
90  Q_D();
91  return !qFuzzyCompare(d->scale, d->o->scaleF());
92 }
93 
95 {
96  Q_D();
97  return qRound(d->scale);
98 }
99 
101 {
102  Q_D();
103  return d->scale;
104 }
105 
107 {
108  Q_D();
109  return d->colorCurves != d->o->colorCurves();
110 }
111 
112 OutputDeviceInterface::ColorCurves OutputChangeSet::colorCurves() const
113 {
114  Q_D();
115  return d->colorCurves;
116 }
117 
118 }
119 }
KDOCTOOLS_EXPORT QString transform(const QString &file, const QString &stylesheet, const QVector< const char * > &params=QVector< const char * >())
OutputDeviceInterface::ColorCurves colorCurves() const
The new value for colorCurves.
bool modeChanged() const
Whether the currentModeId() property of the outputdevice changed.
qreal scaleF() const
The new value for scale.
T * data() const const
bool transformChanged() const
Whether the currentModeId() property of the outputdevice changed.
bool scaleChanged() const
Whether the scale() property of the outputdevice changed.
OutputDeviceInterface::Transform transform() const
The new value for transform.
int scale() const
The new value for scale.
int mode() const
The new mode id.
QPoint position() const
The new value for globalPosition.
bool positionChanged() const
Whether the globalPosition() property of the outputdevice changed.
bool colorCurvesChanged() const
Whether the colorCurves() property of the outputdevice changed.
bool enabledChanged() const
Whether the enabled() property of the outputdevice changed.
Q_D(Todo)
OutputDeviceInterface::Enablement enabled() const
The new value for enabled.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Feb 8 2023 03:59:21 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.