Changeset View
Changeset View
Standalone View
Standalone View
kded/kwin_bridge/dummydecoratedclient.cpp
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * Copyright 2020 Mikhail Zolotukhin <zomial@protonmail.com> | ||||
3 | * | ||||
4 | * This program is free software; you can redistribute it and/or | ||||
5 | * modify it under the terms of the GNU General Public License as | ||||
6 | * published by the Free Software Foundation; either version 2 of | ||||
7 | * the License or (at your option) version 3 or any later version | ||||
8 | * accepted by the membership of KDE e.V. (or its successor approved | ||||
9 | * by the membership of KDE e.V.), which shall act as a proxy | ||||
10 | * defined in Section 14 of version 3 of the license. | ||||
11 | * | ||||
12 | * This program is distributed in the hope that it will be useful, | ||||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
15 | * GNU General Public License for more details. | ||||
16 | * | ||||
17 | * You should have received a copy of the GNU General Public License | ||||
18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
19 | */ | ||||
20 | | ||||
21 | #include "dummydecoratedclient.h" | ||||
22 | | ||||
23 | namespace KDecoration2 { | ||||
24 | | ||||
25 | DummyDecoratedClient::DummyDecoratedClient(DecoratedClient *client, Decoration *decoration) | ||||
26 | : DecoratedClientPrivate(client, decoration) | ||||
27 | , m_pallete(QStringLiteral("kdeglobals")) | ||||
28 | , m_maximized() | ||||
29 | { | ||||
30 | | ||||
31 | } | ||||
32 | | ||||
33 | bool DummyDecoratedClient::isActive() const | ||||
34 | { | ||||
35 | return true; | ||||
36 | } | ||||
37 | | ||||
38 | QString DummyDecoratedClient::caption() const | ||||
39 | { | ||||
40 | return {}; | ||||
41 | } | ||||
42 | | ||||
43 | int DummyDecoratedClient::desktop() const | ||||
44 | { | ||||
45 | return 0; | ||||
46 | } | ||||
47 | | ||||
48 | bool DummyDecoratedClient::isOnAllDesktops() const | ||||
49 | { | ||||
50 | return true; | ||||
51 | } | ||||
52 | | ||||
53 | bool DummyDecoratedClient::isShaded() const | ||||
54 | { | ||||
55 | return true; | ||||
56 | } | ||||
57 | | ||||
58 | QIcon DummyDecoratedClient::icon() const | ||||
59 | { | ||||
60 | return {}; | ||||
61 | } | ||||
62 | | ||||
63 | bool DummyDecoratedClient::isMaximized() const | ||||
64 | { | ||||
65 | return m_maximized; | ||||
66 | } | ||||
67 | | ||||
68 | bool DummyDecoratedClient::isMaximizedHorizontally() const | ||||
69 | { | ||||
70 | return m_maximized; | ||||
71 | } | ||||
72 | | ||||
73 | bool DummyDecoratedClient::isMaximizedVertically() const | ||||
74 | { | ||||
75 | return m_maximized; | ||||
76 | } | ||||
77 | | ||||
78 | bool DummyDecoratedClient::isKeepAbove() const | ||||
79 | { | ||||
80 | return true; | ||||
81 | } | ||||
82 | | ||||
83 | bool DummyDecoratedClient::isKeepBelow() const | ||||
84 | { | ||||
85 | return true; | ||||
86 | } | ||||
87 | | ||||
88 | bool DummyDecoratedClient::isCloseable() const | ||||
89 | { | ||||
90 | return true; | ||||
91 | } | ||||
92 | | ||||
93 | bool DummyDecoratedClient::isMaximizeable() const | ||||
94 | { | ||||
95 | return true; | ||||
96 | } | ||||
97 | | ||||
98 | bool DummyDecoratedClient::isMinimizeable() const | ||||
99 | { | ||||
100 | return true; | ||||
101 | } | ||||
102 | | ||||
103 | bool DummyDecoratedClient::providesContextHelp() const | ||||
104 | { | ||||
105 | return true; | ||||
106 | } | ||||
107 | | ||||
108 | bool DummyDecoratedClient::isModal() const | ||||
109 | { | ||||
110 | return true; | ||||
111 | } | ||||
112 | | ||||
113 | bool DummyDecoratedClient::isShadeable() const | ||||
114 | { | ||||
115 | return true; | ||||
116 | } | ||||
117 | | ||||
118 | bool DummyDecoratedClient::isMoveable() const | ||||
119 | { | ||||
120 | return true; | ||||
121 | } | ||||
122 | | ||||
123 | bool DummyDecoratedClient::isResizeable() const | ||||
124 | { | ||||
125 | return true; | ||||
126 | } | ||||
127 | | ||||
128 | WId DummyDecoratedClient::windowId() const | ||||
129 | { | ||||
130 | return {}; | ||||
131 | } | ||||
132 | | ||||
133 | WId DummyDecoratedClient::decorationId() const | ||||
134 | { | ||||
135 | return {}; | ||||
136 | } | ||||
137 | | ||||
138 | int DummyDecoratedClient::width() const | ||||
139 | { | ||||
140 | return {}; | ||||
141 | } | ||||
142 | | ||||
143 | int DummyDecoratedClient::height() const | ||||
144 | { | ||||
145 | return {}; | ||||
146 | } | ||||
147 | | ||||
148 | QSize DummyDecoratedClient::size() const | ||||
149 | { | ||||
150 | return {}; | ||||
151 | } | ||||
152 | | ||||
153 | QPalette DummyDecoratedClient::palette() const | ||||
154 | { | ||||
155 | return m_pallete.palette(); | ||||
156 | } | ||||
157 | | ||||
158 | QColor DummyDecoratedClient::color(ColorGroup group, ColorRole role) const | ||||
159 | { | ||||
160 | return m_pallete.color(group, role); | ||||
161 | } | ||||
162 | | ||||
163 | Qt::Edges DummyDecoratedClient::adjacentScreenEdges() const | ||||
164 | { | ||||
165 | return {}; | ||||
166 | } | ||||
167 | | ||||
168 | void DummyDecoratedClient::requestShowToolTip(const QString &text) | ||||
169 | { | ||||
170 | Q_UNUSED(text) | ||||
171 | } | ||||
172 | | ||||
173 | void DummyDecoratedClient::requestHideToolTip() | ||||
174 | { | ||||
175 | } | ||||
176 | | ||||
177 | void DummyDecoratedClient::requestClose() | ||||
178 | { | ||||
179 | } | ||||
180 | | ||||
181 | void DummyDecoratedClient::requestToggleMaximization(Qt::MouseButtons buttons) | ||||
182 | { | ||||
183 | Q_UNUSED(buttons) | ||||
184 | m_maximized = !m_maximized; | ||||
185 | } | ||||
186 | | ||||
187 | void DummyDecoratedClient::requestMinimize() | ||||
188 | { | ||||
189 | } | ||||
190 | | ||||
191 | void DummyDecoratedClient::requestContextHelp() | ||||
192 | { | ||||
193 | } | ||||
194 | | ||||
195 | void DummyDecoratedClient::requestToggleOnAllDesktops() | ||||
196 | { | ||||
197 | } | ||||
198 | | ||||
199 | void DummyDecoratedClient::requestToggleShade() | ||||
200 | { | ||||
201 | } | ||||
202 | | ||||
203 | void DummyDecoratedClient::requestToggleKeepAbove() | ||||
204 | { | ||||
205 | } | ||||
206 | | ||||
207 | void DummyDecoratedClient::requestToggleKeepBelow() | ||||
208 | { | ||||
209 | } | ||||
210 | | ||||
211 | void DummyDecoratedClient::requestShowWindowMenu() | ||||
212 | { | ||||
213 | } | ||||
214 | | ||||
215 | void DummyDecoratedClient::setMaximized(bool maximized) | ||||
216 | { | ||||
217 | m_maximized = maximized; | ||||
218 | } | ||||
219 | | ||||
220 | } |