Add EventFilterInterface::onMouseEvent()

Some event consumers don't want to overload N methods and just
overload one instead
This commit is contained in:
Sergio Martins
2022-07-04 22:06:30 +01:00
parent d75e691795
commit b6460c11f7
5 changed files with 20 additions and 22 deletions

View File

@@ -54,6 +54,14 @@ public:
{
return false;
}
/// @brief Provided for convenience, aggregates all other overloads
/// receives all mouse event types, if you return true here then the specialized counterparts won't be called
/// Example, if true is returned here for a mouse press, then onMouseButtonPress() won't be called
virtual bool onMouseEvent(View *, QMouseEvent *)
{
return false;
}
};
}