ATLAS Offline Software
Loading...
Searching...
No Matches
CloseEventEater.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef VP1_CLOSEEVENTEATER_H
6#define VP1_CLOSEEVENTEATER_H
7
8#include <QObject>
9#include <QEvent>
11
12class CloseEventEater : public QObject {
13 Q_OBJECT
14
15 public:
16 CloseEventEater(VP1Controller* controller): m_controller(controller){}
17 bool eventFilter(QObject *obj, QEvent *event) {
18 if (event->type() == QEvent::Close) {
19 m_controller->toggleDialogState(obj);
20 return true;
21 } else {
22 // standard event processing
23 return QObject::eventFilter(obj, event);
24 }
25 }
26 private:
28 };
29
30#endif
VP1Controller * m_controller
bool eventFilter(QObject *obj, QEvent *event)
CloseEventEater(VP1Controller *controller)