Changeset 3625 in ntrip


Ignore:
Timestamp:
Jan 22, 2012, 5:35:15 PM (12 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncpostprocess.cpp

    r3615 r3625  
    4141#include <iostream>
    4242#include "bncpostprocess.h"
     43#include "bncsettings.h"
    4344
    4445using namespace std;
     
    4647//
    4748////////////////////////////////////////////////////////////////////////////
    48 t_irc postProcessing(const t_postInput& input) {
     49t_irc postProcessingInit(t_postInput& input) {
     50  bncSettings settings;
     51  input.obsFileName  = settings.value("postObsFile").toString();
     52  input.navFileName  = settings.value("postNavFile").toString();
     53  input.corrFileName = settings.value("postcorrFile").toString();
     54
     55  return success;
     56}
     57
     58//
     59////////////////////////////////////////////////////////////////////////////
     60t_irc postProcessingRun(const t_postInput& input) {
    4961
    5062  cout << "obsFile: "  << input.obsFileName.toAscii().data()  << endl;
  • trunk/BNC/bncpostprocess.h

    r3615 r3625  
    3636};
    3737
    38 t_irc postProcessing(const t_postInput& input);
     38t_irc postProcessingInit(t_postInput& input);
     39t_irc postProcessingRun(const t_postInput& input);
    3940
    4041#endif
  • trunk/BNC/bncwindow.cpp

    r3624 r3625  
    119119
    120120  _actPostProcessing = new QAction(tr("Start PP"),this);
    121   connect(_actPostProcessing, SIGNAL(triggered()), SLOT(slotPostProcessing()));
     121  connect(_actPostProcessing, SIGNAL(triggered()), SLOT(slotStartPostProcessing()));
    122122
    123123  _postProgressBar = new QProgressBar;
     
    11441144    slotGetData();
    11451145  }
     1146
     1147  // Post-Processing Watcher
     1148  // -----------------------
     1149  _postWatcher = 0;
    11461150}
    11471151
     
    22422246}
    22432247
    2244 // Post-Processing
    2245 ////////////////////////////////////////////////////////////////////////////
    2246 void bncWindow::slotPostProcessing() {
     2248// Start Post-Processing
     2249////////////////////////////////////////////////////////////////////////////
     2250void bncWindow::slotStartPostProcessing() {
     2251
     2252  slotSaveOptions();
     2253
    22472254  _actPostProcessing->setEnabled(false);
    2248   slotSaveOptions();
    22492255  _postProgressBar->reset();
    22502256  _postProgressBar->show();
    22512257  enableWidget(true, _postProgressLabel);
    22522258
    2253   bncSettings settings;
    2254 
    22552259  t_postInput input;
    2256   input.obsFileName  = settings.value("postObsFile").toString();
    2257   input.navFileName  = settings.value("postNavFile").toString();
    2258   input.corrFileName = settings.value("postcorrFile").toString();
    2259 
    2260   QFuture<void> future = QtConcurrent::run(postProcessing, input);
    2261 
     2260  postProcessingInit(input);
     2261
     2262  _postWatcher = new QFutureWatcher<t_irc>;
     2263  connect(_postWatcher, SIGNAL(finished()), this, SLOT(slotFinishedPostProcessing()));
     2264
     2265  _postFuture = QtConcurrent::run(postProcessingRun, input);
     2266  _postWatcher->setFuture(_postFuture);
     2267}
     2268
     2269// Post-Processing Finished
     2270////////////////////////////////////////////////////////////////////////////
     2271void bncWindow::slotFinishedPostProcessing() {
     2272  cout << "slotFinishedPostProcessing" << endl;
     2273  delete _postWatcher;
     2274  _postWatcher = 0;
    22622275  enableWidget(false, _postProgressLabel);
    22632276  _postProgressBar->hide();
  • trunk/BNC/bncwindow.h

    r3620 r3625  
    7676    void slotAddMountPoints();
    7777    void slotGetData();
    78     void slotPostProcessing();
     78    void slotStartPostProcessing();
     79    void slotFinishedPostProcessing();
    7980    void slotStop();
    8081    void slotNewMountPoints(QStringList* mountPoints);
     
    163164    QLabel*        _postProgressLabel;
    164165    QLineEdit*     _postOutLineEdit;
     166    QFutureWatcher<t_irc>* _postWatcher;
     167    QFuture<t_irc>         _postFuture;
    165168
    166169    QCheckBox* _rnxV3CheckBox;
Note: See TracChangeset for help on using the changeset viewer.