18a2ee09733d24889bdfbd7fa09e6c49fcc6433b
[yandex-traffic] / connection.cpp
1 #include "connection.hpp"
2
3 static ConnectionChecker *_instance = NULL;
4
5
6 // --------------------------------------------------
7 // ConnectionChecker singleton
8 // --------------------------------------------------
9 ConnectionChecker *ConnectionChecker::instance ()
10 {
11     if (!_instance)
12         _instance = new ConnectionChecker;
13     return _instance;
14 }
15
16
17 ConnectionChecker::ConnectionChecker ()
18 {
19     // start timer which will check connection
20     startTimer (15*1000);
21 }
22
23
24 void ConnectionChecker::timerEvent (QTimerEvent *)
25 {
26     // check for connection
27 }