FunctionalEventFilter.cpp
Go to the documentation of this file.
2 
3 
4 namespace simox::gui
5 {
6 
7  FunctionalEventFilter::FunctionalEventFilter(Function&& function) : function(function)
8  {
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:7
simox::gui::FunctionalEventFilter::eventFilter
bool eventFilter(QObject *obj, QEvent *event) override
Definition: FunctionalEventFilter.cpp:13
simox::gui
Definition: FunctionalEventFilter.cpp:4
simox::gui::FunctionalEventFilter::Function
std::function< bool(QObject *obj, QEvent *event)> Function
Definition: FunctionalEventFilter.h:15