blob: 215d1620c9cd04e0f805a825903d818494aad1af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#include <QDebug>
#include <QApplication>
#include <framework-OSInterface.h>
/*
class tester : public QObject{
Q_OBJECT
public slots:
void finished(){ QApplication::exit(0); }
public:
QTimer *timer;
tester(){
timer = new QTimer(this);
timer->setInterval(5000);
timer->setSingleShot(true);
connect(timer, SIGNAL(timeout()), this, SLOT(finished()) );
}
};
*/
int main(int argc, char** argv){
QApplication A(argc,argv);
OSInterface OS;
OS.start();
QTimer *timer = new QTimer();
timer->setInterval(5000);
timer->setSingleShot(true);
QObject::connect(timer, SIGNAL(timeout()), &A, SLOT(quit()) );
timer->start();
int ret = A.exec();
qDebug() << " - Finished";
qDebug() << "Ending Status:";
qDebug() << "OS.networkAvailable:" << OS.networkAvailable();
qDebug() << " - " << OS.networkType() << OS.networkStrength() << OS.networkIcon() << OS.networkHostname() << OS.networkAddress();
return ret;
}
|