File indexing completed on 2024-05-05 17:36:13
0001 /* 0002 KWin - the KDE window manager 0003 This file is part of the KDE project. 0004 0005 SPDX-FileCopyrightText: 2012 Martin Gräßlin <mgraesslin@kde.org> 0006 0007 SPDX-License-Identifier: GPL-2.0-or-later 0008 */ 0009 #ifndef KWIN_MOCK_TABBOX_CLIENT_H 0010 #define KWIN_MOCK_TABBOX_CLIENT_H 0011 0012 #include "tabbox/tabboxhandler.h" 0013 0014 #include <QIcon> 0015 #include <QUuid> 0016 0017 namespace KWin 0018 { 0019 class MockTabBoxClient : public TabBox::TabBoxClient 0020 { 0021 public: 0022 explicit MockTabBoxClient(QString caption); 0023 bool isMinimized() const override 0024 { 0025 return false; 0026 } 0027 QString caption() const override 0028 { 0029 return m_caption; 0030 } 0031 void close() override; 0032 int height() const override 0033 { 0034 return 100; 0035 } 0036 virtual QPixmap icon(const QSize &size = QSize(32, 32)) const 0037 { 0038 return QPixmap(size); 0039 } 0040 bool isCloseable() const override 0041 { 0042 return true; 0043 } 0044 bool isFirstInTabBox() const override 0045 { 0046 return false; 0047 } 0048 int width() const override 0049 { 0050 return 100; 0051 } 0052 int x() const override 0053 { 0054 return 0; 0055 } 0056 int y() const override 0057 { 0058 return 0; 0059 } 0060 QIcon icon() const override 0061 { 0062 return QIcon(); 0063 } 0064 0065 QUuid internalId() const override 0066 { 0067 return QUuid{}; 0068 } 0069 0070 private: 0071 QString m_caption; 0072 }; 0073 } // namespace KWin 0074 #endif