1 |
torben |
501 |
#include <QApplication> |
2 |
torben |
899 |
#include "mainview.h" |
3 |
torben |
996 |
#include <QtDebug> |
4 |
torben |
501 |
|
5 |
torben |
502 |
|
6 |
torben |
996 |
//TODO: write messages to log file |
7 |
|
|
void myMessageOutput(QtMsgType type, const char *msg) |
8 |
|
|
{ |
9 |
|
|
switch (type) { |
10 |
|
|
case QtDebugMsg: |
11 |
|
|
fprintf(stderr, "Debug: %s\n", msg); |
12 |
|
|
break; |
13 |
|
|
case QtWarningMsg: |
14 |
|
|
fprintf(stderr, "Warning: %s\n", msg); |
15 |
|
|
break; |
16 |
|
|
case QtCriticalMsg: |
17 |
|
|
fprintf(stderr, "Critical: %s\n", msg); |
18 |
|
|
break; |
19 |
|
|
case QtFatalMsg: |
20 |
|
|
fprintf(stderr, "Fatal: %s\n", msg); |
21 |
|
|
abort(); |
22 |
|
|
} |
23 |
|
|
} |
24 |
torben |
502 |
|
25 |
torben |
996 |
|
26 |
|
|
|
27 |
torben |
501 |
int main(int argc, char** argv) { |
28 |
torben |
996 |
|
29 |
|
|
qInstallMsgHandler(myMessageOutput); |
30 |
|
|
qDebug() << "--------------------------------------------------------------------------------------------"; |
31 |
|
|
|
32 |
torben |
501 |
QApplication app(argc,argv); |
33 |
torben |
511 |
app.setApplicationName("infoscreen"); |
34 |
torben |
501 |
|
35 |
torben |
509 |
MainView main(0); |
36 |
|
|
main.show(); |
37 |
torben |
501 |
|
38 |
|
|
return app.exec(); |
39 |
|
|
} |