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