Index: /trunk/BNC/bncpostprocess.cpp
===================================================================
--- /trunk/BNC/bncpostprocess.cpp	(revision 3625)
+++ /trunk/BNC/bncpostprocess.cpp	(revision 3626)
@@ -27,5 +27,5 @@
  * -------------------------------------------------------------------------
  *
- * Function:   postProcessing
+ * Class:      t_postProcessing
  *
  * Purpose:    Precise Point Positioning in Post-Processing Mode
@@ -45,23 +45,45 @@
 using namespace std;
 
-// 
+// Constructor
 ////////////////////////////////////////////////////////////////////////////
-t_irc postProcessingInit(t_postInput& input) {
+t_postProcessing::t_postProcessing(QObject* parent) : QThread(parent) {
+
   bncSettings settings;
-  input.obsFileName  = settings.value("postObsFile").toString();
-  input.navFileName  = settings.value("postNavFile").toString();
-  input.corrFileName = settings.value("postcorrFile").toString();
+  _input.obsFileName  = settings.value("postObsFile").toString();
+  _input.navFileName  = settings.value("postNavFile").toString();
+  _input.corrFileName = settings.value("postcorrFile").toString();
 
-  return success;
+  _isToBeDeleted = false;
+}
+
+// Destructor
+////////////////////////////////////////////////////////////////////////////
+t_postProcessing::~t_postProcessing() {
+  if (isRunning()) {
+    wait();
+  }
 }
 
 // 
 ////////////////////////////////////////////////////////////////////////////
-t_irc postProcessingRun(const t_postInput& input) {
+void t_postProcessing::terminate() {
+  _isToBeDeleted = true;
+  if (!isRunning()) {
+    delete this;
+  }
+}
 
-  cout << "obsFile: "  << input.obsFileName.toAscii().data()  << endl;
-  cout << "navFile: "  << input.navFileName.toAscii().data()  << endl;
-  cout << "corrFile: " << input.corrFileName.toAscii().data() << endl;
+//  
+////////////////////////////////////////////////////////////////////////////
+void t_postProcessing::run() {
 
-  return success;
+  cout << "obsFile: "  << _input.obsFileName.toAscii().data()  << endl;
+  cout << "navFile: "  << _input.navFileName.toAscii().data()  << endl;
+  cout << "corrFile: " << _input.corrFileName.toAscii().data() << endl;
+
+  int MAXI = 10;
+  for (int ii = 1; ii < MAXI; ii++) {
+    cout << "ii = " << ii << endl;
+    sleep(1);
+  }
 }
Index: /trunk/BNC/bncpostprocess.h
===================================================================
--- /trunk/BNC/bncpostprocess.h	(revision 3625)
+++ /trunk/BNC/bncpostprocess.h	(revision 3626)
@@ -31,11 +31,29 @@
 class t_postInput {
  public:
-  QString obsFileName;
-  QString navFileName;
-  QString corrFileName;
+  QString    obsFileName;
+  QString    navFileName;
+  QString    corrFileName;
 };
 
-t_irc postProcessingInit(t_postInput& input);
-t_irc postProcessingRun(const t_postInput& input);
+class t_postProcessing : public QThread {
+Q_OBJECT
+ 
+ public:
+  t_postProcessing(QObject* parent);
+
+ protected:
+  ~t_postProcessing();
+
+ signals:
+  void finished();
+   
+ public:
+  void terminate();
+  virtual void run();
+ 
+ private:
+  t_postInput _input;
+  bool        _isToBeDeleted;
+};
 
 #endif
Index: /trunk/BNC/bncwindow.cpp
===================================================================
--- /trunk/BNC/bncwindow.cpp	(revision 3625)
+++ /trunk/BNC/bncwindow.cpp	(revision 3626)
@@ -1144,8 +1144,4 @@
     slotGetData();
   }
-
-  // Post-Processing Watcher
-  // -----------------------
-  _postWatcher = 0;
 }
 
@@ -2250,19 +2246,16 @@
 void bncWindow::slotStartPostProcessing() {
 
+  _actPostProcessing->setEnabled(false);
+
   slotSaveOptions();
 
-  _actPostProcessing->setEnabled(false);
   _postProgressBar->reset();
   _postProgressBar->show();
   enableWidget(true, _postProgressLabel);
 
-  t_postInput input;
-  postProcessingInit(input);
-
-  _postWatcher = new QFutureWatcher<t_irc>;
-  connect(_postWatcher, SIGNAL(finished()), this, SLOT(slotFinishedPostProcessing()));
-
-  _postFuture = QtConcurrent::run(postProcessingRun, input);
-  _postWatcher->setFuture(_postFuture);
+  t_postProcessing* postProcessing = new t_postProcessing(this);
+  connect(postProcessing, SLOT(finished()), this, SIGNAL(slotFinishedPostProcessing));
+
+  postProcessing->start();
 }
 
@@ -2271,8 +2264,15 @@
 void bncWindow::slotFinishedPostProcessing() {
   cout << "slotFinishedPostProcessing" << endl;
-  delete _postWatcher;
-  _postWatcher = 0;
+
   enableWidget(false, _postProgressLabel);
   _postProgressBar->hide();
   _actPostProcessing->setEnabled(true);
 }
+
+// Progress Bar Change
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::postProgress(float progress) {
+  if (_postProgressBar) {
+    _postProgressBar->setValue(int(progress*100.0));
+  }
+}
Index: /trunk/BNC/bncwindow.h
===================================================================
--- /trunk/BNC/bncwindow.h	(revision 3625)
+++ /trunk/BNC/bncwindow.h	(revision 3626)
@@ -62,4 +62,5 @@
     void CreateMenu();
     void AddToolbar();
+    void postProgress(float progress);
 
   public slots:  
@@ -164,6 +165,4 @@
     QLabel*        _postProgressLabel;
     QLineEdit*     _postOutLineEdit;
-    QFutureWatcher<t_irc>* _postWatcher;
-    QFuture<t_irc>         _postFuture;
 
     QCheckBox* _rnxV3CheckBox;
