File indexing completed on 2024-05-12 13:31:12

0001 /*
0002  * SPDX-FileCopyrightText: 2020 Mikhail Zolotukhin <zomial@protonmail.com>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005  */
0006 
0007 #include "dummydecoratedclient.h"
0008 
0009 namespace KDecoration2
0010 {
0011 DummyDecoratedClient::DummyDecoratedClient(DecoratedClient *client, Decoration *decoration)
0012     : DecoratedClientPrivate(client, decoration)
0013     , m_pallete(QStringLiteral("kdeglobals"))
0014     , m_maximized()
0015     , m_active(true)
0016 {
0017 }
0018 
0019 bool DummyDecoratedClient::isActive() const
0020 {
0021     return m_active;
0022 }
0023 
0024 QString DummyDecoratedClient::caption() const
0025 {
0026     return {};
0027 }
0028 
0029 int DummyDecoratedClient::desktop() const
0030 {
0031     return 0;
0032 }
0033 
0034 bool DummyDecoratedClient::isOnAllDesktops() const
0035 {
0036     return true;
0037 }
0038 
0039 bool DummyDecoratedClient::isShaded() const
0040 {
0041     return true;
0042 }
0043 
0044 QIcon DummyDecoratedClient::icon() const
0045 {
0046     return {};
0047 }
0048 
0049 bool DummyDecoratedClient::isMaximized() const
0050 {
0051     return m_maximized;
0052 }
0053 
0054 bool DummyDecoratedClient::isMaximizedHorizontally() const
0055 {
0056     return m_maximized;
0057 }
0058 
0059 bool DummyDecoratedClient::isMaximizedVertically() const
0060 {
0061     return m_maximized;
0062 }
0063 
0064 bool DummyDecoratedClient::isKeepAbove() const
0065 {
0066     return true;
0067 }
0068 
0069 bool DummyDecoratedClient::isKeepBelow() const
0070 {
0071     return true;
0072 }
0073 
0074 bool DummyDecoratedClient::isCloseable() const
0075 {
0076     return true;
0077 }
0078 
0079 bool DummyDecoratedClient::isMaximizeable() const
0080 {
0081     return true;
0082 }
0083 
0084 bool DummyDecoratedClient::isMinimizeable() const
0085 {
0086     return true;
0087 }
0088 
0089 bool DummyDecoratedClient::providesContextHelp() const
0090 {
0091     return true;
0092 }
0093 
0094 bool DummyDecoratedClient::isModal() const
0095 {
0096     return true;
0097 }
0098 
0099 bool DummyDecoratedClient::isShadeable() const
0100 {
0101     return true;
0102 }
0103 
0104 bool DummyDecoratedClient::isMoveable() const
0105 {
0106     return true;
0107 }
0108 
0109 bool DummyDecoratedClient::isResizeable() const
0110 {
0111     return true;
0112 }
0113 
0114 WId DummyDecoratedClient::windowId() const
0115 {
0116     return {};
0117 }
0118 
0119 WId DummyDecoratedClient::decorationId() const
0120 {
0121     return {};
0122 }
0123 
0124 int DummyDecoratedClient::width() const
0125 {
0126     return {};
0127 }
0128 
0129 int DummyDecoratedClient::height() const
0130 {
0131     return {};
0132 }
0133 
0134 QSize DummyDecoratedClient::size() const
0135 {
0136     return {};
0137 }
0138 
0139 QPalette DummyDecoratedClient::palette() const
0140 {
0141     return m_pallete.palette();
0142 }
0143 
0144 QColor DummyDecoratedClient::color(ColorGroup group, ColorRole role) const
0145 {
0146     return m_pallete.color(group, role);
0147 }
0148 
0149 Qt::Edges DummyDecoratedClient::adjacentScreenEdges() const
0150 {
0151     return {};
0152 }
0153 
0154 QString DummyDecoratedClient::windowClass() const
0155 {
0156     return {};
0157 }
0158 
0159 void DummyDecoratedClient::requestShowToolTip(const QString &text)
0160 {
0161     Q_UNUSED(text)
0162 }
0163 
0164 void DummyDecoratedClient::requestHideToolTip()
0165 {
0166 }
0167 
0168 void DummyDecoratedClient::requestClose()
0169 {
0170 }
0171 
0172 void DummyDecoratedClient::requestToggleMaximization(Qt::MouseButtons buttons)
0173 {
0174     Q_UNUSED(buttons)
0175     m_maximized = !m_maximized;
0176 }
0177 
0178 void DummyDecoratedClient::requestMinimize()
0179 {
0180 }
0181 
0182 void DummyDecoratedClient::requestContextHelp()
0183 {
0184 }
0185 
0186 void DummyDecoratedClient::requestToggleOnAllDesktops()
0187 {
0188 }
0189 
0190 void DummyDecoratedClient::requestToggleShade()
0191 {
0192 }
0193 
0194 void DummyDecoratedClient::requestToggleKeepAbove()
0195 {
0196 }
0197 
0198 void DummyDecoratedClient::requestToggleKeepBelow()
0199 {
0200 }
0201 
0202 void DummyDecoratedClient::requestShowWindowMenu(const QRect &rect)
0203 {
0204     Q_UNUSED(rect)
0205 }
0206 
0207 void DummyDecoratedClient::setMaximized(bool maximized)
0208 {
0209     m_maximized = maximized;
0210 }
0211 
0212 void DummyDecoratedClient::setActive(bool active)
0213 {
0214     m_active = active;
0215 }
0216 
0217 }