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

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

* empty log message *

File size: 1.3 KB
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
24using namespace std;
25
26// Constructor
27////////////////////////////////////////////////////////////////////////////
28bncApp::bncApp(int argc, char* argv[], bool GUIenabled) :
29 QApplication(argc, argv, GUIenabled) {
30}
31
32// Destructor
33////////////////////////////////////////////////////////////////////////////
34bncApp::~bncApp() {
35}
36
37// Write a Program Message
38////////////////////////////////////////////////////////////////////////////
39void 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.