File indexing completed on 2024-04-28 05:27:06

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 bool DummyDecoratedClient::isOnAllDesktops() const
0030 {
0031     return true;
0032 }
0033 
0034 bool DummyDecoratedClient::isShaded() const
0035 {
0036     return true;
0037 }
0038 
0039 QIcon DummyDecoratedClient::icon() const
0040 {
0041     return {};
0042 }
0043 
0044 bool DummyDecoratedClient::isMaximized() const
0045 {
0046     return m_maximized;
0047 }
0048 
0049 bool DummyDecoratedClient::isMaximizedHorizontally() const
0050 {
0051     return m_maximized;
0052 }
0053 
0054 bool DummyDecoratedClient::isMaximizedVertically() const
0055 {
0056     return m_maximized;
0057 }
0058 
0059 bool DummyDecoratedClient::isKeepAbove() const
0060 {
0061     return true;
0062 }
0063 
0064 bool DummyDecoratedClient::isKeepBelow() const
0065 {
0066     return true;
0067 }
0068 
0069 bool DummyDecoratedClient::isCloseable() const
0070 {
0071     return true;
0072 }
0073 
0074 bool DummyDecoratedClient::isMaximizeable() const
0075 {
0076     return true;
0077 }
0078 
0079 bool DummyDecoratedClient::isMinimizeable() const
0080 {
0081     return true;
0082 }
0083 
0084 bool DummyDecoratedClient::providesContextHelp() const
0085 {
0086     return true;
0087 }
0088 
0089 bool DummyDecoratedClient::isModal() const
0090 {
0091     return true;
0092 }
0093 
0094 bool DummyDecoratedClient::isShadeable() const
0095 {
0096     return true;
0097 }
0098 
0099 bool DummyDecoratedClient::isMoveable() const
0100 {
0101     return true;
0102 }
0103 
0104 bool DummyDecoratedClient::isResizeable() const
0105 {
0106     return true;
0107 }
0108 
0109 WId DummyDecoratedClient::windowId() const
0110 {
0111     return {};
0112 }
0113 
0114 WId DummyDecoratedClient::decorationId() const
0115 {
0116     return {};
0117 }
0118 
0119 int DummyDecoratedClient::width() const
0120 {
0121     return {};
0122 }
0123 
0124 int DummyDecoratedClient::height() const
0125 {
0126     return {};
0127 }
0128 
0129 QSize DummyDecoratedClient::size() const
0130 {
0131     return {};
0132 }
0133 
0134 QPalette DummyDecoratedClient::palette() const
0135 {
0136     return m_pallete.palette();
0137 }
0138 
0139 QColor DummyDecoratedClient::color(ColorGroup group, ColorRole role) const
0140 {
0141     return m_pallete.color(group, role);
0142 }
0143 
0144 Qt::Edges DummyDecoratedClient::adjacentScreenEdges() const
0145 {
0146     return {};
0147 }
0148 
0149 QString DummyDecoratedClient::windowClass() const
0150 {
0151     return {};
0152 }
0153 
0154 void DummyDecoratedClient::requestShowToolTip(const QString &text)
0155 {
0156     Q_UNUSED(text)
0157 }
0158 
0159 void DummyDecoratedClient::requestHideToolTip()
0160 {
0161 }
0162 
0163 void DummyDecoratedClient::requestClose()
0164 {
0165 }
0166 
0167 void DummyDecoratedClient::requestToggleMaximization(Qt::MouseButtons buttons)
0168 {
0169     Q_UNUSED(buttons)
0170     m_maximized = !m_maximized;
0171 }
0172 
0173 void DummyDecoratedClient::requestMinimize()
0174 {
0175 }
0176 
0177 void DummyDecoratedClient::requestContextHelp()
0178 {
0179 }
0180 
0181 void DummyDecoratedClient::requestToggleOnAllDesktops()
0182 {
0183 }
0184 
0185 void DummyDecoratedClient::requestToggleShade()
0186 {
0187 }
0188 
0189 void DummyDecoratedClient::requestToggleKeepAbove()
0190 {
0191 }
0192 
0193 void DummyDecoratedClient::requestToggleKeepBelow()
0194 {
0195 }
0196 
0197 void DummyDecoratedClient::requestShowWindowMenu(const QRect &rect)
0198 {
0199     Q_UNUSED(rect)
0200 }
0201 
0202 void DummyDecoratedClient::setMaximized(bool maximized)
0203 {
0204     m_maximized = maximized;
0205 }
0206 
0207 void DummyDecoratedClient::setActive(bool active)
0208 {
0209     m_active = active;
0210 }
0211 
0212 }
0213 
0214 #include "moc_dummydecoratedclient.cpp"