KWaylandServer

outputchangeset_v2.cpp
1 /*
2  SPDX-FileCopyrightText: 2015 Sebastian Kügler <[email protected]>
3  SPDX-FileCopyrightText: 2021 Méven Car <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6 */
7 
8 #include "outputchangeset_v2.h"
9 #include "outputchangeset_v2_p.h"
10 
11 namespace KWaylandServer
12 {
13 
14 OutputChangeSetV2Private::OutputChangeSetV2Private(OutputDeviceV2Interface *outputdevice, OutputChangeSetV2 *parent)
15  : q(parent)
16  , outputDevice(outputdevice)
17  , enabled(outputDevice->enabled())
18  , size(outputDevice->pixelSize())
19  , refreshRate(outputDevice->refreshRate())
20  , transform(outputDevice->transform())
21  , position(outputDevice->globalPosition())
22  , scale(outputDevice->scale())
23  , overscan(outputDevice->overscan())
24 {
25 }
26 
27 OutputChangeSetV2::OutputChangeSetV2(OutputDeviceV2Interface *outputdevice, QObject *parent)
28  : QObject(parent)
29  , d(new OutputChangeSetV2Private(outputdevice, this))
30 {
31 }
32 
33 OutputChangeSetV2::~OutputChangeSetV2() = default;
34 
36 {
37  return d->enabled != d->outputDevice->enabled();
38 }
39 
41 {
42  return d->enabled;
43 }
44 
46 {
47  return d->size;
48 }
49 
51 {
52  return d->size != d->outputDevice->pixelSize();
53 }
54 
56 {
57  return d->refreshRate;
58 }
59 
61 {
62  return d->refreshRate != d->outputDevice->refreshRate();
63 }
64 
66 {
67  return d->transform != d->outputDevice->transform();
68 }
69 
70 OutputDeviceV2Interface::Transform OutputChangeSetV2::transform() const
71 {
72  return d->transform;
73 }
75 {
76  return d->position != d->outputDevice->globalPosition();
77 }
78 
80 {
81  return d->position;
82 }
83 
85 {
86  return !qFuzzyCompare(d->scale, d->outputDevice->scale());
87 }
88 
90 {
91  return d->scale;
92 }
93 
95 {
96  return d->overscan != d->outputDevice->overscan();
97 }
98 
100 {
101  return d->overscan;
102 }
103 
105 {
106  return d->vrrPolicy != d->outputDevice->vrrPolicy();
107 }
108 
109 OutputDeviceV2Interface::VrrPolicy OutputChangeSetV2::vrrPolicy() const
110 {
111  return d->vrrPolicy;
112 }
113 
115 {
116  return d->rgbRange != d->outputDevice->rgbRange();
117 }
118 
119 OutputDeviceV2Interface::RgbRange OutputChangeSetV2::rgbRange() const
120 {
121  return d->rgbRange;
122 }
123 }
bool transformChanged() const
Whether the transform() property of the outputdevice changed.
qreal scale() const
The new value for scale.
bool rgbRangeChanged() const
Whether the rgbRange() property of the outputdevice changed.
bool scaleChanged() const
Whether the scale() property of the outputdevice changed.
OutputDeviceV2Interface::VrrPolicy vrrPolicy() const
The new value for vrrPolicy.
bool vrrPolicyChanged() const
Whether the vrrPolicy() property of the outputdevice changed.
OutputDeviceV2Interface::RgbRange rgbRange() const
The new value for rgbRange.
KDOCTOOLS_EXPORT QString transform(const QString &file, const QString &stylesheet, const QVector< const char * > &params=QVector< const char * >())
bool sizeChanged() const
Whether the size property of the outputdevice changed.
OutputDeviceV2Interface::Transform transform() const
The new value for transform.
int refreshRate() const
The new refresh rate.
bool refreshRateChanged() const
Whether the refreshRate property of the outputdevice changed.
bool enabledChanged() const
Whether the enabled() property of the outputdevice changed.
bool enabled() const
The new value for enabled.
uint32_t overscan() const
the overscan value in %
QPoint position() const
The new value for globalPosition.
QSize size() const
The new size.
bool positionChanged() const
Whether the globalPosition() property of the outputdevice changed.
QObject * parent() const const
bool overscanChanged() const
Whether the overscan() property of the outputdevice changed.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Oct 23 2021 23:08:27 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.