Files
KDDockWidgets/src/EventFilterInterface.h
Sergio Martins edb2538220 Port DockRegistry away from Qt event filters
Uses our filter abstraction now
2022-07-02 12:50:52 +01:00

42 lines
859 B
C++

/*
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>
class QMouseEvent;
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;
}
/// @brief OVerride to handle when a view receives a mouse press event
virtual bool onMouseButtonPress(std::shared_ptr<View>, QMouseEvent *)
{
return false;
}
};
}