Line | |
---|
1 |
|
---|
2 | /* -------------------------------------------------------------------------
|
---|
3 | * BKG NTRIP Client
|
---|
4 | * -------------------------------------------------------------------------
|
---|
5 | *
|
---|
6 | * Class: bncApp
|
---|
7 | *
|
---|
8 | * Purpose: This class implements the main application
|
---|
9 | *
|
---|
10 | * Author: L. Mervart
|
---|
11 | *
|
---|
12 | * Created: 29-Aug-2006
|
---|
13 | *
|
---|
14 | * Changes:
|
---|
15 | *
|
---|
16 | * -----------------------------------------------------------------------*/
|
---|
17 |
|
---|
18 | #include <QFile>
|
---|
19 | #include <QTextStream>
|
---|
20 | #include <iostream>
|
---|
21 |
|
---|
22 | #include "bncapp.h"
|
---|
23 |
|
---|
24 | using namespace std;
|
---|
25 |
|
---|
26 | // Constructor
|
---|
27 | ////////////////////////////////////////////////////////////////////////////
|
---|
28 | bncApp::bncApp(int argc, char* argv[], bool GUIenabled) :
|
---|
29 | QApplication(argc, argv, GUIenabled) {
|
---|
30 | }
|
---|
31 |
|
---|
32 | // Destructor
|
---|
33 | ////////////////////////////////////////////////////////////////////////////
|
---|
34 | bncApp::~bncApp() {
|
---|
35 | }
|
---|
36 |
|
---|
37 | // Write a Program Message
|
---|
38 | ////////////////////////////////////////////////////////////////////////////
|
---|
39 | void bncApp::slotMessage(const QByteArray msg) {
|
---|
40 | #ifndef WIN32
|
---|
41 | cerr << msg.data() << endl;
|
---|
42 | #else
|
---|
43 | static bool first = true;
|
---|
44 | static QFile logFile("BNC.LOG");
|
---|
45 | static QTextStream logStream;
|
---|
46 | if (first) {
|
---|
47 | first = false;
|
---|
48 | logFile.open(QIODevice::WriteOnly);
|
---|
49 | logStream.setDevice(&logFile);
|
---|
50 | }
|
---|
51 | logStream << msg.data() << endl;
|
---|
52 | logStream.flush();
|
---|
53 | #endif
|
---|
54 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.