kwin/autotests/tabbox/mock_tabboxclient.h
Vlad Zahorodnii 68c675d00d Make source code more relocatable
Occasionally, I see complaints about the file organization of kwin,
which is fair enough.

This change makes the source code more relocatable by removing relative
paths from includes.

CMAKE_CURRENT_SOURCE_DIR was added to the interface include directories
of kwin library. This means that as long as you link against kwin target,
the real location of the source code of the library doesn't matter.

With autotests, things are not as convenient as with kwin target. Some
tests use cpp files from kwin core. If we move all source code in a src/
directory, they will need to be adjusted, but mostly only in build
scripts.
2021-02-10 15:31:42 +00:00

63 lines
1.3 KiB
C++

/*
KWin - the KDE window manager
This file is part of the KDE project.
SPDX-FileCopyrightText: 2012 Martin Gräßlin <mgraesslin@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef KWIN_MOCK_TABBOX_CLIENT_H
#define KWIN_MOCK_TABBOX_CLIENT_H
#include "tabbox/tabboxhandler.h"
#include <QIcon>
#include <QUuid>
namespace KWin
{
class MockTabBoxClient : public TabBox::TabBoxClient
{
public:
explicit MockTabBoxClient(QString caption);
bool isMinimized() const override {
return false;
}
QString caption() const override {
return m_caption;
}
void close() override;
int height() const override {
return 100;
}
virtual QPixmap icon(const QSize &size = QSize(32, 32)) const {
return QPixmap(size);
}
bool isCloseable() const override {
return true;
}
bool isFirstInTabBox() const override {
return false;
}
int width() const override {
return 100;
}
int x() const override {
return 0;
}
int y() const override {
return 0;
}
QIcon icon() const override {
return QIcon();
}
QUuid internalId() const override {
return QUuid{};
}
private:
QString m_caption;
};
} // namespace KWin
#endif