1840ae8f32b326a38a02614e1f2374ef17353703
[yandex-traffic] / connection.hpp
1 #ifndef __CONNECTION_H__
2 #define __CONNECTION_H__
3
4 #include <QtCore>
5
6
7 // Singleton, which periodically checks for connection state and notifies when it changed.
8 class ConnectionChecker : public QObject
9 {
10     Q_OBJECT
11
12 private:
13     ConnectionChecker ();
14
15 protected:
16     void timerEvent (QTimerEvent *event);
17
18 public:
19     static ConnectionChecker *instance ();
20
21 signals:
22     void connected (bool active);
23 };
24
25 #endif // __CONNECTION_H__