Overte C++ Documentation
ShutdownEventListener.h
1 //
2 // ShutdownEventListener.h
3 // libraries/shared/src
4 //
5 // Created by Ryan Huffman on 09/03/14.
6 // Copyright 2014 High Fidelity, Inc.
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 //
11 
12 #ifndef hifi_ShutdownEventListener_h
13 #define hifi_ShutdownEventListener_h
14 
15 #include <QObject>
16 #include <QAbstractNativeEventFilter>
17 
18 class ShutdownEventListener : public QObject, public QAbstractNativeEventFilter {
19  Q_OBJECT
20 public:
21  static ShutdownEventListener& getInstance();
22 
23  virtual bool nativeEventFilter(const QByteArray& eventType, void* message, long* result) override;
24 private:
25  ShutdownEventListener(QObject* parent = 0);
26 };
27 
28 #endif // hifi_ShutdownEventListener_h