FunctionalEventFilter.cpp
Go to the documentation of this file.
2 
3 #include <qobject.h>
4 
5 namespace simox::gui
6 {
7 
8  FunctionalEventFilter::FunctionalEventFilter(Function&& function) : function(function)
9  {
10  }
11 
12  bool
13  FunctionalEventFilter::eventFilter(QObject* obj, QEvent* event)
14  {
15  return function(obj, event);
16  }
17 
18 } // namespace simox::gui
FunctionalEventFilter.h
simox::gui::FunctionalEventFilter::FunctionalEventFilter
FunctionalEventFilter(Function &&function)
Definition: FunctionalEventFilter.cpp:8
simox::gui::FunctionalEventFilter::eventFilter
bool eventFilter(QObject *obj, QEvent *event) override
Definition: FunctionalEventFilter.cpp:13
simox::gui
Definition: FunctionalEventFilter.cpp:5
simox::gui::FunctionalEventFilter::Function
std::function< bool(QObject *obj, QEvent *event)> Function
Definition: FunctionalEventFilter.h:16