source: ntrip/trunk/BNC/bncwindow.cpp@ 3134

Last change on this file since 3134 was 3129, checked in by weber, 14 years ago

Wording improved

File size: 109.5 KB
Line 
1// Part of BNC, a utility for retrieving decoding and
2// converting GNSS data streams from NTRIP broadcasters.
3//
4// Copyright (C) 2007
5// German Federal Agency for Cartography and Geodesy (BKG)
6// http://www.bkg.bund.de
7// Czech Technical University Prague, Department of Geodesy
8// http://www.fsv.cvut.cz
9//
10// Email: euref-ip@bkg.bund.de
11//
12// This program is free software; you can redistribute it and/or
13// modify it under the terms of the GNU General Public License
14// as published by the Free Software Foundation, version 2.
15//
16// This program is distributed in the hope that it will be useful,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19// GNU General Public License for more details.
20//
21// You should have received a copy of the GNU General Public License
22// along with this program; if not, write to the Free Software
23// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24
25/* -------------------------------------------------------------------------
26 * BKG NTRIP Client
27 * -------------------------------------------------------------------------
28 *
29 * Class: bncWindow
30 *
31 * Purpose: This class implements the main application window.
32 *
33 * Author: L. Mervart
34 *
35 * Created: 24-Dec-2005
36 *
37 * Changes:
38 *
39 * -----------------------------------------------------------------------*/
40
41#include <iostream>
42
43#include <unistd.h>
44#include "bncwindow.h"
45#include "bncapp.h"
46#include "bncgetthread.h"
47#include "bnctabledlg.h"
48#include "bncipport.h"
49#include "bncudpport.h"
50#include "bncserialport.h"
51#include "bnchlpdlg.h"
52#include "bnchtml.h"
53#include "bnctableitem.h"
54#include "bncsettings.h"
55#include "bncfigure.h"
56#include "bncfigurelate.h"
57#include "bncfigureppp.h"
58#include "bncversion.h"
59
60using namespace std;
61
62// Constructor
63////////////////////////////////////////////////////////////////////////////
64bncWindow::bncWindow() {
65
66 _caster = 0;
67
68 _bncFigure = new bncFigure(this);
69 _bncFigureLate = new bncFigureLate(this);
70 _bncFigurePPP = new bncFigurePPP(this);
71
72 int ww = QFontMetrics(this->font()).width('w');
73
74 static const QStringList labels = QString("account, Streams: resource loader / mountpoint, decoder, lat, long, nmea, ntrip, bytes").split(",");
75
76 setMinimumSize(85*ww, 65*ww);
77
78 setWindowTitle(tr("BKG Ntrip Client (BNC) Version " BNCVERSION));
79
80 connect((bncApp*)qApp, SIGNAL(newMessage(QByteArray,bool)),
81 this, SLOT(slotWindowMessage(QByteArray,bool)));
82
83 // Create Actions
84 // --------------
85 _actHelp = new QAction(tr("&Help Contents"),this);
86 connect(_actHelp, SIGNAL(triggered()), SLOT(slotHelp()));
87
88 _actAbout = new QAction(tr("&About BNC"),this);
89 connect(_actAbout, SIGNAL(triggered()), SLOT(slotAbout()));
90
91 _actFlowchart = new QAction(tr("&Flow Chart"),this);
92 connect(_actFlowchart, SIGNAL(triggered()), SLOT(slotFlowchart()));
93
94 _actFontSel = new QAction(tr("Select &Font"),this);
95 connect(_actFontSel, SIGNAL(triggered()), SLOT(slotFontSel()));
96
97 _actSaveOpt = new QAction(tr("&Save && Reread Configuration"),this);
98 connect(_actSaveOpt, SIGNAL(triggered()), SLOT(slotSaveOptions()));
99
100 _actQuit = new QAction(tr("&Quit"),this);
101 connect(_actQuit, SIGNAL(triggered()), SLOT(close()));
102
103 _actAddMountPoints = new QAction(tr("Add &Stream"),this);
104 connect(_actAddMountPoints, SIGNAL(triggered()), SLOT(slotAddMountPoints()));
105
106 _actDeleteMountPoints = new QAction(tr("&Delete Stream"),this);
107 connect(_actDeleteMountPoints, SIGNAL(triggered()), SLOT(slotDeleteMountPoints()));
108 _actDeleteMountPoints->setEnabled(false);
109
110 _actGetData = new QAction(tr("Sta&rt"),this);
111 connect(_actGetData, SIGNAL(triggered()), SLOT(slotGetData()));
112
113 _actStop = new QAction(tr("Sto&p"),this);
114 connect(_actStop, SIGNAL(triggered()), SLOT(slotStop()));
115 _actStop->setEnabled(false);
116
117 _actwhatsthis= new QAction(tr("Help ?=Shift+F1"),this);
118 connect(_actwhatsthis, SIGNAL(triggered()), SLOT(slotWhatsThis()));
119
120 CreateMenu();
121 AddToolbar();
122
123 bncSettings settings;
124
125 // Proxy Options
126 // -------------
127 _proxyHostLineEdit = new QLineEdit(settings.value("proxyHost").toString());
128 _proxyPortLineEdit = new QLineEdit(settings.value("proxyPort").toString());
129
130 connect(_proxyHostLineEdit, SIGNAL(textChanged(const QString &)),
131 this, SLOT(slotBncTextChanged()));
132
133 // General Options
134 // ---------------
135 _logFileLineEdit = new QLineEdit(settings.value("logFile").toString());
136 _rawOutFileLineEdit = new QLineEdit(settings.value("rawOutFile").toString());
137 _rnxAppendCheckBox = new QCheckBox();
138 _rnxAppendCheckBox->setCheckState(Qt::CheckState(
139 settings.value("rnxAppend").toInt()));
140 _onTheFlyComboBox = new QComboBox();
141 _onTheFlyComboBox->setEditable(false);
142 _onTheFlyComboBox->addItems(QString("1 day,1 hour,1 min").split(","));
143 int ii = _onTheFlyComboBox->findText(settings.value("onTheFlyInterval").toString());
144 if (ii != -1) {
145 _onTheFlyComboBox->setCurrentIndex(ii);
146 }
147 _autoStartCheckBox = new QCheckBox();
148 _autoStartCheckBox->setCheckState(Qt::CheckState(
149 settings.value("autoStart").toInt()));
150
151 // RINEX Observations Options
152 // --------------------------
153 _rnxPathLineEdit = new QLineEdit(settings.value("rnxPath").toString());
154 _rnxIntrComboBox = new QComboBox();
155 _rnxIntrComboBox->setEditable(false);
156 _rnxIntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
157 ii = _rnxIntrComboBox->findText(settings.value("rnxIntr").toString());
158 if (ii != -1) {
159 _rnxIntrComboBox->setCurrentIndex(ii);
160 }
161 _rnxSamplSpinBox = new QSpinBox();
162 _rnxSamplSpinBox->setMinimum(0);
163 _rnxSamplSpinBox->setMaximum(60);
164 _rnxSamplSpinBox->setSingleStep(5);
165 _rnxSamplSpinBox->setValue(settings.value("rnxSampl").toInt());
166 _rnxSamplSpinBox->setSuffix(" sec");
167 _rnxSkelLineEdit = new QLineEdit(settings.value("rnxSkel").toString());
168 _rnxSkelLineEdit->setMaximumWidth(5*ww);
169 _rnxScrpLineEdit = new QLineEdit(settings.value("rnxScript").toString());
170 _rnxV3CheckBox = new QCheckBox();
171 _rnxV3CheckBox->setCheckState(Qt::CheckState(settings.value("rnxV3").toInt()));
172
173 connect(_rnxPathLineEdit, SIGNAL(textChanged(const QString &)),
174 this, SLOT(slotBncTextChanged()));
175
176 // RINEX Ephemeris Options
177 // -----------------------
178 _ephPathLineEdit = new QLineEdit(settings.value("ephPath").toString());
179 _ephIntrComboBox = new QComboBox();
180 _ephIntrComboBox->setEditable(false);
181 _ephIntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
182 int jj = _ephIntrComboBox->findText(settings.value("ephIntr").toString());
183 if (jj != -1) {
184 _ephIntrComboBox->setCurrentIndex(jj);
185 }
186 _outEphPortLineEdit = new QLineEdit(settings.value("outEphPort").toString());
187 _ephV3CheckBox = new QCheckBox();
188 _ephV3CheckBox->setCheckState(Qt::CheckState(settings.value("ephV3").toInt()));
189
190 connect(_outEphPortLineEdit, SIGNAL(textChanged(const QString &)),
191 this, SLOT(slotBncTextChanged()));
192
193 connect(_ephPathLineEdit, SIGNAL(textChanged(const QString &)),
194 this, SLOT(slotBncTextChanged()));
195
196 // Broadcast Corrections Options
197 // -----------------------------
198 _corrPathLineEdit = new QLineEdit(settings.value("corrPath").toString());
199 _corrIntrComboBox = new QComboBox();
200 _corrIntrComboBox->setEditable(false);
201 _corrIntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
202 int mm = _corrIntrComboBox->findText(settings.value("corrIntr").toString());
203 if (mm != -1) {
204 _corrIntrComboBox->setCurrentIndex(mm);
205 }
206 _corrPortLineEdit = new QLineEdit(settings.value("corrPort").toString());
207 _corrTimeSpinBox = new QSpinBox();
208 _corrTimeSpinBox->setMinimum(0);
209 _corrTimeSpinBox->setMaximum(60);
210 _corrTimeSpinBox->setSingleStep(1);
211 _corrTimeSpinBox->setSuffix(" sec");
212 _corrTimeSpinBox->setValue(settings.value("corrTime").toInt());
213
214 connect(_corrPathLineEdit, SIGNAL(textChanged(const QString &)),
215 this, SLOT(slotBncTextChanged()));
216
217 connect(_corrPortLineEdit, SIGNAL(textChanged(const QString &)),
218 this, SLOT(slotBncTextChanged()));
219
220 // Feed Engine Options
221 // -------------------
222 _outPortLineEdit = new QLineEdit(settings.value("outPort").toString());
223 _waitTimeSpinBox = new QSpinBox();
224 _waitTimeSpinBox->setMinimum(1);
225 _waitTimeSpinBox->setMaximum(30);
226 _waitTimeSpinBox->setSingleStep(1);
227 _waitTimeSpinBox->setSuffix(" sec");
228 _waitTimeSpinBox->setValue(settings.value("waitTime").toInt());
229 _binSamplSpinBox = new QSpinBox();
230 _binSamplSpinBox->setMinimum(0);
231 _binSamplSpinBox->setMaximum(60);
232 _binSamplSpinBox->setSingleStep(5);
233 _binSamplSpinBox->setValue(settings.value("binSampl").toInt());
234 _binSamplSpinBox->setSuffix(" sec");
235 _outFileLineEdit = new QLineEdit(settings.value("outFile").toString());
236 _outUPortLineEdit = new QLineEdit(settings.value("outUPort").toString());
237
238 connect(_outPortLineEdit, SIGNAL(textChanged(const QString &)),
239 this, SLOT(slotBncTextChanged()));
240
241 connect(_outFileLineEdit, SIGNAL(textChanged(const QString &)),
242 this, SLOT(slotBncTextChanged()));
243
244 // Serial Output Options
245 // ---------------------
246 _serialMountPointLineEdit = new QLineEdit(settings.value("serialMountPoint").toString());
247 _serialPortNameLineEdit = new QLineEdit(settings.value("serialPortName").toString());
248 _serialBaudRateComboBox = new QComboBox();
249 _serialBaudRateComboBox->addItems(QString("110,300,600,"
250 "1200,2400,4800,9600,19200,38400,57600,115200").split(","));
251 int kk = _serialBaudRateComboBox->findText(settings.value("serialBaudRate").toString());
252 if (kk != -1) {
253 _serialBaudRateComboBox->setCurrentIndex(kk);
254 }
255 _serialFlowControlComboBox = new QComboBox();
256 _serialFlowControlComboBox->addItems(QString("OFF,XONXOFF,HARDWARE").split(","));
257 kk = _serialFlowControlComboBox->findText(settings.value("serialFlowControl").toString());
258 if (kk != -1) {
259 _serialFlowControlComboBox->setCurrentIndex(kk);
260 }
261 _serialDataBitsComboBox = new QComboBox();
262 _serialDataBitsComboBox->addItems(QString("5,6,7,8").split(","));
263 kk = _serialDataBitsComboBox->findText(settings.value("serialDataBits").toString());
264 if (kk != -1) {
265 _serialDataBitsComboBox->setCurrentIndex(kk);
266 }
267 _serialParityComboBox = new QComboBox();
268 _serialParityComboBox->addItems(QString("NONE,ODD,EVEN,SPACE").split(","));
269 kk = _serialParityComboBox->findText(settings.value("serialParity").toString());
270 if (kk != -1) {
271 _serialParityComboBox->setCurrentIndex(kk);
272 }
273 _serialStopBitsComboBox = new QComboBox();
274 _serialStopBitsComboBox->addItems(QString("1,2").split(","));
275 kk = _serialStopBitsComboBox->findText(settings.value("serialStopBits").toString());
276 if (kk != -1) {
277 _serialStopBitsComboBox->setCurrentIndex(kk);
278 }
279 _serialAutoNMEAComboBox = new QComboBox();
280 _serialAutoNMEAComboBox->addItems(QString("Auto,Manual").split(","));
281 kk = _serialAutoNMEAComboBox->findText(settings.value("serialAutoNMEA").toString());
282 if (kk != -1) {
283 _serialAutoNMEAComboBox->setCurrentIndex(kk);
284 }
285 _serialFileNMEALineEdit = new QLineEdit(settings.value("serialFileNMEA").toString());
286 _serialHeightNMEALineEdit = new QLineEdit(settings.value("serialHeightNMEA").toString());
287
288 connect(_serialMountPointLineEdit, SIGNAL(textChanged(const QString &)),
289 this, SLOT(slotBncTextChanged()));
290
291 connect(_serialAutoNMEAComboBox, SIGNAL(currentIndexChanged(const QString &)),
292 this, SLOT(slotBncTextChanged()));
293
294 // Outages Options
295 // ---------------
296 _obsRateComboBox = new QComboBox();
297 _obsRateComboBox->setEditable(false);
298 _obsRateComboBox->addItems(QString(",0.1 Hz,0.2 Hz,0.5 Hz,1 Hz,5 Hz").split(","));
299 kk = _obsRateComboBox->findText(settings.value("obsRate").toString());
300 if (kk != -1) {
301 _obsRateComboBox->setCurrentIndex(kk);
302 }
303 _adviseFailSpinBox = new QSpinBox();
304 _adviseFailSpinBox->setMinimum(0);
305 _adviseFailSpinBox->setMaximum(60);
306 _adviseFailSpinBox->setSingleStep(1);
307 _adviseFailSpinBox->setSuffix(" min");
308 _adviseFailSpinBox->setValue(settings.value("adviseFail").toInt());
309 _adviseRecoSpinBox = new QSpinBox();
310 _adviseRecoSpinBox->setMinimum(0);
311 _adviseRecoSpinBox->setMaximum(60);
312 _adviseRecoSpinBox->setSingleStep(1);
313 _adviseRecoSpinBox->setSuffix(" min");
314 _adviseRecoSpinBox->setValue(settings.value("adviseReco").toInt());
315 _adviseScriptLineEdit = new QLineEdit(settings.value("adviseScript").toString());
316
317 connect(_obsRateComboBox, SIGNAL(currentIndexChanged(const QString &)),
318 this, SLOT(slotBncTextChanged()));
319
320 // Miscellaneous Options
321 // ---------------------
322 _miscMountLineEdit = new QLineEdit(settings.value("miscMount").toString());
323 _perfIntrComboBox = new QComboBox();
324 _perfIntrComboBox->setEditable(false);
325 _perfIntrComboBox->addItems(QString(",2 sec, 10 sec,1 min,5 min,15 min,1 hour,6 hours,1 day").split(","));
326 int ll = _perfIntrComboBox->findText(settings.value("perfIntr").toString());
327 if (ll != -1) {
328 _perfIntrComboBox->setCurrentIndex(ll);
329 }
330 _scanRTCMCheckBox = new QCheckBox();
331 _scanRTCMCheckBox->setCheckState(Qt::CheckState(
332 settings.value("scanRTCM").toInt()));
333
334 connect(_miscMountLineEdit, SIGNAL(textChanged(const QString &)),
335 this, SLOT(slotBncTextChanged()));
336
337 // PPP Options
338 // -----------
339 _pppMountLineEdit = new QLineEdit(settings.value("pppMount").toString());
340 _pppCorrMountLineEdit = new QLineEdit(settings.value("pppCorrMount").toString());
341 _pppNMEALineEdit = new QLineEdit(settings.value("nmeaFile").toString());
342 _pppNMEAPortLineEdit = new QLineEdit(settings.value("nmeaPort").toString());
343 _pppSigCLineEdit = new QLineEdit(settings.value("pppSigmaCode").toString());
344 _pppSigPLineEdit = new QLineEdit(settings.value("pppSigmaPhase").toString());
345 _pppSigCrd0 = new QLineEdit(settings.value("pppSigCrd0").toString());
346 _pppSigCrdP = new QLineEdit(settings.value("pppSigCrdP").toString());
347 _pppSigTrp0 = new QLineEdit(settings.value("pppSigTrp0").toString());
348 _pppSigTrpP = new QLineEdit(settings.value("pppSigTrpP").toString());
349 _pppAverageLineEdit = new QLineEdit(settings.value("pppAverage").toString());
350 _pppQuickStartLineEdit = new QLineEdit(settings.value("pppQuickStart").toString());
351 _pppMaxSolGapLineEdit = new QLineEdit(settings.value("pppMaxSolGap").toString());
352 _pppRefCrdXLineEdit = new QLineEdit(settings.value("pppRefCrdX").toString());
353 _pppRefCrdYLineEdit = new QLineEdit(settings.value("pppRefCrdY").toString());
354 _pppRefCrdZLineEdit = new QLineEdit(settings.value("pppRefCrdZ").toString());
355 _pppSync = new QLineEdit(settings.value("pppSync").toString());
356 _pppAntennaLineEdit = new QLineEdit(settings.value("pppAntenna").toString());
357 _pppAntexLineEdit = new QLineEdit(settings.value("pppAntex").toString());
358
359
360 _pppSPPComboBox = new QComboBox();
361 _pppSPPComboBox->setEditable(false);
362 _pppSPPComboBox->addItems(QString("PPP,SPP").split(","));
363 int ik = _pppSPPComboBox->findText(settings.value("pppSPP").toString());
364 if (ik != -1) {
365 _pppSPPComboBox->setCurrentIndex(ik);
366 }
367 _pppUsePhaseCheckBox = new QCheckBox();
368 _pppUsePhaseCheckBox->setCheckState(Qt::CheckState(
369 settings.value("pppUsePhase").toInt()));
370 _pppEstTropoCheckBox = new QCheckBox();
371 _pppEstTropoCheckBox->setCheckState(Qt::CheckState(
372 settings.value("pppEstTropo").toInt()));
373 _pppGLONASSCheckBox = new QCheckBox();
374 _pppGLONASSCheckBox->setCheckState(Qt::CheckState(
375 settings.value("pppGLONASS").toInt()));
376 _pppGalileoCheckBox = new QCheckBox();
377 _pppGalileoCheckBox->setCheckState(Qt::CheckState(
378 settings.value("pppGalileo").toInt()));
379
380 _pppPlotCoordinates = new QCheckBox();
381 _pppPlotCoordinates->setCheckState(Qt::CheckState(
382 settings.value("pppPlotCoordinates").toInt()));
383
384 _pppApplySatAntCheckBox = new QCheckBox();
385 _pppApplySatAntCheckBox->setCheckState(Qt::CheckState(
386 settings.value("pppApplySatAnt").toInt()));
387
388 connect(_pppMountLineEdit, SIGNAL(textChanged(const QString &)),
389 this, SLOT(slotBncTextChanged()));
390
391 connect(_pppCorrMountLineEdit, SIGNAL(textChanged(const QString &)),
392 this, SLOT(slotBncTextChanged()));
393
394 connect(_pppUsePhaseCheckBox, SIGNAL(stateChanged(int)),
395 this, SLOT(slotBncTextChanged()));
396
397 connect(_pppRefCrdXLineEdit, SIGNAL(textChanged(const QString &)),
398 this, SLOT(slotBncTextChanged()));
399 connect(_pppRefCrdYLineEdit, SIGNAL(textChanged(const QString &)),
400 this, SLOT(slotBncTextChanged()));
401 connect(_pppRefCrdZLineEdit, SIGNAL(textChanged(const QString &)),
402 this, SLOT(slotBncTextChanged()));
403
404 connect(_pppEstTropoCheckBox, SIGNAL(stateChanged(int)),
405 this, SLOT(slotBncTextChanged()));
406
407 connect(_pppSync, SIGNAL(textChanged(const QString &)),
408 this, SLOT(slotBncTextChanged()));
409
410 connect(_pppSPPComboBox, SIGNAL(currentIndexChanged(const QString &)),
411 this, SLOT(slotBncTextChanged()));
412
413 connect(_pppAntexLineEdit, SIGNAL(textChanged(const QString &)),
414 this, SLOT(slotBncTextChanged()));
415
416 connect(_pppQuickStartLineEdit, SIGNAL(textChanged(const QString &)),
417 this, SLOT(slotBncTextChanged()));
418
419 // Streams
420 // -------
421 _mountPointsTable = new QTableWidget(0,8);
422
423 _mountPointsTable->horizontalHeader()->resizeSection(1,34*ww);
424 _mountPointsTable->horizontalHeader()->resizeSection(2,9*ww);
425 _mountPointsTable->horizontalHeader()->resizeSection(3,7*ww);
426 _mountPointsTable->horizontalHeader()->resizeSection(4,7*ww);
427 _mountPointsTable->horizontalHeader()->resizeSection(5,5*ww);
428 _mountPointsTable->horizontalHeader()->resizeSection(6,5*ww);
429 _mountPointsTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
430 _mountPointsTable->horizontalHeader()->setStretchLastSection(true);
431 _mountPointsTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
432 _mountPointsTable->setHorizontalHeaderLabels(labels);
433 _mountPointsTable->setGridStyle(Qt::NoPen);
434 _mountPointsTable->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
435 _mountPointsTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
436 _mountPointsTable->setSelectionBehavior(QAbstractItemView::SelectRows);
437 _mountPointsTable->hideColumn(0);
438 connect(_mountPointsTable, SIGNAL(itemSelectionChanged()),
439 SLOT(slotSelectionChanged()));
440 populateMountPointsTable();
441
442 _log = new QTextBrowser();
443 _log->setReadOnly(true);
444
445 // Combination
446 // -----------
447 _cmbTable = new QTableWidget(0,3);
448 _cmbTable->setHorizontalHeaderLabels(QString("Mountpoint, AC Name, Weight").split(","));
449 _cmbTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
450 _cmbTable->setSelectionBehavior(QAbstractItemView::SelectRows);
451 _cmbTable->setMaximumWidth(30*ww);
452 _cmbTable->horizontalHeader()->resizeSection(0,10*ww);
453 _cmbTable->horizontalHeader()->resizeSection(1,8*ww);
454 _cmbTable->horizontalHeader()->resizeSection(2,8*ww);
455 _cmbTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
456 _cmbTable->horizontalHeader()->setStretchLastSection(true);
457 _cmbTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
458
459 QPushButton* addCmbRowButton = new QPushButton("Add Row");
460 QPushButton* delCmbRowButton = new QPushButton("Delete");
461 _cmbOutHostLineEdit = new QLineEdit(settings.value("cmbOutHost").toString());
462 _cmbOutPortLineEdit = new QLineEdit(settings.value("cmbOutPort").toString());
463 _cmbMountpointLineEdit = new QLineEdit(settings.value("cmbMountpoint").toString());
464 _cmbPasswordLineEdit = new QLineEdit(settings.value("cmbPassword").toString());
465 _cmbOutPathLineEdit = new QLineEdit(settings.value("cmbOutPath").toString());
466 _cmbSP3PathLineEdit = new QLineEdit(settings.value("cmbSP3Path").toString());
467
468 connect(_cmbTable, SIGNAL(itemSelectionChanged()),
469 SLOT(slotBncTextChanged()));
470 connect(_cmbMountpointLineEdit, SIGNAL(textChanged(const QString &)),
471 this, SLOT(slotBncTextChanged()));
472
473 // WhatsThis
474 // ---------
475 _proxyHostLineEdit->setWhatsThis(tr("<p>If you are running BNC within a protected Local Area Network (LAN), you might need to use a proxy server to access the Internet. Enter your proxy server IP and port number in case one is operated in front of BNC. If you do not know the IP and port of your proxy server, check the proxy server settings in your Internet browser or ask your network administrator.</p><p>Note that IP streaming is sometimes not allowed in a LAN. In this case you need to ask your network administrator for an appropriate modification of the local security policy or for the installation of a TCP relay to the NTRIP broadcasters. If these are not possible, you might need to run BNC outside your LAN on a network that has unobstructed connection to the Internet.</p>"));
476 _proxyPortLineEdit->setWhatsThis(tr("<p>Enter your proxy server port number in case a proxy is operated in front of BNC.</p>"));
477 _waitTimeSpinBox->setWhatsThis(tr("<p>When feeding a real-time GNSS network engine waiting for synchronized input epoch by epoch, BNC drops whatever is received later than 'Wait for full epoch' seconds. A value of 3 to 5 seconds is recommended, depending on the latency of the incoming streams and the delay acceptable to your real-time GNSS network engine or products.</p>"));
478 _outFileLineEdit->setWhatsThis(tr("Specify the full path to a file where synchronized observations are saved in plain ASCII format. Beware that the size of this file can rapidly increase depending on the number of incoming streams."));
479 _outPortLineEdit->setWhatsThis(tr("BNC can produce synchronized observations in binary format on your local host through an IP port. Specify a port number here to activate this function."));
480 _outUPortLineEdit->setWhatsThis(tr("BNC can produce unsynchronized observations in binary format on your local host through an IP port. Specify a port number here to activate this function."));
481 _outEphPortLineEdit->setWhatsThis(tr("BNC can produce ephemeris data in RINEX ASCII format on your local host through an IP port. Specify a port number here to activate this function."));
482 _corrPortLineEdit->setWhatsThis(tr("BNC can produce Broadcast Ephemeris Corrections on your local host through an IP port. Specify a port number here to activate this function."));
483 _corrTimeSpinBox->setWhatsThis(tr("<p>Concerning output through IP port, BNC drops Broadcast Ephemeris Corrections received later than 'Wait for full epoch' seconds. A value of 2 to 5 seconds is recommended, depending on the latency of the incoming correction stream(s) and the delay acceptable to your real-time application.</p><p>Specifying a value of '0' means that BNC immediately outputs all incoming Broadcast Epemeris Corrections and does not drop any of them for latency reasons.</p>"));
484 _rnxPathLineEdit->setWhatsThis(tr("Here you specify the path to where the RINEX Observation files will be stored. If the specified directory does not exist, BNC will not create RINEX Observation files."));
485 _ephPathLineEdit->setWhatsThis(tr("Specify the path for saving Broadcast Ephemeris data as RINEX Navigation files. If the specified directory does not exist, BNC will not create RINEX Navigation files."));
486 _corrPathLineEdit->setWhatsThis(tr("Specify a directory for saving Broadcast Ephemeris Correction files. If the specified directory does not exist, BNC will not create the files."));
487 _rnxScrpLineEdit->setWhatsThis(tr("<p>Whenever a RINEX Observation file is saved, you might want to compress, copy or upload it immediately via FTP. BNC allows you to execute a script/batch file to carry out these operations. To do that specify the full path of the script/batch file here. BNC will pass the full RINEX Observation file path to the script as a command line parameter (%1 on Windows systems, $1 onUnix/Linux systems).</p>"));
488 _rnxSkelLineEdit->setWhatsThis(tr("<p>BNC allows using personal skeleton files that contain the header records you would like to include. You can derive a personal RINEX header skeleton file from the information given in an up to date sitelog.</p><p>A file in the RINEX Observations 'Directory' with a 'Skeleton extension' suffix is interpreted by BNC as a personal RINEX header skeleton file for the corresponding stream.</p>"));
489 _rnxAppendCheckBox->setWhatsThis(tr("<p>When BNC is started, new files are created by default and any existing files with the same name will be overwritten. However, users might want to append already existing files following a restart of BNC, a system crash or when BNC crashed. Tick 'Append files' to continue with existing files and keep what has been recorded so far.</p>"));
490 _autoStartCheckBox->setWhatsThis(tr("<p>Tick 'Auto start' for auto-start of BNC at startup time in window mode with preassigned processing options.</p>"));
491 _rawOutFileLineEdit->setWhatsThis(tr("<p>Save all data coming in through various streams in the received order and format in one file.</p>"));
492
493 _onTheFlyComboBox->setWhatsThis(tr("<p>When operating BNC online in 'no window' mode, some configuration parameters can be changed on-the-fly without interrupting the running process. For that BNC rereads parts of its configuration in pre-defined intervals.<p></p>Select '1 min', '1 hour', or '1 day' to force BNC to reread its configuration every full minute, hour, or day and let in between edited configuration options become effective on-the-fly without terminating uninvolved threads.</p><p>Note that when operating BNC in window mode, on-the-fly changeable configuration options become effective immediately through 'Save & Reread Configuration'.</p>"));
494 _rnxIntrComboBox->setWhatsThis(tr("<p>Select the length of the RINEX Observation file.</p>"));
495 _ephIntrComboBox->setWhatsThis(tr("<p>Select the length of the RINEX Navigation file.</p>"));
496 _corrIntrComboBox->setWhatsThis(tr("<p>Select the length of the Broadcast Ephemeris Correction files.</p>"));
497 _rnxSamplSpinBox->setWhatsThis(tr("<p>Select the RINEX Observation sampling interval in seconds. A value of zero '0' tells BNC to store all received epochs into RINEX.</p>"));
498 _binSamplSpinBox->setWhatsThis(tr("<p>Select the synchronized observation sampling interval in seconds. A value of zero '0' tells BNC to send/store all received epochs.</p>"));
499 _obsRateComboBox->setWhatsThis(tr("<p>BNC can collect all returns (success or failure) coming from a decoder within a certain short time span to then decide whether a stream has an outage or its content is corrupted. The procedure needs a rough estimate of the expected 'Observation rate' of the incoming streams. When a continuous problem is detected, BNC can inform its operator about this event through an advisory note.</p>"));
500 _adviseRecoSpinBox->setWhatsThis(tr("<p>Following a stream outage or a longer series of bad observations, an advisory note is generated when valid observations are received again throughout the 'Recovery threshold' time span. A value of about 5min (default) is recommended.</p><p>A value of zero '0' means that for any stream recovery, however short, BNC immediately generates an advisory note.</p>"));
501 _adviseFailSpinBox->setWhatsThis(tr("<p>An advisory note is generated when no (or only corrupted) observations are seen throughout the 'Failure threshold' time span. A value of 15 min (default) is recommended.</p><p>A value of zero '0' means that for any stream failure, however short, BNC immediately generates an advisory note.</p>"));
502 _logFileLineEdit->setWhatsThis(tr("<p>Records of BNC's activities are shown in the 'Log' tab on the bottom of this window. They can be saved into a file when a valid path is specified in the 'Logfile (full path)' field.</p><p>The logfile name will automatically be extended by a string '_YYMMDD' carrying the current date."));
503 _adviseScriptLineEdit->setWhatsThis(tr("<p>Specify the full path to a script or batch file to handle advisory notes generated in the event of corrupted streams or stream outages. The affected mountpoint and one of the comments 'Begin_Outage', 'End_Outage', 'Begin_Corrupted', or 'End_Corrupted' are passed on to the script as command line parameters.</p><p>The script may have the task to send the advisory notes by email to BNC's operator and/or to the affected stream provider. An empty option field (default) or invalid path means that you don't want to use this option.</p>"));
504 _perfIntrComboBox->setWhatsThis(tr("<p>BNC can average latencies per stream over a certain period of GPS time. The resulting mean latencies are recorded in the 'Log' tab at the end of each 'Log latency' interval together with results of a statistical evaluation (approximate number of covered epochs, data gaps).</p><p>Select a 'Log latency' interval or select the empty option field if you do not want BNC to log latencies and statistical information.</p>"));
505 _mountPointsTable->setWhatsThis(tr("<p>Streams selected for retrieval are listed in the 'Streams' section. Clicking on 'Add Stream' button will open a window that allows the user to select data streams from an NTRIP broadcaster according to their mountpoints. To remove a stream from the 'Streams' list, highlight it by clicking on it and hit the 'Delete Stream' button. You can also remove multiple streams by highlighting them using +Shift and +Ctrl.</p><p>BNC automatically allocates one of its internal decoders to a stream based on the stream's 'format' as given in the sourcetable. BNC allows users to change this selection by editing the decoder string. Double click on the 'decoder' field, enter your preferred decoder and then hit Enter. The accepted decoder strings are 'RTCM_2.x', 'RTCM_3.x', and 'RTIGS'.</p><p>In case you need to log the raw data as is, BNC allows users to by-pass its decoders and and directly save the input in daily log files. To do this specify the decoder string as 'ZERO'.</p><p>BNC can also retrieve streams from virtual reference stations (VRS). VRS streams are indicated by a 'yes' in the 'nmea' column. To initiate these streams, the approximate latitude/longitude rover position is sent to the NTRIP broadcaster. The default values can be change according to your requirement. Double click on 'lat' and 'long' fields, enter the values you wish to send and then hit Enter.</p>"));
506 _log->setWhatsThis(tr("Records of BNC's activities are shown in the 'Log' tab. The message log covers the communication status between BNC and the NTRIP broadcaster as well as any problems that occur in the communication link, stream availability, stream delay, stream conversion etc."));
507 _bncFigure->setWhatsThis(tr("The bandwidth consumtion per stream is shown in the 'Throughput' tab in bits per second (bps) or kilo bits per second (kbps)."));
508 _bncFigureLate->setWhatsThis(tr("The individual latency of observations in each incoming stream is shown in the 'Latency' tab. Streams not carrying observations (i.e. those providing only broadcast ephemeris messages) are not considered here. Note that the calculation of correct latencies requires the clock of the host computer to be properly synchronized."));
509 _ephV3CheckBox->setWhatsThis(tr("The default format for output of RINEX Navigation data containing Broadcast Ephemeris is RINEX Version 2.11. Select 'Version 3' if you want to output the ephemeris in RINEX Version 3 format."));
510 _rnxV3CheckBox->setWhatsThis(tr("The default format for RINEX Observation files is RINEX Version 2.11. Select 'Version 3' if you want to save the observations in RINEX Version 3 format."));
511 _miscMountLineEdit->setWhatsThis(tr("<p>Specify a mountpoint to apply any of the options shown below. Enter 'ALL' if you want to apply these options to all configured streams.</p><p>An empty option field (default) means that you don't want BNC to apply any of these options.</p>"));
512 _scanRTCMCheckBox->setWhatsThis(tr("<p>Tick 'Scan RTCM' to log the numbers of incomming message types as well as contained antenna coordinates, antenna heigt, and antenna descriptor.</p>"));
513 _serialMountPointLineEdit->setWhatsThis(tr("<p>Enter a 'Mountpoint' to forward the corresponding stream to a serial connected receiver.</p>"));
514 _serialPortNameLineEdit->setWhatsThis(tr("<p>Enter the serial 'Port name' selected for communication with your serial connected receiver. Valid port names are</p><pre>Windows: COM1, COM2<br>Linux: /dev/ttyS0, /dev/ttyS1<br>FreeBSD: /dev/ttyd0, /dev/ttyd1<br>Digital Unix: /dev/tty01, /dev/tty02<br>HP-UX: /dev/tty1p0, /dev/tty2p0<br>SGI/IRIX: /dev/ttyf1, /dev/ttyf2<br>SunOS/Solaris: /dev/ttya, /dev/ttyb</pre><p>Note that you must plug a serial cable in the port defined here before you start BNC.</p>"));
515 _serialBaudRateComboBox->setWhatsThis(tr("<p>Select a 'Baud rate' for the serial output link.</p><p>Note that your selection must equal the baud rate configured to the serial connected receiver. Note further that using a high baud rate is recommended.</p>"));
516 _serialParityComboBox->setWhatsThis(tr("<p>Select the 'Parity' for the serial output link.</p><p>Note that your selection must equal the parity selection configured to the serial connected receiver. Note further that parity is often set to 'NONE'.</p>"));
517 _serialDataBitsComboBox->setWhatsThis(tr("<p>Select the number of 'Data bits' for the serial output link.</p><p>Note that your selection must equal the number of data bits configured to the serial connected receiver. Note further that often 8 data bits are used.</p>"));
518 _serialStopBitsComboBox->setWhatsThis(tr("<p>Select the number of 'Stop bits' for the serial output link.</p><p>Note that your selection must equal the number of stop bits configured to the serial connected receiver. Note further that often 1 stop bit is used.</p>"));
519 _serialFlowControlComboBox->setWhatsThis(tr("<p>Select a 'Flow control' for the serial output link.</p><p>Note that your selection must equal the flow control configured to the serial connected receiver. Select 'OFF' if you don't know better.</p>"));
520 _serialAutoNMEAComboBox->setWhatsThis(tr("<p>Select 'Auto' to automatically forward NMEA-GGA messages coming from your serial connected receiver to the NTRIP broadcaster and/or save them in a file.</p><p>Select 'Manual' only when handling a VRS stream and your serial connected receiver doesn't generate NMEA-GGA messages.</p>"));
521 _serialFileNMEALineEdit->setWhatsThis(tr("<p>Specify the full path to a file where NMEA messages coming from your serial connected receiver are saved.</p>"));
522 _serialHeightNMEALineEdit->setWhatsThis(tr("<p>Specify an approximate 'Height' above mean sea level in meter for your VRS to simulate an inital NMEA-GGA message.</p><p>The setting of this option is ignored in case of streams coming from physical reference stations.</p>"));
523 _pppMountLineEdit->setWhatsThis(tr("<p>Specify an observations stream by its mountpoint from the 'Streams' list compiled below if you want BNC to estimate coordinates for the affected receiver position through a PPP solution. Example: 'FFMJ1'</p><p>Note that PPP in BNC requires to also pull a stream carrying RTCM Version 3 satellite orbit and clock corrections to Broadcast Ephemeris referring to the satellites' Antenna Phase Centers (APC). Stream CLK11 on NTRIP broadcaster products.igs-ip.net is an example.</p><p>Pulling in addition a third stream carrying Broadcast Ephemeris messages in high repetition rate is suggested if such messages are comeing from the receiver in low repetition rate or don't come at all from there.</p>"));
524 _pppCorrMountLineEdit->setWhatsThis(tr("<p>You must specify an orbit/clock corrections stream by its mountpoint from the 'Streams' list compiled below. Example: 'CLK10'</p>"));
525 _pppSPPComboBox->setWhatsThis(tr("<p>Choose between plain Single Point Positioning (SPP) and Precise Point Positioning (PPP).</p>"));
526 _pppUsePhaseCheckBox->setWhatsThis(tr("<p>By default BNC applies a PPP solution using an ionosphere free P3 linear combination of code observations.</p><p>Tick 'Use phase obs' for an ionosphere free L3 linear combination of phase observations.</p>"));
527 _pppEstTropoCheckBox->setWhatsThis(tr("<p>By default BNC does not introduce troposphere parameters when estimating coordinates.</p><p>Tick 'Estimate tropo' to introduce troposphere parameters when estimating coordinates.</p>"));
528 _pppGLONASSCheckBox->setWhatsThis(tr("<p>By default BNC does not use GLONASS observations in PPP mode.</p><p>Tick 'Use GLONASS' for a combined processing of both, GPS and GLONASS observations in PPP mode.</p>"));
529 _pppGalileoCheckBox->setWhatsThis(tr("<p>By default BNC does not use Galileo observations in PPP mode.</p><p>Tick 'Use Galileo' for a combined processing of both, GPS and Galileo observations in PPP mode.</p>"));
530 _pppPlotCoordinates->setWhatsThis(tr("<p>BNC will plot PPP results in the 'PPP Plot' tab as North (red), East (green) and Up (blue) displacements when this option is selected. Values will be either referred to an XYZ reference coordinate (if specified) or referred to the first estimated coordinate. The sliding PPP time series window will cover the period of the latest 5 minutes.</p><p>Note that a PPP time series makes only sense for a stationary operated receiver."));
531 _pppNMEALineEdit->setWhatsThis(tr("<p>Specify the full path to a file where PPP results are saved as NMEA messages.</p>"));
532 _pppNMEAPortLineEdit->setWhatsThis(tr("<p>Specify an IP port number to output PPP results as NMEA messages through an IP port.</p>"));
533 _pppSigCLineEdit->setWhatsThis(tr("<p>Enter a sigma for your code observations in meters.</p><p>The higher the sigma you enter, the less the contribution of code observations to a PPP solution based on a combination of code and phase data. 5.0 (default) is likely to be an appropriate choice.</p>"));
534 _pppQuickStartLineEdit->setWhatsThis(tr("<p>Enter the lenght of a startup period in seconds for which you want to fix the PPP solution to a known XYZ coordinate as introduced above and adjust a sigma 'XYZ Ini' according to the coordinate's precision. Fixing the coordinate is done in BNC through setting the 'Sigma XYZ Noise' you define below temporarily to zero.</p><p>This so-called Quick-Start option allows the PPP solution to rapidly converge. It requires that the antenna remains unmoved on the know position throughout the startup period.</p><p>A value of 120 is likely to be an appropriate choice for 'Quick-Start'. Default is an empty option field, meaning that you don't want BNC to operate in Quick-Start mode.</p>"));
535 _pppMaxSolGapLineEdit->setWhatsThis(tr("<p>Specify a 'Maximum Solution Gap' in seconds. Should the time span between two consecutive solutions exceed this limit, the algorithm returns into the Quick-Start mode and fixes the introduced reference coordinate for the specified Quick-Start period. A value of '120' seconds could be an appropriate choice.</p><p>This option makes only sense for a stationary operated receiver where solution convergence can be enforced because a good approximation for the rover position is known. Default is an empty option field, meaning that you don't want BNC to return into the Quick-Start mode after failures caused i.e. by longer lasting outages.</p>"));
536 _pppSigPLineEdit->setWhatsThis(tr("<p>Enter a sigma for your phase observations in meters.</p><p>The higher the sigma you enter, the less the contribution of phase observations to a PPP solutions based on a combination of code and phase data. 0.02 (default) is likely to be an appropriate choice.</p>"));
537 _pppAverageLineEdit->setWhatsThis(tr("<p>Enter the length of a sliding time window in minutes. BNC will continuously output moving average positions computed from those individual positions obtained most recently throughout this period.</p><p>An empty option field (default) means that you don't want BNC to output moving average positions.</p>"));
538 _pppSigCrd0->setWhatsThis(tr("<p>Enter a sigma in meters for the initial XYZ coordinate componentes. A value of 100.0 (default) may be an appropriate choice. However, this value may be significantly smaller (i.e. 0.01) when starting for example from a station with known XZY position in Quick-Start mode."));
539 _pppSigCrdP->setWhatsThis(tr("<p>Enter a sigma in meters for the white noise of estimated XYZ coordinate components. A value of 100.0 (default) may be appropriate considering the potential movement of a rover position.</p>"));
540 _pppSigTrp0->setWhatsThis(tr("<p>Enter a sigma in meters for the a-priory model based tropospheric delay estimation. A value of 0.1 (default) may be an appropriate choice.</p>"));
541 _pppSigTrpP->setWhatsThis(tr("<p>Enter a sigma in meters per second to describe the expected variation of the tropospheric effect.</p><p>Supposing 1Hz observation data, a value of 1e-6 (default) would mean that the tropospheric effect may vary for 3600 * 1e-6 = 0.0036 meters per hour.</p>"));
542 _pppRefCrdXLineEdit->setWhatsThis(tr("<p>Enter reference coordinate X of the receiver's position.</p>"));
543 _pppRefCrdYLineEdit->setWhatsThis(tr("<p>Enter reference coordinate Y of the receiver's position.</p>"));
544 _pppRefCrdZLineEdit->setWhatsThis(tr("<p>Enter reference coordinate Z of the receiver's position.</p>"));
545 _bncFigurePPP->setWhatsThis(tr("PPP time series of North (red), East (green) and Up (blue) coordinate components are shown in the 'PPP Plot' tab when the corresponting option is selected above. Values are either referred to an XYZ reference coordinate (if specified) or referred to the first estimated set of coordinate compoments. The sliding PPP time series window covers the period of the latest 5 minutes."));
546 _pppSync->setWhatsThis(tr(
547 "<p> Zero value (or empty field, default) means that BNC processes each epoch of data "
548 "immediately after its arrival using satellite clock corrections available at "
549 "that time.</p><p> Non-zero value 'Sync Corr' (i.e. 5) means that the epochs of data "
550 "are buffered and the processing of each epoch is postponed till the satellite clock "
551 "corrections not older than 'Sync Corr' seconds are available.<p>"));
552 _pppAntexLineEdit->setWhatsThis(tr("<p>IGS provides a file containing absolute phase center corrections for GNSS satellite and receiver antennas in ANTEX format. Entering the full path to such an ANTEX file is required for correcting observations for antenna phase center offsets and variations. It allows you to specify the name of your receiver's antenna (as contained in the ANTEX file) to apply such corrections.</p><p>Default is an empty option field meaning that you don't want to correct observations for antenna phase center offsets and variations.</p>"));
553 _pppAntennaLineEdit->setWhatsThis(tr("<p>Specify the receiver's antenna name as defined in your ANTEX file. Observations will be corrected for the antenna phase center's offset which may result in a reduction of a few centimeters at max. Corrections for phase center variations are not yet applied by BNC. The specified name must consist of 20 characters. Add trailing blanks if the antenna name has less then 20 characters.</p><p>Default is an empty option field meaning that you don't want to correct observations for antenna phase center offsets.</p>"));
554 _pppApplySatAntCheckBox->setWhatsThis(tr("<p>This option is not yet working.</p><p>Satellite orbit and clock corrections refer to the satellite's antenna phase centers and hence observations are actually <u>not</u> to be corrected for satellite antenna phase center offsets. However, you may like to tick 'Apply Offsets' to force BNC to correct observations for satellite antenna phase center offsets.</p><p>Default is to <u>not</u> correct observations for satellite antenna phase center offsets."));
555 _cmbTable->setWhatsThis(tr("<p>Double click on the 'Mountpoint' field to enter a Broadcast Ephemeris corrections mountpoint from the 'Streams' section below and hit Enter. Then double click on the 'AC Name' field to enter your choice of an abbreviation for the Analysis Center (AC) providing the stream. Finally, double click on the 'Weight' field to enter the weight to be applied for this stream in the combination.</p><p>Note that an appropriate 'Wait for full epoch' value needs to be specified for the combination under the 'Broadcast Corrections' tab. A value of 15 seconds would make sense there if the update rate of incoming clock corrections is i.e. 10 seconds.</p><p>Note further that the sequence of rows in the 'Combination Table' is of importance because the orbit information in the final combination stream is just copied from the stream listed in the first row. Hence the first line in the 'Combination Table' defines a kind of 'Master AC'. The update rate of the combination product follows the 'Master AC's update rate.</p><p>Note also that the combination process requires Broadcast Ephemeris. Besides the orbit and clock corrections streams BNC must therefore pull a stream carrying Broadcast Ephemeris in the form of RTCM Version 3 messages.</p>"));
556 addCmbRowButton->setWhatsThis(tr("Hit 'Add Row' button to add another line to the mountpoints table."));
557 delCmbRowButton->setWhatsThis(tr("Hit 'Delete' button to delete the highlighted line from the mountpoints table."));
558 _cmbOutHostLineEdit->setWhatsThis(tr("Specify the domain name or IP number of an Ntrip Broadcaster for uploading the combination stream."));
559 _cmbOutPortLineEdit->setWhatsThis(tr("Enter the listening IP port of the specified Ntrip Broadcaster for uploading the combination stream."));
560 _cmbMountpointLineEdit->setWhatsThis(tr("<p>Enter a mountpoint for the combination stream. If 'Host', 'Port' and 'Password' are set, the combination stream will be uploaded to the specified Ntrip Broadcaster.</p><p>Note that the mountpoint defined here can be introduce as 'Obs Mountpoint' under the 'PPP (1)' tab to carry out a Precise Point Positioning through directly using the combination stream without prior upload to the Ntrip Broadcaster."));
561 _cmbPasswordLineEdit->setWhatsThis(tr("Enter the password for uploading the combination stream to the specified Ntrip Broadcaster."));
562 _cmbOutPathLineEdit->setWhatsThis(tr("<p>Specify a directory for saving the combined Broadcast Ephemeris corrections in a plain ASCII format on disk.</p><p>The length of the Broadcast Ephemeris corrections files is defined through option 'Interval' under the 'Broadcast Corrections' tab.</p>"));
563 _cmbSP3PathLineEdit->setWhatsThis(tr("<p>Specify a directory for saving the combined Broadcast Ephemeris corrections in SP3 format on disk.</p><p>Note that this normally requires to also specify the full path to an 'ANTEX File' under the 'PPP (2)' tab.</p>"));
564
565 // Canvas with Editable Fields
566 // ---------------------------
567 _canvas = new QWidget;
568 setCentralWidget(_canvas);
569
570 _aogroup = new QTabWidget();
571 QWidget* pgroup = new QWidget();
572 QWidget* ggroup = new QWidget();
573 QWidget* sgroup = new QWidget();
574 QWidget* egroup = new QWidget();
575 QWidget* agroup = new QWidget();
576 QWidget* cgroup = new QWidget();
577 QWidget* ogroup = new QWidget();
578 QWidget* rgroup = new QWidget();
579 QWidget* sergroup = new QWidget();
580 QWidget* pppgroup = new QWidget();
581 QWidget* ppp2group = new QWidget();
582 QWidget* cmbgroup = new QWidget();
583 _aogroup->addTab(pgroup,tr("Proxy"));
584 _aogroup->addTab(ggroup,tr("General"));
585 _aogroup->addTab(ogroup,tr("RINEX Observations"));
586 _aogroup->addTab(egroup,tr("RINEX Ephemeris"));
587 _aogroup->addTab(cgroup,tr("Broadcast Corrections"));
588 _aogroup->addTab(sgroup,tr("Feed Engine"));
589 _aogroup->addTab(sergroup,tr("Serial Output"));
590 _aogroup->addTab(agroup,tr("Outages"));
591 _aogroup->addTab(rgroup,tr("Miscellaneous"));
592 _aogroup->addTab(pppgroup,tr("PPP (1)"));
593 _aogroup->addTab(ppp2group,tr("PPP (2)"));
594#ifdef USE_COMBINATION
595 _aogroup->addTab(cmbgroup,tr("Combination"));
596#endif
597
598 // Log Tab
599 // -------
600 _loggroup = new QTabWidget();
601 _loggroup->addTab(_log,tr("Log"));
602 _loggroup->addTab(_bncFigure,tr("Throughput"));
603 _loggroup->addTab(_bncFigureLate,tr("Latency"));
604 _loggroup->addTab(_bncFigurePPP,tr("PPP Plot"));
605
606 // Proxy Tab
607 // ---------
608 QGridLayout* pLayout = new QGridLayout;
609 pLayout->setColumnMinimumWidth(0,13*ww);
610 _proxyPortLineEdit->setMaximumWidth(9*ww);
611
612 pLayout->addWidget(new QLabel("Proxy host"), 0, 0);
613 pLayout->addWidget(_proxyHostLineEdit, 0, 1, 1,10);
614 pLayout->addWidget(new QLabel("Proxy port"), 1, 0);
615 pLayout->addWidget(_proxyPortLineEdit, 1, 1);
616 pLayout->addWidget(new QLabel("Settings for proxy in protected networks, leave boxes blank if none."),2, 0, 1, 50, Qt::AlignLeft);
617 pLayout->addWidget(new QLabel(" "),3,0);
618 pLayout->addWidget(new QLabel(" "),4,0);
619 pLayout->addWidget(new QLabel(" "),5,0);
620 pgroup->setLayout(pLayout);
621
622 // General Tab
623 // -----------
624 QGridLayout* gLayout = new QGridLayout;
625 gLayout->setColumnMinimumWidth(0,14*ww);
626 _onTheFlyComboBox->setMaximumWidth(9*ww);
627
628 gLayout->addWidget(new QLabel("Logfile (full path)"), 0, 0);
629 gLayout->addWidget(_logFileLineEdit, 0, 1, 1,30); // 1
630 gLayout->addWidget(new QLabel("Append files"), 1, 0);
631 gLayout->addWidget(_rnxAppendCheckBox, 1, 1);
632 gLayout->addWidget(new QLabel("Reread configuration"), 2, 0);
633 gLayout->addWidget(_onTheFlyComboBox, 2, 1);
634 gLayout->addWidget(new QLabel("Auto start"), 3, 0);
635 gLayout->addWidget(_autoStartCheckBox, 3, 1);
636 gLayout->addWidget(new QLabel("Raw output file (full path)"), 4, 0);
637 gLayout->addWidget(_rawOutFileLineEdit, 4, 1, 1,30);
638 gLayout->addWidget(new QLabel("General settings for logfile, file handling, configuration on-the-fly, and auto-start."),5, 0, 1, 50, Qt::AlignLeft);
639 ggroup->setLayout(gLayout);
640
641 // RINEX Observations
642 // ------------------
643 QGridLayout* oLayout = new QGridLayout;
644 oLayout->setColumnMinimumWidth(0,14*ww);
645 _rnxIntrComboBox->setMaximumWidth(9*ww);
646 _rnxSamplSpinBox->setMaximumWidth(9*ww);
647
648 oLayout->addWidget(new QLabel("Directory"), 0, 0);
649 oLayout->addWidget(_rnxPathLineEdit, 0, 1,1,24);
650 oLayout->addWidget(new QLabel("Interval"), 1, 0);
651 oLayout->addWidget(_rnxIntrComboBox, 1, 1);
652 oLayout->addWidget(new QLabel(" Sampling"), 1, 2, Qt::AlignRight);
653 oLayout->addWidget(_rnxSamplSpinBox, 1, 3, Qt::AlignLeft);
654 oLayout->addWidget(new QLabel("Skeleton extension"), 2, 0);
655 oLayout->addWidget(_rnxSkelLineEdit, 2, 1,1,1, Qt::AlignLeft);
656 oLayout->addWidget(new QLabel("Script (full path)"), 3, 0);
657 oLayout->addWidget(_rnxScrpLineEdit, 3, 1,1,24);
658 oLayout->addWidget(new QLabel("Version 3"), 4, 0);
659 oLayout->addWidget(_rnxV3CheckBox, 4, 1);
660 oLayout->addWidget(new QLabel("Saving RINEX observation files."),5,0,1,50, Qt::AlignLeft);
661 ogroup->setLayout(oLayout);
662
663 // RINEX Ephemeris
664 // ---------------
665 QGridLayout* eLayout = new QGridLayout;
666 eLayout->setColumnMinimumWidth(0,14*ww);
667 _ephIntrComboBox->setMaximumWidth(9*ww);
668 _outEphPortLineEdit->setMaximumWidth(9*ww);
669
670 eLayout->addWidget(new QLabel("Directory"), 0, 0);
671 eLayout->addWidget(_ephPathLineEdit, 0, 1, 1,30);
672 eLayout->addWidget(new QLabel("Interval"), 1, 0);
673 eLayout->addWidget(_ephIntrComboBox, 1, 1);
674 eLayout->addWidget(new QLabel("Port"), 2, 0);
675 eLayout->addWidget(_outEphPortLineEdit, 2, 1);
676 eLayout->addWidget(new QLabel("Version 3"), 3, 0);
677 eLayout->addWidget(_ephV3CheckBox, 3, 1);
678 eLayout->addWidget(new QLabel("Saving RINEX ephemeris files and ephemeris output through IP port."),4,0,1,50,Qt::AlignLeft);
679 eLayout->addWidget(new QLabel(" "),5,0);
680 egroup->setLayout(eLayout);
681
682
683 // Broadcast Corrections
684 // ---------------------
685 QGridLayout* cLayout = new QGridLayout;
686 cLayout->setColumnMinimumWidth(0,14*ww);
687 _corrIntrComboBox->setMaximumWidth(9*ww);
688 _corrPortLineEdit->setMaximumWidth(9*ww);
689 _corrTimeSpinBox->setMaximumWidth(9*ww);
690
691 cLayout->addWidget(new QLabel("Directory, ASCII"), 0, 0);
692 cLayout->addWidget(_corrPathLineEdit, 0, 1,1,20);
693 cLayout->addWidget(new QLabel("Interval"), 1, 0);
694 cLayout->addWidget(_corrIntrComboBox, 1, 1);
695 cLayout->addWidget(new QLabel("Port"), 2, 0);
696 cLayout->addWidget(_corrPortLineEdit, 2, 1);
697 cLayout->addWidget(new QLabel(" Wait for full epoch"), 2, 2, Qt::AlignRight);
698 cLayout->addWidget(_corrTimeSpinBox, 2, 3, Qt::AlignLeft);
699 cLayout->addWidget(new QLabel("Saving Broadcast Ephemeris correction files and correction output through IP port."),3,0,1,50);
700 cLayout->addWidget(new QLabel(" "),4,0);
701 cLayout->addWidget(new QLabel(" "),5,0);
702 cgroup->setLayout(cLayout);
703
704 // Feed Engine
705 // -----------
706 QGridLayout* sLayout = new QGridLayout;
707 sLayout->setColumnMinimumWidth(0,14*ww);
708 _outPortLineEdit->setMaximumWidth(9*ww);
709 _waitTimeSpinBox->setMaximumWidth(9*ww);
710 _binSamplSpinBox->setMaximumWidth(9*ww);
711 _outUPortLineEdit->setMaximumWidth(9*ww);
712
713 sLayout->addWidget(new QLabel("Port"), 0, 0);
714 sLayout->addWidget(_outPortLineEdit, 0, 1);
715 sLayout->addWidget(new QLabel("Wait for full epoch"), 0, 2, Qt::AlignRight);
716 sLayout->addWidget(_waitTimeSpinBox, 0, 3, Qt::AlignLeft);
717 sLayout->addWidget(new QLabel("Sampling"), 1, 0);
718 sLayout->addWidget(_binSamplSpinBox, 1, 1, Qt::AlignLeft);
719 sLayout->addWidget(new QLabel("File (full path)"), 2, 0);
720 sLayout->addWidget(_outFileLineEdit, 2, 1, 1, 20);
721 sLayout->addWidget(new QLabel("Port (unsynchronized)"), 3, 0);
722 sLayout->addWidget(_outUPortLineEdit, 3, 1);
723 sLayout->addWidget(new QLabel("Output decoded observations in a binary format to feed a real-time GNSS network engine."),4,0,1,50);
724 sLayout->addWidget(new QLabel(" "),5,0);
725 sgroup->setLayout(sLayout);
726
727 // Serial Output
728 // -------------
729 QGridLayout* serLayout = new QGridLayout;
730 serLayout->setColumnMinimumWidth(0,14*ww);
731 _serialBaudRateComboBox->setMaximumWidth(9*ww);
732 _serialFlowControlComboBox->setMaximumWidth(11*ww);
733 _serialDataBitsComboBox->setMaximumWidth(5*ww);
734 _serialParityComboBox->setMaximumWidth(9*ww);
735 _serialStopBitsComboBox->setMaximumWidth(5*ww);
736 _serialAutoNMEAComboBox->setMaximumWidth(9*ww);
737 _serialHeightNMEALineEdit->setMaximumWidth(8*ww);
738
739 serLayout->addWidget(new QLabel("Mountpoint"), 0,0, Qt::AlignLeft);
740 serLayout->addWidget(_serialMountPointLineEdit, 0,1,1,2);
741 serLayout->addWidget(new QLabel("Port name"), 1,0, Qt::AlignLeft);
742 serLayout->addWidget(_serialPortNameLineEdit, 1,1,1,2);
743 serLayout->addWidget(new QLabel("Baud rate"), 2,0, Qt::AlignLeft);
744 serLayout->addWidget(_serialBaudRateComboBox, 2,1);
745 serLayout->addWidget(new QLabel("Flow control"), 2,2, Qt::AlignRight);
746 serLayout->addWidget(_serialFlowControlComboBox, 2,3);
747 serLayout->addWidget(new QLabel("Data bits"), 3,0, Qt::AlignLeft);
748 serLayout->addWidget(_serialDataBitsComboBox, 3,1);
749 serLayout->addWidget(new QLabel("Parity"), 3,2, Qt::AlignRight);
750 serLayout->addWidget(_serialParityComboBox, 3,3);
751 serLayout->addWidget(new QLabel(" Stop bits"), 3,4, Qt::AlignRight);
752 serLayout->addWidget(_serialStopBitsComboBox, 3,5);
753 serLayout->addWidget(new QLabel("NMEA"), 4,0);
754 serLayout->addWidget(_serialAutoNMEAComboBox, 4,1);
755 serLayout->addWidget(new QLabel(" File (full path)"), 4,2, Qt::AlignRight);
756 serLayout->addWidget(_serialFileNMEALineEdit, 4,3,1,15);
757 serLayout->addWidget(new QLabel("Height"), 4,20, Qt::AlignRight);
758 serLayout->addWidget(_serialHeightNMEALineEdit, 4,21,1,11);
759 serLayout->addWidget(new QLabel("Port settings to feed a serial connected receiver."),5,0,1,30);
760
761 sergroup->setLayout(serLayout);
762
763 // Outages
764 // -------
765 QGridLayout* aLayout = new QGridLayout;
766 aLayout->setColumnMinimumWidth(0,14*ww);
767 _obsRateComboBox->setMaximumWidth(9*ww);
768 _adviseFailSpinBox->setMaximumWidth(9*ww);
769 _adviseRecoSpinBox->setMaximumWidth(9*ww);
770
771 aLayout->addWidget(new QLabel("Observation rate"), 0, 0);
772 aLayout->addWidget(_obsRateComboBox, 0, 1);
773 aLayout->addWidget(new QLabel("Failure threshold"), 1, 0);
774 aLayout->addWidget(_adviseFailSpinBox, 1, 1);
775 aLayout->addWidget(new QLabel("Recovery threshold"), 2, 0);
776 aLayout->addWidget(_adviseRecoSpinBox, 2, 1);
777 aLayout->addWidget(new QLabel("Script (full path)"), 3, 0);
778 aLayout->addWidget(_adviseScriptLineEdit, 3, 1,1,30);
779 aLayout->addWidget(new QLabel("Failure and recovery reports, advisory notes."),4,0,1,50,Qt::AlignLeft);
780 aLayout->addWidget(new QLabel(" "), 5, 0);
781 agroup->setLayout(aLayout);
782
783 // Miscellaneous
784 // -------------
785 QGridLayout* rLayout = new QGridLayout;
786 rLayout->setColumnMinimumWidth(0,14*ww);
787 _perfIntrComboBox->setMaximumWidth(9*ww);
788
789 rLayout->addWidget(new QLabel("Mountpoint"), 0, 0);
790 rLayout->addWidget(_miscMountLineEdit, 0, 1, 1,7);
791 rLayout->addWidget(new QLabel("Log latency"), 1, 0);
792 rLayout->addWidget(_perfIntrComboBox, 1, 1);
793 rLayout->addWidget(new QLabel("Scan RTCM"), 2, 0);
794 rLayout->addWidget(_scanRTCMCheckBox, 2, 1);
795 rLayout->addWidget(new QLabel("Log latencies or scan RTCM streams for numbers of message types and antenna information."),3, 0,1,30);
796 rLayout->addWidget(new QLabel(" "), 4, 0);
797 rLayout->addWidget(new QLabel(" "), 5, 0);
798 rgroup->setLayout(rLayout);
799
800 // PPP Client
801 // ----------
802 QGridLayout* pppLayout = new QGridLayout;
803 _pppSigCLineEdit->setMaximumWidth(6*ww);
804 _pppSigPLineEdit->setMaximumWidth(6*ww);
805 _pppSigCrd0->setMaximumWidth(6*ww);
806 _pppSigCrdP->setMaximumWidth(6*ww);
807 _pppSigTrp0->setMaximumWidth(6*ww);
808 _pppSigTrpP->setMaximumWidth(6*ww);
809 _pppAverageLineEdit->setMaximumWidth(6*ww);
810 _pppQuickStartLineEdit->setMaximumWidth(6*ww);
811 _pppMaxSolGapLineEdit->setMaximumWidth(6*ww);
812 _pppRefCrdXLineEdit->setMaximumWidth(10*ww);
813 _pppRefCrdYLineEdit->setMaximumWidth(10*ww);
814 _pppRefCrdZLineEdit->setMaximumWidth(10*ww);
815 _pppSync->setMaximumWidth(6*ww);
816 _pppSPPComboBox->setMaximumWidth(8*ww);
817 _pppNMEAPortLineEdit->setMaximumWidth(6*ww);
818 pppLayout->addWidget(new QLabel("Obs Mountpoint"), 0, 0);
819 pppLayout->addWidget(_pppMountLineEdit, 0, 1);
820 pppLayout->addWidget(_pppSPPComboBox, 0, 2);
821 pppLayout->addWidget(new QLabel(" X "), 0, 3, Qt::AlignRight);
822 pppLayout->addWidget(_pppRefCrdXLineEdit, 0, 4);
823 pppLayout->addWidget(new QLabel(" Y "), 0, 5, Qt::AlignRight);
824 pppLayout->addWidget(_pppRefCrdYLineEdit, 0, 6);
825 pppLayout->addWidget(new QLabel(" Z "), 0, 7, Qt::AlignRight);
826 pppLayout->addWidget(_pppRefCrdZLineEdit, 0, 8);
827 pppLayout->addWidget(new QLabel("Corr Mountpoint "), 1, 0);
828 pppLayout->addWidget(_pppCorrMountLineEdit, 1, 1);
829 pppLayout->addWidget(new QLabel("Options"), 2, 0, 1, 5);
830 pppLayout->addWidget(_pppUsePhaseCheckBox, 2, 1, Qt::AlignRight);
831 pppLayout->addWidget(new QLabel("Use phase obs"), 2, 2);
832 pppLayout->addWidget(_pppEstTropoCheckBox, 2, 3, Qt::AlignRight);
833 pppLayout->addWidget(new QLabel("Estimate tropo"), 2, 4);
834 pppLayout->addWidget(_pppGLONASSCheckBox, 2, 5, Qt::AlignRight);
835 pppLayout->addWidget(new QLabel("Use GLONASS"), 2, 6);
836 pppLayout->addWidget(_pppGalileoCheckBox, 2, 7, Qt::AlignRight);
837 pppLayout->addWidget(new QLabel("Use Galileo "), 2, 8);
838 pppLayout->addWidget(new QLabel("Options cont'd"), 3, 0);
839 pppLayout->addWidget(_pppSigCrd0, 3, 1, Qt::AlignRight);
840 pppLayout->addWidget(new QLabel("Sigma XYZ Init "), 3, 2);
841 pppLayout->addWidget(_pppSigCrdP, 3, 3, Qt::AlignRight);
842 pppLayout->addWidget(new QLabel("Sigma XYZ Noise "), 3, 4);
843 pppLayout->addWidget(_pppQuickStartLineEdit, 3, 5, Qt::AlignRight);
844 pppLayout->addWidget(new QLabel("Quick-Start (sec) "), 3, 6);
845 pppLayout->addWidget(_pppMaxSolGapLineEdit, 3, 7, Qt::AlignRight);
846 pppLayout->addWidget(new QLabel("Max Sol. Gap (sec)"), 3, 8);
847 pppLayout->addWidget(new QLabel("Output"), 4, 0);
848 pppLayout->addWidget(_pppNMEALineEdit, 4, 1, 1, 3);
849 pppLayout->addWidget(new QLabel("NMEA File"), 4, 4);
850 pppLayout->addWidget(_pppNMEAPortLineEdit, 4, 5, Qt::AlignRight);
851 pppLayout->addWidget(new QLabel("NMEA Port"), 4, 6);
852 pppLayout->addWidget(_pppPlotCoordinates, 4, 7, Qt::AlignRight);
853 pppLayout->addWidget(new QLabel("PPP Plot"), 4, 8);
854
855
856 pppLayout->addWidget(new QLabel("Coordinates from Precise Point Positioning (PPP)."),5, 0,1,5);
857
858 pppgroup->setLayout(pppLayout);
859
860 // PPP Client (second panel)
861 // -------------------------
862 QGridLayout* ppp2Layout = new QGridLayout;
863
864 ppp2Layout->addWidget(new QLabel("Antennas"), 0, 0);
865 ppp2Layout->addWidget(_pppAntexLineEdit, 0, 1, 1, 3);
866 ppp2Layout->addWidget(new QLabel("ANTEX File "), 0, 4);
867 ppp2Layout->addWidget(_pppAntennaLineEdit, 0, 5, 1, 3);
868 ppp2Layout->addWidget(new QLabel("Rec. Ant. Name"), 0, 8);
869 ppp2Layout->addWidget(new QLabel("Satellite Antenna "), 1, 0);
870 ppp2Layout->addWidget(_pppApplySatAntCheckBox, 1, 1, Qt::AlignRight);
871 ppp2Layout->addWidget(new QLabel("Apply Offsets"), 1, 2, Qt::AlignLeft);
872 ppp2Layout->addWidget(new QLabel("Sigmas"), 2, 0);
873 ppp2Layout->addWidget(_pppSigCLineEdit, 2, 1, Qt::AlignRight);
874 ppp2Layout->addWidget(new QLabel("Code"), 2, 2);
875 ppp2Layout->addWidget(_pppSigPLineEdit, 2, 3);
876 ppp2Layout->addWidget(new QLabel("Phase"), 2, 4);
877 ppp2Layout->addWidget(_pppSigTrp0, 2, 5, Qt::AlignRight);
878 ppp2Layout->addWidget(new QLabel("Tropo Init "), 2, 6);
879 ppp2Layout->addWidget(_pppSigTrpP, 2, 7);
880 ppp2Layout->addWidget(new QLabel("Tropo White Noise"), 2, 8);
881 ppp2Layout->addWidget(new QLabel("Options cont'd"), 3, 0);
882 ppp2Layout->addWidget(_pppSync, 3, 1);
883 ppp2Layout->addWidget(new QLabel("Sync Corr (sec) "), 3, 2);
884 ppp2Layout->addWidget(_pppAverageLineEdit, 3, 3, Qt::AlignRight);
885 ppp2Layout->addWidget(new QLabel("Averaging (min)") , 3, 4);
886 ppp2Layout->addWidget(new QLabel("Coordinates from Precise Point Positioning (PPP), continued."), 4, 0, 1, 6);
887 ppp2Layout->addWidget(new QLabel(" "), 5, 0);
888
889 ppp2group->setLayout(ppp2Layout);
890
891 // Combination
892 // -----------
893 QGridLayout* cmbLayout = new QGridLayout;
894
895 populateCmbTable();
896 cmbLayout->addWidget(_cmbTable,0,0,6,3);
897 cmbLayout->setColumnStretch(0,1);
898 cmbLayout->setColumnStretch(1,1);
899 cmbLayout->setColumnStretch(2,1);
900
901 cmbLayout->addWidget(addCmbRowButton,1,3);
902 connect(addCmbRowButton, SIGNAL(clicked()), this, SLOT(slotAddCmbRow()));
903 cmbLayout->addWidget(delCmbRowButton,2,3);
904 connect(delCmbRowButton, SIGNAL(clicked()), this, SLOT(slotDelCmbRow()));
905
906 cmbLayout->setColumnStretch(4,1);
907
908 cmbLayout->addWidget(new QLabel(" Host"), 0, 4);
909 cmbLayout->addWidget(_cmbOutHostLineEdit, 0, 5);
910 cmbLayout->addWidget(new QLabel(" Port"), 0, 6);
911 _cmbOutPortLineEdit->setMaximumWidth(9*ww);
912 cmbLayout->addWidget(_cmbOutPortLineEdit, 0, 7);
913 cmbLayout->addWidget(new QLabel(" Mountpoint"), 1, 4);
914 _cmbMountpointLineEdit->setMaximumWidth(9*ww);
915 cmbLayout->addWidget(_cmbMountpointLineEdit, 1, 5);
916 cmbLayout->addWidget(new QLabel(" Password"), 1, 6);
917 _cmbPasswordLineEdit->setEchoMode(QLineEdit::Password);
918 _cmbPasswordLineEdit->setMaximumWidth(9*ww);
919 cmbLayout->addWidget(_cmbPasswordLineEdit, 1, 7);
920 cmbLayout->addWidget(new QLabel(" Directory, ASCII"), 2, 4);
921 cmbLayout->addWidget(_cmbOutPathLineEdit, 2, 5, 1, 3);
922 cmbLayout->addWidget(new QLabel(" Directory, SP3"), 3, 4);
923 cmbLayout->addWidget(_cmbSP3PathLineEdit, 3, 5, 1, 3);
924 cmbLayout->addWidget(new QLabel(" Combine Broadcast Ephemeris corrections streams."),5,3,1,5);
925
926 cmbgroup->setLayout(cmbLayout);
927
928 // Main Layout
929 // -----------
930 QGridLayout* mLayout = new QGridLayout;
931 _aogroup->setCurrentIndex(settings.value("startTab").toInt());
932 mLayout->addWidget(_aogroup, 0,0);
933 mLayout->addWidget(_mountPointsTable, 1,0);
934 _loggroup->setCurrentIndex(settings.value("statusTab").toInt());
935 mLayout->addWidget(_loggroup, 2,0);
936
937 _canvas->setLayout(mLayout);
938
939 // Enable/Disable all Widgets
940 // --------------------------
941 slotBncTextChanged();
942
943 // Auto start
944 // ----------
945 if ( Qt::CheckState(settings.value("autoStart").toInt()) == Qt::Checked) {
946 slotGetData();
947 }
948}
949
950// Destructor
951////////////////////////////////////////////////////////////////////////////
952bncWindow::~bncWindow() {
953 delete _caster;
954}
955
956//
957////////////////////////////////////////////////////////////////////////////
958void bncWindow::populateMountPointsTable() {
959
960 for (int iRow = _mountPointsTable->rowCount()-1; iRow >=0; iRow--) {
961 _mountPointsTable->removeRow(iRow);
962 }
963
964 bncSettings settings;
965
966 QListIterator<QString> it(settings.value("mountPoints").toStringList());
967 if (!it.hasNext()) {
968 _actGetData->setEnabled(false);
969 }
970 int iRow = 0;
971 while (it.hasNext()) {
972 QStringList hlp = it.next().split(" ");
973 if (hlp.size() < 5) continue;
974 _mountPointsTable->insertRow(iRow);
975
976 QUrl url(hlp[0]);
977
978 QString fullPath = url.host() + QString(":%1").arg(url.port()) + url.path();
979 QString format(hlp[1]); QString latitude(hlp[2]); QString longitude(hlp[3]);
980 QString nmea(hlp[4]);
981 if (hlp[5] == "S") {
982 fullPath = hlp[0].replace(0,2,"");
983 }
984 QString ntripVersion = "1";
985 if (hlp.size() >= 6) {
986 ntripVersion = (hlp[5]);
987 }
988
989 QTableWidgetItem* it;
990 it = new QTableWidgetItem(url.userInfo());
991 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
992 _mountPointsTable->setItem(iRow, 0, it);
993
994 it = new QTableWidgetItem(fullPath);
995 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
996 _mountPointsTable->setItem(iRow, 1, it);
997
998 it = new QTableWidgetItem(format);
999 _mountPointsTable->setItem(iRow, 2, it);
1000
1001 if (nmea == "yes") {
1002 it = new QTableWidgetItem(latitude);
1003 _mountPointsTable->setItem(iRow, 3, it);
1004 it = new QTableWidgetItem(longitude);
1005 _mountPointsTable->setItem(iRow, 4, it);
1006 } else {
1007 it = new QTableWidgetItem(latitude);
1008 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1009 _mountPointsTable->setItem(iRow, 3, it);
1010 it = new QTableWidgetItem(longitude);
1011 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1012 _mountPointsTable->setItem(iRow, 4, it);
1013 }
1014
1015 it = new QTableWidgetItem(nmea);
1016 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1017 _mountPointsTable->setItem(iRow, 5, it);
1018
1019 it = new QTableWidgetItem(ntripVersion);
1020 //// it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1021 _mountPointsTable->setItem(iRow, 6, it);
1022
1023 bncTableItem* bncIt = new bncTableItem();
1024 bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
1025 _mountPointsTable->setItem(iRow, 7, bncIt);
1026
1027 iRow++;
1028 }
1029
1030 _mountPointsTable->sortItems(1);
1031}
1032
1033// Retrieve Table
1034////////////////////////////////////////////////////////////////////////////
1035void bncWindow::slotAddMountPoints() {
1036
1037 bncSettings settings;
1038 QString proxyHost = settings.value("proxyHost").toString();
1039 int proxyPort = settings.value("proxyPort").toInt();
1040 if (proxyHost != _proxyHostLineEdit->text() ||
1041 proxyPort != _proxyPortLineEdit->text().toInt()) {
1042 int iRet = QMessageBox::question(this, "Question", "Proxy options "
1043 "changed. Use the new ones?",
1044 QMessageBox::Yes, QMessageBox::No,
1045 QMessageBox::NoButton);
1046 if (iRet == QMessageBox::Yes) {
1047 settings.setValue("proxyHost", _proxyHostLineEdit->text());
1048 settings.setValue("proxyPort", _proxyPortLineEdit->text());
1049 settings.sync();
1050 }
1051 }
1052
1053 QMessageBox msgBox;
1054 msgBox.setIcon(QMessageBox::Question);
1055 msgBox.setWindowTitle("Add Stream");
1056 msgBox.setText("Add stream(s) coming from:");
1057
1058 QPushButton* buttonNtrip = msgBox.addButton(tr("Caster"), QMessageBox::ActionRole);
1059 QPushButton* buttonIP = msgBox.addButton(tr("TCP/IP port"), QMessageBox::ActionRole);
1060 QPushButton* buttonUDP = msgBox.addButton(tr("UDP port"), QMessageBox::ActionRole);
1061 QPushButton* buttonSerial = msgBox.addButton(tr("Serial port"), QMessageBox::ActionRole);
1062 QPushButton* buttonCancel = msgBox.addButton(tr("Cancel"), QMessageBox::ActionRole);
1063
1064 msgBox.exec();
1065
1066 if (msgBox.clickedButton() == buttonNtrip) {
1067 bncTableDlg* dlg = new bncTableDlg(this);
1068 dlg->move(this->pos().x()+50, this->pos().y()+50);
1069 connect(dlg, SIGNAL(newMountPoints(QStringList*)),
1070 this, SLOT(slotNewMountPoints(QStringList*)));
1071 dlg->exec();
1072 delete dlg;
1073 } else if (msgBox.clickedButton() == buttonIP) {
1074 bncIpPort* ipp = new bncIpPort(this);
1075 connect(ipp, SIGNAL(newMountPoints(QStringList*)),
1076 this, SLOT(slotNewMountPoints(QStringList*)));
1077 ipp->exec();
1078 delete ipp;
1079 } else if (msgBox.clickedButton() == buttonUDP) {
1080 bncUdpPort* udp = new bncUdpPort(this);
1081 connect(udp, SIGNAL(newMountPoints(QStringList*)),
1082 this, SLOT(slotNewMountPoints(QStringList*)));
1083 udp->exec();
1084 delete udp;
1085 } else if (msgBox.clickedButton() == buttonSerial) {
1086 bncSerialPort* sep = new bncSerialPort(this);
1087 connect(sep, SIGNAL(newMountPoints(QStringList*)),
1088 this, SLOT(slotNewMountPoints(QStringList*)));
1089 sep->exec();
1090 delete sep;
1091 } else if (msgBox.clickedButton() == buttonCancel) {
1092 // Cancel
1093 }
1094}
1095
1096// Delete Selected Mount Points
1097////////////////////////////////////////////////////////////////////////////
1098void bncWindow::slotDeleteMountPoints() {
1099
1100 int nRows = _mountPointsTable->rowCount();
1101 bool flg[nRows];
1102 for (int iRow = 0; iRow < nRows; iRow++) {
1103 if (_mountPointsTable->isItemSelected(_mountPointsTable->item(iRow,1))) {
1104 flg[iRow] = true;
1105 }
1106 else {
1107 flg[iRow] = false;
1108 }
1109 }
1110 for (int iRow = nRows-1; iRow >= 0; iRow--) {
1111 if (flg[iRow]) {
1112 _mountPointsTable->removeRow(iRow);
1113 }
1114 }
1115 _actDeleteMountPoints->setEnabled(false);
1116
1117 if (_mountPointsTable->rowCount() == 0) {
1118 _actGetData->setEnabled(false);
1119 }
1120}
1121
1122// New Mount Points Selected
1123////////////////////////////////////////////////////////////////////////////
1124void bncWindow::slotNewMountPoints(QStringList* mountPoints) {
1125 int iRow = 0;
1126 QListIterator<QString> it(*mountPoints);
1127 while (it.hasNext()) {
1128 QStringList hlp = it.next().split(" ");
1129 QUrl url(hlp[0]);
1130 QString fullPath = url.host() + QString(":%1").arg(url.port()) + url.path();
1131 QString format(hlp[1]); QString latitude(hlp[2]); QString longitude(hlp[3]);
1132 QString nmea(hlp[4]);
1133 if (hlp[5] == "S") {
1134 fullPath = hlp[0].replace(0,2,"");
1135 }
1136 QString ntripVersion = "1";
1137 if (hlp.size() >= 6) {
1138 ntripVersion = (hlp[5]);
1139 }
1140
1141 _mountPointsTable->insertRow(iRow);
1142
1143 QTableWidgetItem* it;
1144 it = new QTableWidgetItem(url.userInfo());
1145 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1146 _mountPointsTable->setItem(iRow, 0, it);
1147
1148 it = new QTableWidgetItem(fullPath);
1149 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1150 _mountPointsTable->setItem(iRow, 1, it);
1151
1152 it = new QTableWidgetItem(format);
1153 _mountPointsTable->setItem(iRow, 2, it);
1154
1155 if (nmea == "yes") {
1156 it = new QTableWidgetItem(latitude);
1157 _mountPointsTable->setItem(iRow, 3, it);
1158 it = new QTableWidgetItem(longitude);
1159 _mountPointsTable->setItem(iRow, 4, it);
1160 } else {
1161 it = new QTableWidgetItem(latitude);
1162 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1163 _mountPointsTable->setItem(iRow, 3, it);
1164 it = new QTableWidgetItem(longitude);
1165 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1166 _mountPointsTable->setItem(iRow, 4, it);
1167 }
1168
1169 it = new QTableWidgetItem(nmea);
1170 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1171 _mountPointsTable->setItem(iRow, 5, it);
1172
1173 it = new QTableWidgetItem(ntripVersion);
1174 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1175 _mountPointsTable->setItem(iRow, 6, it);
1176
1177 bncTableItem* bncIt = new bncTableItem();
1178 _mountPointsTable->setItem(iRow, 7, bncIt);
1179
1180 iRow++;
1181 }
1182 _mountPointsTable->hideColumn(0);
1183 _mountPointsTable->sortItems(1);
1184 if (mountPoints->count() > 0 && !_actStop->isEnabled()) {
1185 _actGetData->setEnabled(true);
1186 }
1187 delete mountPoints;
1188}
1189
1190// Save Options
1191////////////////////////////////////////////////////////////////////////////
1192void bncWindow::slotSaveOptions() {
1193
1194 QStringList mountPoints;
1195 for (int iRow = 0; iRow < _mountPointsTable->rowCount(); iRow++) {
1196
1197 if (_mountPointsTable->item(iRow, 6)->text() != "S") {
1198 QUrl url( "//" + _mountPointsTable->item(iRow, 0)->text() +
1199 "@" + _mountPointsTable->item(iRow, 1)->text() );
1200
1201 mountPoints.append(url.toString() + " " +
1202 _mountPointsTable->item(iRow, 2)->text()
1203 + " " + _mountPointsTable->item(iRow, 3)->text()
1204 + " " + _mountPointsTable->item(iRow, 4)->text()
1205 + " " + _mountPointsTable->item(iRow, 5)->text()
1206 + " " + _mountPointsTable->item(iRow, 6)->text());
1207 } else {
1208 mountPoints.append(
1209 "//" + _mountPointsTable->item(iRow, 1)->text()
1210 + " " + _mountPointsTable->item(iRow, 2)->text()
1211 + " " + _mountPointsTable->item(iRow, 3)->text()
1212 + " " + _mountPointsTable->item(iRow, 4)->text()
1213 + " " + _mountPointsTable->item(iRow, 5)->text()
1214 + " " + _mountPointsTable->item(iRow, 6)->text());
1215 }
1216 }
1217
1218 QStringList combineStreams;
1219 for (int iRow = 0; iRow < _cmbTable->rowCount(); iRow++) {
1220 QString hlp;
1221 for (int iCol = 0; iCol < _cmbTable->columnCount(); iCol++) {
1222 if (_cmbTable->item(iRow, iCol)) {
1223 hlp += _cmbTable->item(iRow, iCol)->text() + " ";
1224 }
1225 }
1226 if (!hlp.isEmpty()) {
1227 combineStreams << hlp;
1228 }
1229 }
1230
1231 bncSettings settings;
1232
1233 settings.setValue("adviseFail", _adviseFailSpinBox->value());
1234 settings.setValue("adviseReco", _adviseRecoSpinBox->value());
1235 settings.setValue("adviseScript",_adviseScriptLineEdit->text());
1236 settings.setValue("autoStart", _autoStartCheckBox->checkState());
1237 settings.setValue("binSampl", _binSamplSpinBox->value());
1238 settings.setValue("corrIntr", _corrIntrComboBox->currentText());
1239 settings.setValue("corrPath", _corrPathLineEdit->text());
1240 settings.setValue("corrPort", _corrPortLineEdit->text());
1241 settings.setValue("corrTime", _corrTimeSpinBox->value());
1242 settings.setValue("ephIntr", _ephIntrComboBox->currentText());
1243 settings.setValue("ephPath", _ephPathLineEdit->text());
1244 settings.setValue("ephV3", _ephV3CheckBox->checkState());
1245 settings.setValue("logFile", _logFileLineEdit->text());
1246 settings.setValue("rawOutFile", _rawOutFileLineEdit->text());
1247 settings.setValue("miscMount", _miscMountLineEdit->text());
1248 settings.setValue("pppMount", _pppMountLineEdit->text());
1249 settings.setValue("pppCorrMount",_pppCorrMountLineEdit->text());
1250 settings.setValue("pppSPP", _pppSPPComboBox->currentText());
1251 settings.setValue("nmeaFile", _pppNMEALineEdit->text());
1252 settings.setValue("nmeaPort", _pppNMEAPortLineEdit->text());
1253 settings.setValue("pppSigmaCode",_pppSigCLineEdit->text());
1254 settings.setValue("pppSigmaPhase",_pppSigPLineEdit->text());
1255 settings.setValue("pppSigCrd0",_pppSigCrd0->text());
1256 settings.setValue("pppSigCrdP",_pppSigCrdP->text());
1257 settings.setValue("pppSigTrp0",_pppSigTrp0->text());
1258 settings.setValue("pppSigTrpP",_pppSigTrpP->text());
1259 settings.setValue("pppAverage", _pppAverageLineEdit->text());
1260 settings.setValue("pppQuickStart", _pppQuickStartLineEdit->text());
1261 settings.setValue("pppMaxSolGap", _pppMaxSolGapLineEdit->text());
1262 settings.setValue("pppRefCrdX", _pppRefCrdXLineEdit->text());
1263 settings.setValue("pppRefCrdY", _pppRefCrdYLineEdit->text());
1264 settings.setValue("pppRefCrdZ", _pppRefCrdZLineEdit->text());
1265 settings.setValue("pppSync", _pppSync->text());
1266 settings.setValue("pppUsePhase", _pppUsePhaseCheckBox->checkState());
1267 settings.setValue("pppPlotCoordinates", _pppPlotCoordinates->checkState());
1268 settings.setValue("pppEstTropo", _pppEstTropoCheckBox->checkState());
1269 settings.setValue("pppGLONASS", _pppGLONASSCheckBox->checkState());
1270 settings.setValue("pppGalileo", _pppGalileoCheckBox->checkState());
1271 settings.setValue("pppAntenna", _pppAntennaLineEdit->text());
1272 settings.setValue("pppAntex", _pppAntexLineEdit->text());
1273 settings.setValue("pppApplySatAnt", _pppApplySatAntCheckBox->checkState());
1274 settings.setValue("mountPoints", mountPoints);
1275 settings.setValue("obsRate", _obsRateComboBox->currentText());
1276 settings.setValue("onTheFlyInterval", _onTheFlyComboBox->currentText());
1277 settings.setValue("outEphPort", _outEphPortLineEdit->text());
1278 settings.setValue("outFile", _outFileLineEdit->text());
1279 settings.setValue("outPort", _outPortLineEdit->text());
1280 settings.setValue("outUPort", _outUPortLineEdit->text());
1281 settings.setValue("perfIntr", _perfIntrComboBox->currentText());
1282 settings.setValue("proxyHost", _proxyHostLineEdit->text());
1283 settings.setValue("proxyPort", _proxyPortLineEdit->text());
1284 settings.setValue("rnxAppend", _rnxAppendCheckBox->checkState());
1285 settings.setValue("rnxIntr", _rnxIntrComboBox->currentText());
1286 settings.setValue("rnxPath", _rnxPathLineEdit->text());
1287 settings.setValue("rnxSampl", _rnxSamplSpinBox->value());
1288 settings.setValue("rnxScript", _rnxScrpLineEdit->text());
1289 settings.setValue("rnxSkel", _rnxSkelLineEdit->text());
1290 settings.setValue("rnxV3", _rnxV3CheckBox->checkState());
1291 settings.setValue("scanRTCM", _scanRTCMCheckBox->checkState());
1292 settings.setValue("serialFileNMEA",_serialFileNMEALineEdit->text());
1293 settings.setValue("serialHeightNMEA",_serialHeightNMEALineEdit->text());
1294 settings.setValue("serialAutoNMEA", _serialAutoNMEAComboBox->currentText());
1295 settings.setValue("serialBaudRate", _serialBaudRateComboBox->currentText());
1296 settings.setValue("serialDataBits", _serialDataBitsComboBox->currentText());
1297 settings.setValue("serialMountPoint",_serialMountPointLineEdit->text());
1298 settings.setValue("serialParity", _serialParityComboBox->currentText());
1299 settings.setValue("serialPortName", _serialPortNameLineEdit->text());
1300 settings.setValue("serialStopBits", _serialStopBitsComboBox->currentText());
1301 settings.setValue("serialFlowControl",_serialFlowControlComboBox->currentText());
1302 settings.setValue("startTab", _aogroup->currentIndex());
1303 settings.setValue("statusTab", _loggroup->currentIndex());
1304 settings.setValue("waitTime", _waitTimeSpinBox->value());
1305 if (!combineStreams.isEmpty()) {
1306 settings.setValue("combineStreams", combineStreams);
1307 }
1308 else {
1309 settings.setValue("combineStreams", "");
1310 }
1311 settings.setValue("cmbOutHost", _cmbOutHostLineEdit->text());
1312 settings.setValue("cmbOutPort", _cmbOutPortLineEdit->text());
1313 settings.setValue("cmbMountpoint", _cmbMountpointLineEdit->text());
1314 settings.setValue("cmbPassword", _cmbPasswordLineEdit->text());
1315 settings.setValue("cmbOutPath", _cmbOutPathLineEdit->text());
1316 settings.setValue("cmbSP3Path", _cmbSP3PathLineEdit->text());
1317
1318 if (_caster) {
1319 _caster->slotReadMountPoints();
1320 }
1321 settings.sync();
1322}
1323
1324// All get slots terminated
1325////////////////////////////////////////////////////////////////////////////
1326void bncWindow::slotGetThreadsFinished() {
1327 ((bncApp*)qApp)->slotMessage("All Get Threads Terminated", true);
1328 delete _caster; _caster = 0;
1329 _actGetData->setEnabled(true);
1330 _actStop->setEnabled(false);
1331}
1332
1333// Retrieve Data
1334////////////////////////////////////////////////////////////////////////////
1335void bncWindow::slotGetData() {
1336 slotSaveOptions();
1337
1338 _bncFigurePPP->reset();
1339
1340 _actDeleteMountPoints->setEnabled(false);
1341 _actGetData->setEnabled(false);
1342 _actStop->setEnabled(true);
1343
1344 _caster = new bncCaster(_outFileLineEdit->text(),
1345 _outPortLineEdit->text().toInt());
1346
1347 ((bncApp*)qApp)->setPort(_outEphPortLineEdit->text().toInt());
1348 ((bncApp*)qApp)->setPortCorr(_corrPortLineEdit->text().toInt());
1349 ((bncApp*)qApp)->initCombination();
1350
1351 connect(_caster, SIGNAL(getThreadsFinished()),
1352 this, SLOT(slotGetThreadsFinished()));
1353
1354 connect (_caster, SIGNAL(mountPointsRead(QList<bncGetThread*>)),
1355 this, SLOT(slotMountPointsRead(QList<bncGetThread*>)));
1356
1357 ((bncApp*)qApp)->slotMessage("========== Start BNC v" BNCVERSION " =========", true);
1358
1359 bncSettings settings;
1360
1361 QDir rnxdir(settings.value("rnxPath").toString());
1362 if (!rnxdir.exists()) ((bncApp*)qApp)->slotMessage("Cannot find RINEX Observations directory", true);
1363
1364 QString rnx_file = settings.value("rnxScript").toString();
1365 if ( !rnx_file.isEmpty() ) {
1366 QFile rnxfile(settings.value("rnxScript").toString());
1367 if (!rnxfile.exists()) ((bncApp*)qApp)->slotMessage("Cannot find RINEX Observations script", true);
1368 }
1369
1370 QDir ephdir(settings.value("ephPath").toString());
1371 if (!ephdir.exists()) ((bncApp*)qApp)->slotMessage("Cannot find RINEX Ephemeris directory", true);
1372
1373 QDir corrdir(settings.value("corrPath").toString());
1374 if (!corrdir.exists()) ((bncApp*)qApp)->slotMessage("Cannot find Broadcast Corrections directory", true);
1375
1376 QString advise_file = settings.value("adviseScript").toString();
1377 if ( !advise_file.isEmpty() ) {
1378 QFile advisefile(settings.value("adviseScript").toString());
1379 if (!advisefile.exists()) ((bncApp*)qApp)->slotMessage("Cannot find Outages script", true);
1380 }
1381
1382 QString ant_file = settings.value("pppAntex").toString();
1383 if ( !ant_file.isEmpty() ) {
1384 QFile anxfile(settings.value("pppAntex").toString());
1385 if (!anxfile.exists()) ((bncApp*)qApp)->slotMessage("Cannot find IGS ANTEX file", true);
1386 }
1387
1388 QDir cmbOutDir(settings.value("cmbOutPath").toString());
1389 if (!cmbOutDir.exists()) ((bncApp*)qApp)->slotMessage("Cannot find directory for saving combination results in ASCII format", true);
1390
1391 QDir cmbSP3dir(settings.value("cmbSP3Path").toString());
1392 if (!cmbSP3dir.exists()) ((bncApp*)qApp)->slotMessage("Cannot find directory for saving combination results in SP3 format", true);
1393
1394 _caster->slotReadMountPoints();
1395}
1396
1397// Retrieve Data
1398////////////////////////////////////////////////////////////////////////////
1399void bncWindow::slotStop() {
1400 int iRet = QMessageBox::question(this, "Stop", "Stop retrieving data?",
1401 QMessageBox::Yes, QMessageBox::No,
1402 QMessageBox::NoButton);
1403 if (iRet == QMessageBox::Yes) {
1404 delete _caster; _caster = 0;
1405 _actGetData->setEnabled(true);
1406 _actStop->setEnabled(false);
1407 }
1408}
1409
1410// Close Application gracefully
1411////////////////////////////////////////////////////////////////////////////
1412void bncWindow::closeEvent(QCloseEvent* event) {
1413
1414 int iRet = QMessageBox::question(this, "Close", "Save Options?",
1415 QMessageBox::Yes, QMessageBox::No,
1416 QMessageBox::Cancel);
1417
1418 if (iRet == QMessageBox::Cancel) {
1419 event->ignore();
1420 return;
1421 }
1422 else if (iRet == QMessageBox::Yes) {
1423 slotSaveOptions();
1424 }
1425
1426 QMainWindow::closeEvent(event);
1427}
1428
1429// User changed the selection of mountPoints
1430////////////////////////////////////////////////////////////////////////////
1431void bncWindow::slotSelectionChanged() {
1432 if (_mountPointsTable->selectedItems().isEmpty()) {
1433 _actDeleteMountPoints->setEnabled(false);
1434 }
1435 else {
1436 _actDeleteMountPoints->setEnabled(true);
1437 }
1438}
1439
1440// Display Program Messages
1441////////////////////////////////////////////////////////////////////////////
1442void bncWindow::slotWindowMessage(const QByteArray msg, bool showOnScreen) {
1443
1444#ifdef DEBUG_RTCM2_2021
1445 const int maxBufferSize = 1000;
1446#else
1447 const int maxBufferSize = 10000;
1448#endif
1449
1450 if (! showOnScreen ) {
1451 return;
1452 }
1453
1454 QString txt = _log->toPlainText() + "\n" +
1455 QDateTime::currentDateTime().toUTC().toString("yy-MM-dd hh:mm:ss ") + msg;
1456 _log->clear();
1457 _log->append(txt.right(maxBufferSize));
1458}
1459
1460// About Message
1461////////////////////////////////////////////////////////////////////////////
1462void bncWindow::slotAbout() {
1463 new bncAboutDlg(0);
1464}
1465
1466//Flowchart
1467////////////////////////////////////////////////////////////////////////////
1468void bncWindow::slotFlowchart() {
1469 new bncFlowchartDlg(0);
1470}
1471
1472// Help Window
1473////////////////////////////////////////////////////////////////////////////
1474void bncWindow::slotHelp() {
1475 QUrl url;
1476 url.setPath(":bnchelp.html");
1477 new bncHlpDlg(0, url);
1478}
1479
1480// Select Fonts
1481////////////////////////////////////////////////////////////////////////////
1482void bncWindow::slotFontSel() {
1483 bool ok;
1484 QFont newFont = QFontDialog::getFont(&ok, this->font(), this);
1485 if (ok) {
1486 bncSettings settings;
1487 settings.setValue("font", newFont.toString());
1488 QApplication::setFont(newFont);
1489 int ww = QFontMetrics(newFont).width('w');
1490 setMinimumSize(60*ww, 80*ww);
1491 resize(60*ww, 80*ww);
1492 }
1493}
1494
1495// Whats This Help
1496void bncWindow::slotWhatsThis() {
1497 QWhatsThis::enterWhatsThisMode();
1498}
1499
1500//
1501////////////////////////////////////////////////////////////////////////////
1502void bncWindow::slotMountPointsRead(QList<bncGetThread*> threads) {
1503 _bncFigure->updateMountPoints();
1504 _bncFigureLate->updateMountPoints();
1505
1506 populateMountPointsTable();
1507 bncSettings settings;
1508 _binSamplSpinBox->setValue(settings.value("binSampl").toInt());
1509 _waitTimeSpinBox->setValue(settings.value("waitTime").toInt());
1510 QListIterator<bncGetThread*> iTh(threads);
1511 while (iTh.hasNext()) {
1512 bncGetThread* thread = iTh.next();
1513 for (int iRow = 0; iRow < _mountPointsTable->rowCount(); iRow++) {
1514 QUrl url( "//" + _mountPointsTable->item(iRow, 0)->text() +
1515 "@" + _mountPointsTable->item(iRow, 1)->text() );
1516 if (url == thread->mountPoint() &&
1517 _mountPointsTable->item(iRow, 3)->text() == thread->latitude() &&
1518 _mountPointsTable->item(iRow, 4)->text() == thread->longitude() ) {
1519 ((bncTableItem*) _mountPointsTable->item(iRow, 7))->setGetThread(thread);
1520 disconnect(thread, SIGNAL(newBytes(QByteArray, double)),
1521 _bncFigure, SLOT(slotNewData(QByteArray, double)));
1522 connect(thread, SIGNAL(newBytes(QByteArray, double)),
1523 _bncFigure, SLOT(slotNewData(QByteArray, double)));
1524 disconnect(thread, SIGNAL(newLatency(QByteArray, double)),
1525 _bncFigureLate, SLOT(slotNewLatency(QByteArray, double)));
1526 connect(thread, SIGNAL(newLatency(QByteArray, double)),
1527 _bncFigureLate, SLOT(slotNewLatency(QByteArray, double)));
1528 if ( Qt::CheckState(settings.value("pppPlotCoordinates").toInt()) == Qt::Checked) {
1529 disconnect(thread,
1530 SIGNAL(newPosition(bncTime, double, double, double)),
1531 _bncFigurePPP,
1532 SLOT(slotNewPosition(bncTime, double, double, double)));
1533 connect(thread, SIGNAL(newPosition(bncTime, double, double, double)),
1534 _bncFigurePPP,
1535 SLOT(slotNewPosition(bncTime, double, double, double)));
1536 }
1537 break;
1538 }
1539 }
1540 }
1541}
1542
1543//
1544////////////////////////////////////////////////////////////////////////////
1545void bncWindow::CreateMenu() {
1546 // Create Menus
1547 // ------------
1548 _menuFile = menuBar()->addMenu(tr("&File"));
1549 _menuFile->addAction(_actFontSel);
1550 _menuFile->addSeparator();
1551 _menuFile->addAction(_actSaveOpt);
1552 _menuFile->addSeparator();
1553 _menuFile->addAction(_actQuit);
1554
1555 _menuHlp = menuBar()->addMenu(tr("&Help"));
1556 _menuHlp->addAction(_actHelp);
1557 _menuHlp->addAction(_actFlowchart);
1558 _menuHlp->addAction(_actAbout);
1559}
1560
1561// Toolbar
1562////////////////////////////////////////////////////////////////////////////
1563void bncWindow::AddToolbar() {
1564 // Tool (Command) Bar
1565 // ------------------
1566 QToolBar* toolBar = new QToolBar;
1567 addToolBar(Qt::BottomToolBarArea, toolBar);
1568 toolBar->setMovable(false);
1569 toolBar->addAction(_actAddMountPoints);
1570 toolBar->addAction(_actDeleteMountPoints);
1571 toolBar->addAction(_actGetData);
1572 toolBar->addAction(_actStop);
1573 toolBar->addWidget(new QLabel(" "));
1574 toolBar->addAction(_actwhatsthis);
1575}
1576
1577// About
1578////////////////////////////////////////////////////////////////////////////
1579bncAboutDlg::bncAboutDlg(QWidget* parent) :
1580 QDialog(parent) {
1581
1582 QTextBrowser* tb = new QTextBrowser;
1583 QUrl url; url.setPath(":bncabout.html");
1584 tb->setSource(url);
1585 tb->setReadOnly(true);
1586
1587 int ww = QFontMetrics(font()).width('w');
1588 QPushButton* _closeButton = new QPushButton("Close");
1589 _closeButton->setMaximumWidth(10*ww);
1590 connect(_closeButton, SIGNAL(clicked()), this, SLOT(close()));
1591
1592 QGridLayout* dlgLayout = new QGridLayout();
1593 QLabel* img = new QLabel();
1594 img->setPixmap(QPixmap(":ntrip-logo.png"));
1595 dlgLayout->addWidget(img, 0,0);
1596 dlgLayout->addWidget(new QLabel("BKG Ntrip Client (BNC) Version "BNCVERSION), 0,1);
1597 dlgLayout->addWidget(tb,1,0,1,2);
1598 dlgLayout->addWidget(_closeButton,2,1,Qt::AlignRight);
1599
1600 setLayout(dlgLayout);
1601 resize(60*ww, 60*ww);
1602 setWindowTitle("About BNC");
1603 show();
1604}
1605
1606//
1607////////////////////////////////////////////////////////////////////////////
1608bncAboutDlg::~bncAboutDlg() {
1609};
1610
1611// Flowchart
1612////////////////////////////////////////////////////////////////////////////
1613bncFlowchartDlg::bncFlowchartDlg(QWidget* parent) :
1614 QDialog(parent) {
1615
1616 int ww = QFontMetrics(font()).width('w');
1617 QPushButton* _closeButton = new QPushButton("Close");
1618 _closeButton->setMaximumWidth(10*ww);
1619 connect(_closeButton, SIGNAL(clicked()), this, SLOT(close()));
1620
1621 QGridLayout* dlgLayout = new QGridLayout();
1622 QLabel* img = new QLabel();
1623 img->setPixmap(QPixmap(":bncflowchart.png"));
1624 dlgLayout->addWidget(img, 0,0);
1625 dlgLayout->addWidget(_closeButton,1,0,Qt::AlignLeft);
1626
1627 setLayout(dlgLayout);
1628 setWindowTitle("Flow Chart");
1629 show();
1630}
1631
1632//
1633////////////////////////////////////////////////////////////////////////////
1634bncFlowchartDlg::~bncFlowchartDlg() {
1635};
1636
1637// Bnc Text
1638////////////////////////////////////////////////////////////////////////////
1639void bncWindow::slotBncTextChanged(){
1640
1641 QPalette palette_white(QColor(255, 255, 255));
1642 QPalette palette_gray(QColor(230, 230, 230));
1643 bncSettings settings;
1644
1645 // Proxy
1646 //------
1647 if (sender() == 0 || sender() == _proxyHostLineEdit) {
1648 if (!_proxyHostLineEdit->text().isEmpty()) {
1649 _proxyPortLineEdit->setStyleSheet("background-color: white");
1650 _proxyPortLineEdit->setEnabled(true);
1651 }
1652 else {
1653 _proxyPortLineEdit->setStyleSheet("background-color: lightGray");
1654 _proxyPortLineEdit->setEnabled(false);
1655 }
1656 }
1657
1658 // RINEX Observations
1659 // ------------------
1660 if (sender() == 0 || sender() == _rnxPathLineEdit) {
1661 if (!_rnxPathLineEdit->text().isEmpty()) {
1662 _rnxSamplSpinBox->setStyleSheet("background-color: white");
1663 _rnxSkelLineEdit->setStyleSheet("background-color: white");
1664 _rnxScrpLineEdit->setStyleSheet("background-color: white");
1665 _rnxV3CheckBox->setPalette(palette_white);
1666 _rnxIntrComboBox->setStyleSheet("background-color: white");
1667 _rnxSamplSpinBox->setEnabled(true);
1668 _rnxSkelLineEdit->setEnabled(true);
1669 _rnxScrpLineEdit->setEnabled(true);
1670 _rnxV3CheckBox->setEnabled(true);
1671 _rnxIntrComboBox->setEnabled(true);
1672 }
1673 else {
1674 _rnxSamplSpinBox->setStyleSheet("background-color: lightGray");
1675 _rnxSkelLineEdit->setStyleSheet("background-color: lightGray");
1676 _rnxScrpLineEdit->setStyleSheet("background-color: lightGray");
1677 _rnxV3CheckBox->setPalette(palette_gray);
1678 _rnxIntrComboBox->setStyleSheet("background-color: lightGray");
1679 _rnxSamplSpinBox->setEnabled(false);
1680 _rnxSkelLineEdit->setEnabled(false);
1681 _rnxScrpLineEdit->setEnabled(false);
1682 _rnxV3CheckBox->setEnabled(false);
1683 _rnxIntrComboBox->setEnabled(false);
1684 }
1685 }
1686
1687 // RINEX Ephemeris
1688 // ---------------
1689 if (sender() == 0 ||
1690 sender() == _ephPathLineEdit || sender() == _outEphPortLineEdit) {
1691 if (!_ephPathLineEdit->text().isEmpty() ||
1692 !_outEphPortLineEdit->text().isEmpty()) {
1693 _ephIntrComboBox->setStyleSheet("background-color: white");
1694 _ephV3CheckBox->setPalette(palette_white);
1695 _ephIntrComboBox->setEnabled(true);
1696 _ephV3CheckBox->setEnabled(true);
1697 }
1698 else {
1699 _ephIntrComboBox->setStyleSheet("background-color: lightGray");
1700 _ephV3CheckBox->setPalette(palette_gray);
1701 _ephIntrComboBox->setEnabled(false);
1702 _ephV3CheckBox->setEnabled(false);
1703 }
1704 }
1705
1706 // Broadcast Corrections
1707 // ---------------------
1708 if (sender() == 0 ||
1709 sender() == _corrPathLineEdit || sender() == _corrPortLineEdit) {
1710 if (!_corrPathLineEdit->text().isEmpty() ||
1711 !_corrPortLineEdit->text().isEmpty()) {
1712 _corrIntrComboBox->setStyleSheet("background-color: white");
1713 _corrIntrComboBox->setEnabled(true);
1714 }
1715 else {
1716 _corrIntrComboBox->setStyleSheet("background-color: white");
1717 _corrIntrComboBox->setEnabled(true);
1718 }
1719 }
1720
1721 // Feed Engine
1722 // -----------
1723 if (sender() == 0 ||
1724 sender() == _outPortLineEdit || sender() == _outFileLineEdit) {
1725 if ( !_outPortLineEdit->text().isEmpty() ||
1726 !_outFileLineEdit->text().isEmpty()) {
1727 _waitTimeSpinBox->setStyleSheet("background-color: white");
1728 _binSamplSpinBox->setStyleSheet("background-color: white");
1729 _waitTimeSpinBox->setEnabled(true);
1730 _binSamplSpinBox->setEnabled(true);
1731 }
1732 else {
1733 _waitTimeSpinBox->setStyleSheet("background-color: lightGray");
1734 _binSamplSpinBox->setStyleSheet("background-color: lightGray");
1735 _waitTimeSpinBox->setEnabled(false);
1736 _binSamplSpinBox->setEnabled(false);
1737 }
1738 }
1739
1740 // Serial Output
1741 // -------------
1742 if (sender() == 0 || sender() == _serialMountPointLineEdit ||
1743 sender() == _serialAutoNMEAComboBox) {
1744 if (!_serialMountPointLineEdit->text().isEmpty()) {
1745 _serialPortNameLineEdit->setStyleSheet("background-color: white");
1746 _serialBaudRateComboBox->setStyleSheet("background-color: white");
1747 _serialParityComboBox->setStyleSheet("background-color: white");
1748 _serialDataBitsComboBox->setStyleSheet("background-color: white");
1749 _serialStopBitsComboBox->setStyleSheet("background-color: white");
1750 _serialFlowControlComboBox->setStyleSheet("background-color: white");
1751 _serialAutoNMEAComboBox->setStyleSheet("background-color: white");
1752 _serialPortNameLineEdit->setEnabled(true);
1753 _serialBaudRateComboBox->setEnabled(true);
1754 _serialParityComboBox->setEnabled(true);
1755 _serialDataBitsComboBox->setEnabled(true);
1756 _serialStopBitsComboBox->setEnabled(true);
1757 _serialFlowControlComboBox->setEnabled(true);
1758 _serialAutoNMEAComboBox->setEnabled(true);
1759 if (_serialAutoNMEAComboBox->currentText() != "Auto" ) {
1760 _serialHeightNMEALineEdit->setStyleSheet("background-color: white");
1761 _serialHeightNMEALineEdit->setEnabled(true);
1762 _serialFileNMEALineEdit->setStyleSheet("background-color: lightGray");
1763 _serialFileNMEALineEdit->setEnabled(false);
1764 }
1765 else {
1766 _serialHeightNMEALineEdit->setStyleSheet("background-color: lightGray");
1767 _serialHeightNMEALineEdit->setEnabled(false);
1768 _serialFileNMEALineEdit->setStyleSheet("background-color: white");
1769 _serialFileNMEALineEdit->setEnabled(true);
1770 }
1771 }
1772 else {
1773 _serialPortNameLineEdit->setStyleSheet("background-color: lightGray");
1774 _serialBaudRateComboBox->setStyleSheet("background-color: lightGray");
1775 _serialParityComboBox->setStyleSheet("background-color: lightGray");
1776 _serialDataBitsComboBox->setStyleSheet("background-color: lightGray");
1777 _serialStopBitsComboBox->setStyleSheet("background-color: lightGray");
1778 _serialFlowControlComboBox->setStyleSheet("background-color: lightGray");
1779 _serialAutoNMEAComboBox->setStyleSheet("background-color: lightGray");
1780 _serialFileNMEALineEdit->setStyleSheet("background-color: lightGray");
1781 _serialHeightNMEALineEdit->setStyleSheet("background-color: lightGray");
1782 _serialPortNameLineEdit->setEnabled(false);
1783 _serialBaudRateComboBox->setEnabled(false);
1784 _serialParityComboBox->setEnabled(false);
1785 _serialDataBitsComboBox->setEnabled(false);
1786 _serialStopBitsComboBox->setEnabled(false);
1787 _serialFlowControlComboBox->setEnabled(false);
1788 _serialAutoNMEAComboBox->setEnabled(false);
1789 _serialHeightNMEALineEdit->setEnabled(false);
1790 _serialFileNMEALineEdit->setEnabled(false);
1791 }
1792 }
1793
1794 // Outages
1795 // -------
1796 if (sender() == 0 || sender() == _obsRateComboBox) {
1797 if (!_obsRateComboBox->currentText().isEmpty()) {
1798 _adviseScriptLineEdit->setStyleSheet("background-color: white");
1799 _adviseFailSpinBox->setStyleSheet("background-color: white");
1800 _adviseRecoSpinBox->setStyleSheet("background-color: white");
1801 _adviseFailSpinBox->setEnabled(true);
1802 _adviseRecoSpinBox->setEnabled(true);
1803 _adviseScriptLineEdit->setEnabled(true);
1804 } else {
1805 _adviseScriptLineEdit->setStyleSheet("background-color: lightGray");
1806 _adviseFailSpinBox->setStyleSheet("background-color: lightGray");
1807 _adviseRecoSpinBox->setStyleSheet("background-color: lightGray");
1808 _adviseFailSpinBox->setEnabled(false);
1809 _adviseRecoSpinBox->setEnabled(false);
1810 _adviseScriptLineEdit->setEnabled(false);
1811 }
1812 }
1813
1814 // Miscellaneous
1815 // -------------
1816 if (sender() == 0 || sender() == _miscMountLineEdit) {
1817 if (!_miscMountLineEdit->text().isEmpty()) {
1818 _perfIntrComboBox->setStyleSheet("background-color: white");
1819 _scanRTCMCheckBox->setPalette(palette_white);
1820 _perfIntrComboBox->setEnabled(true);
1821 _scanRTCMCheckBox->setEnabled(true);
1822 } else {
1823 _perfIntrComboBox->setStyleSheet("background-color: lightGray");
1824 _scanRTCMCheckBox->setPalette(palette_gray);
1825 _perfIntrComboBox->setEnabled(false);
1826 _scanRTCMCheckBox->setEnabled(false);
1827 }
1828 }
1829
1830 // PPP Client
1831 // ----------
1832 if (sender() == 0
1833 || sender() == _pppMountLineEdit
1834 || sender() == _pppCorrMountLineEdit
1835 || sender() == _pppRefCrdXLineEdit
1836 || sender() == _pppRefCrdYLineEdit
1837 || sender() == _pppRefCrdZLineEdit
1838 || sender() == _pppSync
1839 || sender() == _pppSPPComboBox
1840 || sender() == _pppQuickStartLineEdit
1841 || sender() == _pppEstTropoCheckBox
1842 || sender() == _pppUsePhaseCheckBox
1843 || sender() == _pppAntexLineEdit ) {
1844 if ((!_pppMountLineEdit->text().isEmpty() &&
1845 !_pppCorrMountLineEdit->text().isEmpty()) ||
1846 ( !_pppMountLineEdit->text().isEmpty() &&
1847 _pppSPPComboBox->currentText() == "SPP")) {
1848 _pppSPPComboBox->setPalette(palette_white);
1849 _pppNMEALineEdit->setPalette(palette_white);
1850 _pppNMEAPortLineEdit->setPalette(palette_white);
1851 _pppRefCrdXLineEdit->setPalette(palette_white);
1852 _pppRefCrdYLineEdit->setPalette(palette_white);
1853 _pppRefCrdZLineEdit->setPalette(palette_white);
1854 _pppUsePhaseCheckBox->setPalette(palette_white);
1855 _pppPlotCoordinates->setPalette(palette_white);
1856 _pppEstTropoCheckBox->setPalette(palette_white);
1857 _pppGLONASSCheckBox->setPalette(palette_white);
1858 _pppGalileoCheckBox->setPalette(palette_white);
1859 _pppAntexLineEdit->setPalette(palette_white);
1860 _pppSPPComboBox->setEnabled(true);
1861 _pppNMEALineEdit->setEnabled(true);
1862 _pppNMEAPortLineEdit->setEnabled(true);
1863 _pppRefCrdXLineEdit->setEnabled(true);
1864 _pppRefCrdYLineEdit->setEnabled(true);
1865 _pppRefCrdZLineEdit->setEnabled(true);
1866 _pppUsePhaseCheckBox->setEnabled(true);
1867 _pppPlotCoordinates->setEnabled(true);
1868 _pppEstTropoCheckBox->setEnabled(true);
1869 _pppGLONASSCheckBox->setEnabled(true);
1870 _pppGalileoCheckBox->setEnabled(true);
1871 _pppRefCrdXLineEdit->setPalette(palette_white);
1872 _pppRefCrdYLineEdit->setPalette(palette_white);
1873 _pppRefCrdZLineEdit->setPalette(palette_white);
1874 _pppAntexLineEdit->setEnabled(true);
1875 if (!_pppRefCrdXLineEdit->text().isEmpty() &&
1876 !_pppRefCrdYLineEdit->text().isEmpty() &&
1877 !_pppRefCrdZLineEdit->text().isEmpty()) {
1878 _pppAverageLineEdit->setPalette(palette_white);
1879 _pppQuickStartLineEdit->setPalette(palette_white);
1880 _pppAverageLineEdit->setEnabled(true);
1881 _pppQuickStartLineEdit->setEnabled(true);
1882 }
1883 else {
1884 _pppAverageLineEdit->setPalette(palette_gray);
1885 _pppQuickStartLineEdit->setPalette(palette_gray);
1886 _pppAverageLineEdit->setEnabled(false);
1887 _pppQuickStartLineEdit->setEnabled(false);
1888 }
1889 if (!_pppRefCrdXLineEdit->text().isEmpty() &&
1890 !_pppRefCrdYLineEdit->text().isEmpty() &&
1891 !_pppRefCrdZLineEdit->text().isEmpty() &&
1892 !_pppQuickStartLineEdit->text().isEmpty()) {
1893 _pppMaxSolGapLineEdit->setPalette(palette_white);
1894 _pppMaxSolGapLineEdit->setEnabled(true);
1895 }
1896 else {
1897 _pppMaxSolGapLineEdit->setPalette(palette_gray);
1898 _pppMaxSolGapLineEdit->setEnabled(false);
1899 }
1900 if (!_pppAntexLineEdit->text().isEmpty() ) {
1901 _pppAntennaLineEdit->setEnabled(true);
1902 _pppApplySatAntCheckBox->setEnabled(true);
1903 _pppAntennaLineEdit->setPalette(palette_white);
1904 _pppApplySatAntCheckBox->setPalette(palette_white);
1905 }
1906 else {
1907 _pppAntennaLineEdit->setEnabled(false);
1908 _pppApplySatAntCheckBox->setEnabled(false);
1909 _pppAntennaLineEdit->setPalette(palette_gray);
1910 _pppApplySatAntCheckBox->setPalette(palette_gray);
1911 }
1912 _pppSigCLineEdit->setPalette(palette_white);
1913 _pppSigCLineEdit->setEnabled(true);
1914 _pppSigCrd0->setPalette(palette_white);
1915 _pppSigCrd0->setEnabled(true);
1916 _pppSigCrdP->setPalette(palette_white);
1917 _pppSigCrdP->setEnabled(true);
1918 if (_pppEstTropoCheckBox->isChecked()
1919 && !_pppMountLineEdit->text().isEmpty()) {
1920 _pppSigTrp0->setPalette(palette_white);
1921 _pppSigTrp0->setEnabled(true);
1922 _pppSigTrpP->setPalette(palette_white);
1923 _pppSigTrpP->setEnabled(true);
1924 }
1925 else {
1926 _pppSigTrp0->setPalette(palette_gray);
1927 _pppSigTrp0->setEnabled(false);
1928 _pppSigTrpP->setPalette(palette_gray);
1929 _pppSigTrpP->setEnabled(false);
1930 }
1931 if (_pppUsePhaseCheckBox->isChecked()
1932 && !_pppMountLineEdit->text().isEmpty()) {
1933 _pppSigPLineEdit->setPalette(palette_white);
1934 _pppSigPLineEdit->setEnabled(true);
1935 }
1936 else {
1937 _pppSigPLineEdit->setPalette(palette_gray);
1938 _pppSigPLineEdit->setEnabled(false);
1939 }
1940 if (_pppSPPComboBox->currentText() == "PPP") {
1941 _pppSync->setPalette(palette_white);
1942 _pppSync->setEnabled(true);
1943 }
1944 else {
1945 _pppSync->setPalette(palette_gray);
1946 _pppSync->setEnabled(false);
1947 }
1948 } else {
1949 _pppSPPComboBox->setPalette(palette_gray);
1950 _pppNMEALineEdit->setPalette(palette_gray);
1951 _pppNMEAPortLineEdit->setPalette(palette_gray);
1952 _pppRefCrdXLineEdit->setPalette(palette_gray);
1953 _pppRefCrdYLineEdit->setPalette(palette_gray);
1954 _pppRefCrdZLineEdit->setPalette(palette_gray);
1955 _pppSync->setPalette(palette_gray);
1956 _pppUsePhaseCheckBox->setPalette(palette_gray);
1957 _pppPlotCoordinates->setPalette(palette_gray);
1958 _pppEstTropoCheckBox->setPalette(palette_gray);
1959 _pppGLONASSCheckBox->setPalette(palette_gray);
1960 _pppGalileoCheckBox->setPalette(palette_gray);
1961 _pppSigCLineEdit->setPalette(palette_gray);
1962 _pppSigPLineEdit->setPalette(palette_gray);
1963 _pppSigCrd0->setPalette(palette_gray);
1964 _pppSigCrdP->setPalette(palette_gray);
1965 _pppSigTrp0->setPalette(palette_gray);
1966 _pppSigTrpP->setPalette(palette_gray);
1967 _pppAverageLineEdit->setPalette(palette_gray);
1968 _pppQuickStartLineEdit->setPalette(palette_gray);
1969 _pppMaxSolGapLineEdit->setPalette(palette_gray);
1970 _pppAntexLineEdit->setPalette(palette_white);
1971 _pppAntennaLineEdit->setPalette(palette_gray);
1972 _pppApplySatAntCheckBox->setPalette(palette_gray);
1973 _pppSPPComboBox->setEnabled(false);
1974 _pppNMEALineEdit->setEnabled(false);
1975 _pppNMEAPortLineEdit->setEnabled(false);
1976 _pppRefCrdXLineEdit->setEnabled(false);
1977 _pppRefCrdYLineEdit->setEnabled(false);
1978 _pppRefCrdZLineEdit->setEnabled(false);
1979 _pppSync->setEnabled(false);
1980 _pppUsePhaseCheckBox->setEnabled(false);
1981 _pppPlotCoordinates->setEnabled(false);
1982 _pppEstTropoCheckBox->setEnabled(false);
1983 _pppGLONASSCheckBox->setEnabled(false);
1984 _pppGalileoCheckBox->setEnabled(false);
1985 _pppSigCLineEdit->setEnabled(false);
1986 _pppSigPLineEdit->setEnabled(false);
1987 _pppSigCrd0->setEnabled(false);
1988 _pppSigCrdP->setEnabled(false);
1989 _pppSigTrp0->setEnabled(false);
1990 _pppSigTrpP->setEnabled(false);
1991 _pppAverageLineEdit->setEnabled(false);
1992 _pppQuickStartLineEdit->setEnabled(false);
1993 _pppMaxSolGapLineEdit->setEnabled(false);
1994 _pppAntexLineEdit->setEnabled(true);
1995 _pppAntennaLineEdit->setEnabled(false);
1996 _pppApplySatAntCheckBox->setEnabled(false);
1997 }
1998//
1999 if (_pppMountLineEdit->text().isEmpty()) {
2000 _pppCorrMountLineEdit->setPalette(palette_gray);
2001 _pppCorrMountLineEdit->setEnabled(false);
2002 } else {
2003 _pppCorrMountLineEdit->setPalette(palette_white);
2004 _pppCorrMountLineEdit->setEnabled(true);
2005 if (_pppCorrMountLineEdit->text().isEmpty()) {
2006 _pppSPPComboBox->setPalette(palette_white);
2007 _pppSPPComboBox->setEnabled(true);
2008 }
2009 }
2010 if (_pppSPPComboBox->currentText() == "SPP") {
2011 _pppCorrMountLineEdit->setPalette(palette_gray);
2012 _pppCorrMountLineEdit->setEnabled(false);
2013 }
2014 }
2015
2016 // Combination
2017 // ----------
2018 if (sender() == 0
2019 || sender() == _cmbTable
2020 || sender() == _cmbMountpointLineEdit) {
2021 if (_cmbTable->rowCount() > 0) {
2022 _cmbMountpointLineEdit->setPalette(palette_white);
2023 _cmbSP3PathLineEdit->setPalette(palette_white);
2024 _cmbMountpointLineEdit->setEnabled(true);
2025 _cmbSP3PathLineEdit->setEnabled(true);
2026 if (!_cmbMountpointLineEdit->text().isEmpty()) {
2027 _cmbOutHostLineEdit->setPalette(palette_white);
2028 _cmbOutPortLineEdit->setPalette(palette_white);
2029 _cmbPasswordLineEdit->setPalette(palette_white);
2030 _cmbOutPathLineEdit->setPalette(palette_white);
2031 _cmbOutHostLineEdit->setEnabled(true);
2032 _cmbOutPortLineEdit->setEnabled(true);
2033 _cmbPasswordLineEdit->setEnabled(true);
2034 _cmbOutPathLineEdit->setEnabled(true);
2035 } else {
2036 _cmbOutHostLineEdit->setPalette(palette_gray);
2037 _cmbOutPortLineEdit->setPalette(palette_gray);
2038 _cmbPasswordLineEdit->setPalette(palette_gray);
2039 _cmbOutPathLineEdit->setPalette(palette_gray);
2040 _cmbOutHostLineEdit->setEnabled(false);
2041 _cmbOutPortLineEdit->setEnabled(false);
2042 _cmbPasswordLineEdit->setEnabled(false);
2043 _cmbOutPathLineEdit->setEnabled(false);
2044 }
2045 } else {
2046 _cmbMountpointLineEdit->setPalette(palette_gray);
2047 _cmbOutHostLineEdit->setPalette(palette_gray);
2048 _cmbOutPortLineEdit->setPalette(palette_gray);
2049 _cmbPasswordLineEdit->setPalette(palette_gray);
2050 _cmbOutPathLineEdit->setPalette(palette_gray);
2051 _cmbSP3PathLineEdit->setPalette(palette_gray);
2052 _cmbMountpointLineEdit->setEnabled(false);
2053 _cmbOutHostLineEdit->setEnabled(false);
2054 _cmbOutPortLineEdit->setEnabled(false);
2055 _cmbPasswordLineEdit->setEnabled(false);
2056 _cmbOutPathLineEdit->setEnabled(false);
2057 _cmbSP3PathLineEdit->setEnabled(false);
2058 }
2059 }
2060}
2061
2062//
2063////////////////////////////////////////////////////////////////////////////
2064void bncWindow::slotAddCmbRow() {
2065 int iRow = _cmbTable->rowCount();
2066 _cmbTable->insertRow(iRow);
2067 for (int iCol = 0; iCol < _cmbTable->columnCount(); iCol++) {
2068 _cmbTable->setItem(iRow, iCol, new QTableWidgetItem(""));
2069 }
2070}
2071
2072//
2073////////////////////////////////////////////////////////////////////////////
2074void bncWindow::slotDelCmbRow() {
2075 int nRows = _cmbTable->rowCount();
2076 bool flg[nRows];
2077 for (int iRow = 0; iRow < nRows; iRow++) {
2078 if (_cmbTable->isItemSelected(_cmbTable->item(iRow,1))) {
2079 flg[iRow] = true;
2080 }
2081 else {
2082 flg[iRow] = false;
2083 }
2084 }
2085 for (int iRow = nRows-1; iRow >= 0; iRow--) {
2086 if (flg[iRow]) {
2087 _cmbTable->removeRow(iRow);
2088 }
2089 }
2090}
2091
2092//
2093////////////////////////////////////////////////////////////////////////////
2094void bncWindow::populateCmbTable() {
2095
2096 for (int iRow = _cmbTable->rowCount()-1; iRow >=0; iRow--) {
2097 _cmbTable->removeRow(iRow);
2098 }
2099
2100 bncSettings settings;
2101
2102 int iRow = -1;
2103 QListIterator<QString> it(settings.value("combineStreams").toStringList());
2104 while (it.hasNext()) {
2105 QStringList hlp = it.next().split(" ");
2106 if (hlp.size() > 2) {
2107 ++iRow;
2108 _cmbTable->insertRow(iRow);
2109 }
2110 for (int iCol = 0; iCol < hlp.size(); iCol++) {
2111 _cmbTable->setItem(iRow, iCol, new QTableWidgetItem(hlp[iCol]));
2112 }
2113 }
2114}
Note: See TracBrowser for help on using the repository browser.