Add EventFilterInterface and port DockRegistry to it
Some classes wont have any Qt in it, so they need another way to install global event filters. Added API to Platform.h for this purpose. Implemented as regular event filter in Platform_qt.
This commit is contained in:
33
src/EventFilterInterface.h
Normal file
33
src/EventFilterInterface.h
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
Author: Sérgio Martins <sergio.martins@kdab.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace KDDockWidgets {
|
||||
|
||||
class Window;
|
||||
class View;
|
||||
|
||||
class EventFilterInterface
|
||||
{
|
||||
public:
|
||||
virtual ~EventFilterInterface();
|
||||
|
||||
/// @brief Override to handle expose events for a certain window
|
||||
virtual bool onExposeEvent(std::shared_ptr<Window>)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user