Changeset 3695 in ntrip for trunk/BNC/bncpostprocess.cpp


Ignore:
Timestamp:
Feb 12, 2012, 3:53:39 PM (12 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncpostprocess.cpp

    r3689 r3695  
    4848#include "rnxnavfile.h"
    4949#include "corrfile.h"
     50#include "bncsettings.h"
     51#include "bncutils.h"
    5052
    5153using namespace std;
     
    5961  _corrFile   = 0;
    6062  _pppClient  = 0;
     63
     64  bncSettings settings;
     65
     66  QString outFileName = settings.value("postOutFile").toString();
     67  if (outFileName.isEmpty()) {
     68    _outFile   = 0;
     69    _outStream = 0;
     70  }
     71  else {
     72    expandEnvVar(outFileName);
     73    _outFile = new QFile(outFileName);
     74    _outFile->open(QIODevice::WriteOnly | QIODevice::Text);
     75    _outStream = new QTextStream();
     76    _outStream->setDevice(_outFile);
     77  }
    6178}
    6279
     
    6986  delete _corrFile;
    7087  delete _opt;
     88  delete _outStream;
     89  delete _outFile;
    7190}
    7291
     
    7493////////////////////////////////////////////////////////////////////////////
    7594void t_postProcessing::slotMessage(QByteArray msg, bool /* showOnScreen */) {
    76   ((bncApp*) qApp)->slotMessage(msg, false);
     95  if (_outStream) {
     96    *_outStream << msg;
     97    _outStream->flush();
     98  }
     99  else {
     100    ((bncApp*) qApp)->slotMessage(msg, false);
     101  }
    77102}
    78103
Note: See TracChangeset for help on using the changeset viewer.