Index: trunk/BNC/src/bncwindow.cpp
===================================================================
--- trunk/BNC/src/bncwindow.cpp	(revision 11022)
+++ trunk/BNC/src/bncwindow.cpp	(revision 11066)
@@ -298,4 +298,17 @@
   }
   _corrPortLineEdit = new QLineEdit(settings.value("corrPort").toString());
+  _ssrQcFileLineEdit = new QLineEdit(settings.value("ssrQcFile").toString());
+  _ssrQcIntrComboBox = new QComboBox();
+  _ssrQcIntrComboBox->setEditable(false);
+  _ssrQcIntrComboBox->addItems(QString("5 min,15 min,30 min,1 hour,1 day").split(","));
+  bi = _ssrQcIntrComboBox->findText(settings.value("ssrQcIntr").toString());
+  if (bi != -1) {
+    _ssrQcIntrComboBox->setCurrentIndex(bi);
+  }
+  else {
+    _ssrQcIntrComboBox->setCurrentIndex(_ssrQcIntrComboBox->findText("1 hour"));
+  }
+  connect(_ssrQcFileLineEdit, SIGNAL(textChanged(const QString&)),
+          this, SLOT(slotBncTextChanged()));
 
   connect(_corrPathLineEdit, SIGNAL(textChanged(const QString&)),
@@ -894,4 +907,5 @@
   _corrIntrComboBox->setMaximumWidth(9 * ww);
   _corrPortLineEdit->setMaximumWidth(9 * ww);
+  _ssrQcIntrComboBox->setMaximumWidth(9 * ww);
 
   cLayout->addWidget(new QLabel("Saving Broadcast Ephemeris correction files and correction output through IP port.<br>"), 0, 0, 1, 70);
@@ -902,5 +916,9 @@
   cLayout->addWidget(new QLabel("Port"), 3, 0);
   cLayout->addWidget(_corrPortLineEdit, 3, 1);
-  cLayout->addWidget(new QLabel(""), 4, 1);
+  cLayout->addWidget(new QLabel("QC Logfile"), 4, 0);
+  cLayout->addWidget(_ssrQcFileLineEdit, 4, 1, 1, 30);
+  cLayout->addWidget(new QLabel("QC Interval"), 5, 0);
+  cLayout->addWidget(_ssrQcIntrComboBox, 5, 1);
+  cLayout->addWidget(new QLabel(""), 6, 1);
   cLayout->setRowStretch(7, 999);
   cgroup->setLayout(cLayout);
@@ -1570,4 +1588,6 @@
   _corrPathLineEdit->setWhatsThis(tr("<p>Specify a directory for saving Broadcast Ephemeris Correction files.</p><p>If the specified directory does not exist, BNC will not create the files. <i>[key: corrPath]</i></p>"));
   _corrIntrComboBox->setWhatsThis(tr("<p>Select the length of Broadcast Ephemeris Correction files. <i>[key: corrIntr]</i></p>"));
+  _ssrQcFileLineEdit->setWhatsThis(tr("<p>Specify the full path to a logfile for the quality control of all decoded Broadcast Correction streams: epochs, update intervals, gaps, latency, completeness, IODs, code biases of the reference signals, clock jumps and orbit correction size.</p><p>Default is an empty option field, meaning that no SSR QC is done. <i>[key: ssrQcFile]</i></p>"));
+  _ssrQcIntrComboBox->setWhatsThis(tr("<p>Select the interval of the SSR QC reports. <i>[key: ssrQcIntr]</i></p>"));
   _corrPortLineEdit->setWhatsThis(tr("<p>BNC can produce Broadcast Ephemeris Corrections on your local host through an IP port.</p><p>Specify a port number here to activate this function. <i>[key: corrPort]</i></p>"));
 
@@ -1843,4 +1863,6 @@
   delete _corrPathLineEdit;
   delete _corrIntrComboBox;
+  delete _ssrQcFileLineEdit;
+  delete _ssrQcIntrComboBox;
   delete _corrPortLineEdit;
   delete _outPortLineEdit;
@@ -2369,4 +2391,6 @@
   settings.setValue("corrPath", _corrPathLineEdit->text());
   settings.setValue("corrIntr", _corrIntrComboBox->currentText());
+  settings.setValue("ssrQcFile", _ssrQcFileLineEdit->text());
+  settings.setValue("ssrQcIntr", _ssrQcIntrComboBox->currentText());
   settings.setValue("corrPort", _corrPortLineEdit->text());
   // Feed Engine
@@ -2538,4 +2562,5 @@
   BNC_CORE->setPortCorr(_corrPortLineEdit->text().toInt());
   BNC_CORE->initCombination();
+  BNC_CORE->initSsrQc();
 
   connect(_caster, SIGNAL(getThreadsFinished()), this, SLOT(slotGetThreadsFinished()));
@@ -2607,4 +2632,5 @@
     BNC_CORE->stopPPP();
     BNC_CORE->stopCombination();
+    BNC_CORE->stopSsrQc();
     delete _caster;    _caster = 0; BNC_CORE->setCaster(0);
     delete _casterEph; _casterEph = 0;
@@ -2900,4 +2926,7 @@
     enable = !_corrPathLineEdit->text().isEmpty() || !_corrPortLineEdit->text().isEmpty();
     enableWidget(enable, _corrIntrComboBox);
+  }
+  if (sender() == 0 || sender() == _ssrQcFileLineEdit) {
+    enableWidget(!_ssrQcFileLineEdit->text().isEmpty(), _ssrQcIntrComboBox);
   }
 
