KWin
Loading...
Searching...
No Matches
outputlayer.cpp
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2022 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include "outputlayer.h"
8
9namespace KWin
10{
11
13 : QObject(parent)
14{
15}
16
17qreal OutputLayer::scale() const
18{
19 return m_scale;
20}
21
22void OutputLayer::setScale(qreal scale)
23{
24 m_scale = scale;
25}
26
27QPointF OutputLayer::hotspot() const
28{
29 return m_hotspot;
30}
31
32void OutputLayer::setHotspot(const QPointF &hotspot)
33{
34 m_hotspot = hotspot;
35}
36
37QSizeF OutputLayer::size() const
38{
39 return m_size;
40}
41
42void OutputLayer::setSize(const QSizeF &size)
43{
44 m_size = size;
45}
46
47std::optional<QSize> OutputLayer::fixedSize() const
48{
49 return std::nullopt;
50}
51
52QRegion OutputLayer::repaints() const
53{
54 return m_repaints;
55}
56
57void OutputLayer::addRepaint(const QRegion &region)
58{
59 m_repaints += region;
60}
61
63{
64 m_repaints = QRegion();
65}
66
68{
69 return !m_repaints.isEmpty();
70}
71
73{
74 return false;
75}
76
77void OutputLayer::setPosition(const QPointF &position)
78{
79 m_position = position;
80}
81
82QPointF OutputLayer::position() const
83{
84 return m_position;
85}
86
87void OutputLayer::setEnabled(bool enable)
88{
89 m_enabled = enable;
90}
91
93{
94 return m_enabled;
95}
96
97} // namespace KWin
98
99#include "moc_outputlayer.cpp"
QRegion repaints() const
QPointF position() const
void addRepaint(const QRegion &region)
void setSize(const QSizeF &size)
void setEnabled(bool enable)
void setScale(qreal scale)
void setPosition(const QPointF &position)
qreal scale() const
virtual std::optional< QSize > fixedSize() const
QSizeF size() const
bool needsRepaint() const
QPointF hotspot() const
OutputLayer(QObject *parent=nullptr)
bool isEnabled() const
virtual bool scanout(SurfaceItem *surfaceItem)
void setHotspot(const QPointF &hotspot)