source: ntrip/trunk/BNC/bncapp.cpp@ 87

Last change on this file since 87 was 82, checked in by mervart, 18 years ago

* empty log message *

File size: 1.3 KB
Line 
1
2/* -------------------------------------------------------------------------
3 * Bernese 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 <iostream>
19
20#include "bncapp.h"
21
22using namespace std;
23
24// Constructor
25////////////////////////////////////////////////////////////////////////////
26bncApp::bncApp(int argc, char* argv[], bool GUIenabled) :
27 QApplication(argc, argv, GUIenabled) {
28}
29
30// Destructor
31////////////////////////////////////////////////////////////////////////////
32bncApp::~bncApp() {
33}
34
35// Write a Program Message
36////////////////////////////////////////////////////////////////////////////
37void bncApp::slotMessage(const QByteArray msg) {
38#ifndef WIN32
39 cerr << msg.data() << endl;
40#else
41 static bool first = true;
42 static QFile logFile("BNC.LOG");
43 static QTextStream logStream;
44 if (first) {
45 first = false;
46 logFile.open(QIODevice::WriteOnly);
47 logStream.setDevice(&logFile);
48 }
49 logStream << msg.data() << endl;
50 logStream.flush();
51#endif
52}
Note: See TracBrowser for help on using the repository browser.