X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=tests%2Fconn%2Fmainwindow.hpp;h=f0c8f9b9b549a58afeddc05657d86fd4512cdbc3;hb=8f26c04c3530a036a0d32e902b0e95bddfb3ff34;hp=c854ff05665783bd230fc84367c636545801adea;hpb=8c66bcb205f87c715103ef291495a4bcd107bbe0;p=yandex-traffic diff --git a/tests/conn/mainwindow.hpp b/tests/conn/mainwindow.hpp index c854ff0..f0c8f9b 100644 --- a/tests/conn/mainwindow.hpp +++ b/tests/conn/mainwindow.hpp @@ -14,6 +14,7 @@ public: ConnectionChecker *cc = ConnectionChecker::instance (); connect (cc, SIGNAL (connected (bool)), SLOT (connected (bool))); + connect (cc, SIGNAL (type_changed (ConnectionChecker::network_type_t)), SLOT (type_changed (ConnectionChecker::network_type_t))); setText (cc->isConnected () ? "Connected" : "Not connected"); connect (this, SIGNAL (clicked ()), SLOT (checkConnection ())); @@ -29,6 +30,21 @@ protected slots: setText (ConnectionChecker::instance ()->isConnected () ? "Connected" : "Not connected"); } + void type_changed (ConnectionChecker::network_type_t type) + { + switch (type) { + case ConnectionChecker::Net_None: + printf ("Type: none\n"); + break; + case ConnectionChecker::Net_WLAN: + printf ("Type: WLAN\n"); + break; + case ConnectionChecker::Net_GSM: + printf ("Type: GSM\n"); + break; + } + } + void checkConnection () { ConnectionChecker::instance ()->requestState ();