EventFilter.h 466 B

123456789101112131415161718192021222324
  1. //
  2. // Created by Tobias Hieta on 07/03/16.
  3. //
  4. #ifndef PLEXMEDIAPLAYER_EVENTFILTER_H
  5. #define PLEXMEDIAPLAYER_EVENTFILTER_H
  6. #include <QObject>
  7. #include <QEvent>
  8. class EventFilter : public QObject
  9. {
  10. Q_OBJECT
  11. public:
  12. explicit EventFilter(QObject* parent = nullptr) : QObject(parent), m_currentKeyDown(false) {}
  13. protected:
  14. bool eventFilter(QObject* watched, QEvent* event) override;
  15. private:
  16. bool m_currentKeyDown;
  17. };
  18. #endif //PLEXMEDIAPLAYER_EVENTFILTER_H