Connection status checker outline.
[yandex-traffic] / tests / conn / mainwindow.hpp
1 #ifndef __MAINWINDOW_H__
2 #define __MAINWINDOW_H__
3
4 #include <QtGui>
5 #include <connection.hpp>
6
7 class MainWindow : public QWidget
8 {
9     Q_OBJECT
10 public:
11     MainWindow ()
12         : QWidget ()
13     {
14         ConnectionChecker *cc = ConnectionChecker::instance ();
15
16         connect (cc, SIGNAL (connected (bool)), SLOT (connected (bool)));
17     }
18
19 protected slots:
20     void connected (bool active)
21     {
22         if (active)
23             printf ("Device connected\n");
24         else
25             printf ("Device not connected\n");
26     }
27 };
28
29 #endif // __MAINWINDOW_H__