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

Last change on this file since 1503 was 1503, checked in by weber, 15 years ago

* empty log message *

File size: 67.4 KB
RevLine 
[280]1// Part of BNC, a utility for retrieving decoding and
[464]2// converting GNSS data streams from NTRIP broadcasters.
[280]3//
[464]4// Copyright (C) 2007
[280]5// German Federal Agency for Cartography and Geodesy (BKG)
6// http://www.bkg.bund.de
[464]7// Czech Technical University Prague, Department of Geodesy
[280]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.
[35]24
25/* -------------------------------------------------------------------------
[93]26 * BKG NTRIP Client
[35]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
[1175]41#include <iostream>
42
[274]43#include <unistd.h>
[35]44#include "bncwindow.h"
[149]45#include "bncapp.h"
[35]46#include "bncgetthread.h"
47#include "bnctabledlg.h"
[177]48#include "bnchlpdlg.h"
[168]49#include "bnchtml.h"
[366]50#include "bnctableitem.h"
[35]51
52using namespace std;
53
54// Constructor
55////////////////////////////////////////////////////////////////////////////
56bncWindow::bncWindow() {
57
[609]58 _caster = 0;
59
[91]60 int ww = QFontMetrics(this->font()).width('w');
[199]61
[1409]62 static const QStringList labels = QString("account, Streams: broadcaster:port/mountpoint,decoder,lat,long,nmea,ntrip,bytes").split(",");
[35]63
[1438]64 setMinimumSize(85*ww, 65*ww);
[375]65
[1292]66 setWindowTitle(tr("BKG Ntrip Client (BNC) Version 1.7"));
[91]67
[1299]68 connect((bncApp*)qApp, SIGNAL(newMessage(QByteArray,bool)),
69 this, SLOT(slotWindowMessage(QByteArray,bool)));
[1171]70
[1439]71 QPalette palette;
[1443]72 QColor lightGray(230, 230, 230);
[1439]73
[35]74 // Create Actions
75 // --------------
[108]76 _actHelp = new QAction(tr("&Help Contents"),this);
77 connect(_actHelp, SIGNAL(triggered()), SLOT(slotHelp()));
[35]78
[108]79 _actAbout = new QAction(tr("&About BNC"),this);
80 connect(_actAbout, SIGNAL(triggered()), SLOT(slotAbout()));
81
[996]82 _actFlowchart = new QAction(tr("&Flow Chart"),this);
[989]83 connect(_actFlowchart, SIGNAL(triggered()), SLOT(slotFlowchart()));
84
[261]85 _actFontSel = new QAction(tr("Select &Font"),this);
[110]86 connect(_actFontSel, SIGNAL(triggered()), SLOT(slotFontSel()));
87
[1202]88 _actSaveOpt = new QAction(tr("&Save && Activate Options"),this);
[35]89 connect(_actSaveOpt, SIGNAL(triggered()), SLOT(slotSaveOptions()));
90
[1487]91 _actResetOpt = new QAction(tr("&Reset Options"),this);
92 connect(_actResetOpt, SIGNAL(triggered()), SLOT(slotResetOptions()));
93
[35]94 _actQuit = new QAction(tr("&Quit"),this);
95 connect(_actQuit, SIGNAL(triggered()), SLOT(close()));
96
[1409]97 _actAddMountPoints = new QAction(tr("Add &Streams"),this);
[35]98 connect(_actAddMountPoints, SIGNAL(triggered()), SLOT(slotAddMountPoints()));
99
[1409]100 _actDeleteMountPoints = new QAction(tr("&Delete Streams"),this);
[35]101 connect(_actDeleteMountPoints, SIGNAL(triggered()), SLOT(slotDeleteMountPoints()));
[83]102 _actDeleteMountPoints->setEnabled(false);
[35]103
[182]104 _actGetData = new QAction(tr("Sta&rt"),this);
[35]105 connect(_actGetData, SIGNAL(triggered()), SLOT(slotGetData()));
106
[182]107 _actStop = new QAction(tr("Sto&p"),this);
108 connect(_actStop, SIGNAL(triggered()), SLOT(slotStop()));
109 _actStop->setEnabled(false);
110
[402]111 _actwhatsthis= new QAction(tr("Help=Shift+F1"),this);
[399]112 connect(_actwhatsthis, SIGNAL(triggered()), SLOT(slotWhatsThis()));
113
[679]114 CreateMenu();
115 AddToolbar();
[35]116
117 QSettings settings;
118 _proxyHostLineEdit = new QLineEdit(settings.value("proxyHost").toString());
119 _proxyPortLineEdit = new QLineEdit(settings.value("proxyPort").toString());
[83]120 _proxyPortLineEdit->setMaximumWidth(9*ww);
[1307]121 _miscMountLineEdit = new QLineEdit(settings.value("miscMount").toString());
122 _scanRTCMCheckBox = new QCheckBox();
123 _scanRTCMCheckBox->setCheckState(Qt::CheckState(
124 settings.value("scanRTCM").toInt()));
[135]125 _waitTimeSpinBox = new QSpinBox();
[139]126 _waitTimeSpinBox->setMinimum(1);
[135]127 _waitTimeSpinBox->setMaximum(30);
128 _waitTimeSpinBox->setSingleStep(1);
129 _waitTimeSpinBox->setSuffix(" sec");
130 _waitTimeSpinBox->setMaximumWidth(9*ww);
131 _waitTimeSpinBox->setValue(settings.value("waitTime").toInt());
[35]132 _outFileLineEdit = new QLineEdit(settings.value("outFile").toString());
133 _outPortLineEdit = new QLineEdit(settings.value("outPort").toString());
[83]134 _outPortLineEdit->setMaximumWidth(9*ww);
[1222]135 _outUPortLineEdit = new QLineEdit(settings.value("outUPort").toString());
136 _outUPortLineEdit->setMaximumWidth(9*ww);
[588]137 _outEphPortLineEdit = new QLineEdit(settings.value("outEphPort").toString());
138 _outEphPortLineEdit->setMaximumWidth(9*ww);
[934]139 _corrPortLineEdit = new QLineEdit(settings.value("corrPort").toString());
140 _corrPortLineEdit->setMaximumWidth(9*ww);
[83]141 _rnxPathLineEdit = new QLineEdit(settings.value("rnxPath").toString());
[533]142 _ephPathLineEdit = new QLineEdit(settings.value("ephPath").toString());
[938]143 _corrPathLineEdit = new QLineEdit(settings.value("corrPath").toString());
[565]144
[533]145 _rnxV3CheckBox = new QCheckBox();
146 _rnxV3CheckBox->setCheckState(Qt::CheckState(settings.value("rnxV3").toInt()));
147 _ephV3CheckBox = new QCheckBox();
148 _ephV3CheckBox->setCheckState(Qt::CheckState(settings.value("ephV3").toInt()));
[106]149 _rnxScrpLineEdit = new QLineEdit(settings.value("rnxScript").toString());
[83]150 _rnxSkelLineEdit = new QLineEdit(settings.value("rnxSkel").toString());
151 _rnxSkelLineEdit->setMaximumWidth(5*ww);
[259]152 _rnxAppendCheckBox = new QCheckBox();
153 _rnxAppendCheckBox->setCheckState(Qt::CheckState(
154 settings.value("rnxAppend").toInt()));
[1333]155 _autoStartCheckBox = new QCheckBox();
156 _autoStartCheckBox->setCheckState(Qt::CheckState(
157 settings.value("autoStart").toInt()));
[106]158 _rnxIntrComboBox = new QComboBox();
159 _rnxIntrComboBox->setMaximumWidth(9*ww);
160 _rnxIntrComboBox->setEditable(false);
[405]161 _rnxIntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
[106]162 int ii = _rnxIntrComboBox->findText(settings.value("rnxIntr").toString());
163 if (ii != -1) {
164 _rnxIntrComboBox->setCurrentIndex(ii);
165 }
[1170]166 _onTheFlyComboBox = new QComboBox();
167 _onTheFlyComboBox->setMaximumWidth(9*ww);
168 _onTheFlyComboBox->setEditable(false);
[1189]169 _onTheFlyComboBox->addItems(QString("1 day,1 hour,1 min").split(","));
[1170]170 ii = _onTheFlyComboBox->findText(settings.value("onTheFlyInterval").toString());
171 if (ii != -1) {
172 _onTheFlyComboBox->setCurrentIndex(ii);
173 }
[560]174 _ephIntrComboBox = new QComboBox();
175 _ephIntrComboBox->setMaximumWidth(9*ww);
176 _ephIntrComboBox->setEditable(false);
[647]177 _ephIntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
[560]178 int jj = _ephIntrComboBox->findText(settings.value("ephIntr").toString());
179 if (jj != -1) {
180 _ephIntrComboBox->setCurrentIndex(jj);
181 }
[934]182 _corrIntrComboBox = new QComboBox();
183 _corrIntrComboBox->setMaximumWidth(9*ww);
184 _corrIntrComboBox->setEditable(false);
185 _corrIntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
186 int mm = _corrIntrComboBox->findText(settings.value("corrIntr").toString());
187 if (mm != -1) {
188 _corrIntrComboBox->setCurrentIndex(mm);
189 }
[967]190 _corrTimeSpinBox = new QSpinBox();
[1035]191 _corrTimeSpinBox->setMinimum(1);
[967]192 _corrTimeSpinBox->setMaximum(30);
193 _corrTimeSpinBox->setSingleStep(1);
194 _corrTimeSpinBox->setSuffix(" sec");
195 _corrTimeSpinBox->setMaximumWidth(9*ww);
196 _corrTimeSpinBox->setValue(settings.value("corrTime").toInt());
[106]197 _rnxSamplSpinBox = new QSpinBox();
198 _rnxSamplSpinBox->setMinimum(0);
199 _rnxSamplSpinBox->setMaximum(60);
200 _rnxSamplSpinBox->setSingleStep(5);
[107]201 _rnxSamplSpinBox->setMaximumWidth(9*ww);
[106]202 _rnxSamplSpinBox->setValue(settings.value("rnxSampl").toInt());
[135]203 _rnxSamplSpinBox->setSuffix(" sec");
[740]204
205 _binSamplSpinBox = new QSpinBox();
206 _binSamplSpinBox->setMinimum(0);
207 _binSamplSpinBox->setMaximum(60);
208 _binSamplSpinBox->setSingleStep(5);
209 _binSamplSpinBox->setMaximumWidth(9*ww);
210 _binSamplSpinBox->setValue(settings.value("binSampl").toInt());
211 _binSamplSpinBox->setSuffix(" sec");
212
[686]213 _obsRateComboBox = new QComboBox();
214 _obsRateComboBox->setMaximumWidth(9*ww);
215 _obsRateComboBox->setEditable(false);
[692]216 _obsRateComboBox->addItems(QString(",0.1 Hz,0.2 Hz,0.5 Hz,1 Hz,5 Hz").split(","));
[686]217 int kk = _obsRateComboBox->findText(settings.value("obsRate").toString());
218 if (kk != -1) {
219 _obsRateComboBox->setCurrentIndex(kk);
220 }
[723]221 _makePauseCheckBox = new QCheckBox();
222 _makePauseCheckBox->setCheckState(Qt::CheckState(
223 settings.value("makePause").toInt()));
[668]224 _adviseRecoSpinBox = new QSpinBox();
225 _adviseRecoSpinBox->setMinimum(0);
226 _adviseRecoSpinBox->setMaximum(60);
227 _adviseRecoSpinBox->setSingleStep(1);
228 _adviseRecoSpinBox->setSuffix(" min");
229 _adviseRecoSpinBox->setMaximumWidth(9*ww);
[670]230 _adviseRecoSpinBox->setValue(settings.value("adviseReco").toInt());
[668]231 _adviseFailSpinBox = new QSpinBox();
232 _adviseFailSpinBox->setMinimum(0);
233 _adviseFailSpinBox->setMaximum(60);
234 _adviseFailSpinBox->setSingleStep(1);
235 _adviseFailSpinBox->setSuffix(" min");
236 _adviseFailSpinBox->setMaximumWidth(9*ww);
[670]237 _adviseFailSpinBox->setValue(settings.value("adviseFail").toInt());
[143]238 _logFileLineEdit = new QLineEdit(settings.value("logFile").toString());
[670]239 _adviseScriptLineEdit = new QLineEdit(settings.value("adviseScript").toString());
[1329]240
[1327]241 _serialPortNameLineEdit = new QLineEdit(settings.value("serialPortName").toString());
242 _serialMountPointLineEdit = new QLineEdit(settings.value("serialMountPoint").toString());
[709]243
[1439]244
[1329]245 _serialBaudRateComboBox = new QComboBox();
[1339]246 _serialBaudRateComboBox->setMaximumWidth(9*ww);
[1332]247 _serialBaudRateComboBox->addItems(QString("110,300,600,"
248 "1200,2400,4800,9600,19200,38400,57600,115200").split(","));
[1329]249 kk = _serialBaudRateComboBox->findText(settings.value("serialBaudRate").toString());
250 if (kk != -1) {
251 _serialBaudRateComboBox->setCurrentIndex(kk);
252 }
253 _serialParityComboBox = new QComboBox();
[1339]254 _serialParityComboBox->setMaximumWidth(9*ww);
[1332]255 _serialParityComboBox->addItems(QString("NONE,ODD,EVEN,SPACE").split(","));
[1329]256 kk = _serialParityComboBox->findText(settings.value("serialParity").toString());
257 if (kk != -1) {
258 _serialParityComboBox->setCurrentIndex(kk);
259 }
260 _serialDataBitsComboBox = new QComboBox();
[1339]261 _serialDataBitsComboBox->setMaximumWidth(5*ww);
[1329]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 _serialStopBitsComboBox = new QComboBox();
[1339]268 _serialStopBitsComboBox->setMaximumWidth(5*ww);
[1329]269 _serialStopBitsComboBox->addItems(QString("1,2").split(","));
270 kk = _serialStopBitsComboBox->findText(settings.value("serialStopBits").toString());
271 if (kk != -1) {
272 _serialStopBitsComboBox->setCurrentIndex(kk);
273 }
[1340]274 _serialAutoNMEACheckBox = new QCheckBox();
275 _serialAutoNMEACheckBox->setCheckState(Qt::CheckState(
276 settings.value("serialAutoNMEA").toInt()));
[1329]277
[728]278 _perfIntrComboBox = new QComboBox();
279 _perfIntrComboBox->setMaximumWidth(9*ww);
280 _perfIntrComboBox->setEditable(false);
[1472]281 _perfIntrComboBox->addItems(QString(",2 sec, 10 sec,1 min,5 min,15 min,1 hour,6 hours,1 day").split(","));
[728]282 int ll = _perfIntrComboBox->findText(settings.value("perfIntr").toString());
[709]283 if (ll != -1) {
[728]284 _perfIntrComboBox->setCurrentIndex(ll);
[709]285 }
286
[1352]287 _mountPointsTable = new QTableWidget(0,8);
[375]288
[679]289 _mountPointsTable->horizontalHeader()->resizeSection(1,34*ww);
[366]290 _mountPointsTable->horizontalHeader()->resizeSection(2,9*ww);
291 _mountPointsTable->horizontalHeader()->resizeSection(3,7*ww);
292 _mountPointsTable->horizontalHeader()->resizeSection(4,7*ww);
293 _mountPointsTable->horizontalHeader()->resizeSection(5,5*ww);
[1352]294 _mountPointsTable->horizontalHeader()->resizeSection(6,4*ww);
[199]295 _mountPointsTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
[203]296 _mountPointsTable->horizontalHeader()->setStretchLastSection(true);
[199]297 _mountPointsTable->setHorizontalHeaderLabels(labels);
[115]298 _mountPointsTable->setGridStyle(Qt::NoPen);
299 _mountPointsTable->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
[35]300 _mountPointsTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
301 _mountPointsTable->setSelectionBehavior(QAbstractItemView::SelectRows);
[111]302 _mountPointsTable->hideColumn(0);
[83]303 connect(_mountPointsTable, SIGNAL(itemSelectionChanged()),
304 SLOT(slotSelectionChanged()));
[1178]305 populateMountPointsTable();
[35]306
[399]307 _log = new QTextBrowser();
[83]308 _log->setReadOnly(true);
[35]309
[683]310 // WhatsThis
311 // ---------
[684]312 _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>"));
[1442]313 _proxyPortLineEdit->setWhatsThis(tr("<p>Enter your proxy server port number in case a proxy is operated in front of BNC.</p>"));
[1467]314 _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>"));
[683]315 _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."));
[743]316 _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."));
[1231]317 _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."));
[683]318 _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."));
[951]319 _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."));
[1035]320 _corrTimeSpinBox->setWhatsThis(tr("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."));
[683]321 _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."));
322 _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."));
[968]323 _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."));
[1440]324 _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>"));
325 _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. A file in the RINEX 'Directory' with the RINEX 'Skeleton extension' is interpreted by BNC as a personal RINEX header skeleton file for the corresponding stream.</p>"));
[683]326 _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>"));
[1333]327 _autoStartCheckBox->setWhatsThis(tr("<p>Tick 'Auto start' for auto-start of BNC at startup time in window mode with preassigned processing options.</p>"));
[1204]328 _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 & Activate Options'.</p>"));
[683]329 _rnxIntrComboBox->setWhatsThis(tr("<p>Select the length of the RINEX Observation file.</p>"));
330 _ephIntrComboBox->setWhatsThis(tr("<p>Select the length of the RINEX Navigation file.</p>"));
[951]331 _corrIntrComboBox->setWhatsThis(tr("<p>Select the length of the Broadcast Ephemeris Correction files.</p>"));
[683]332 _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>"));
[1440]333 _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>"));
[1453]334 _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>"));
[1440]335 _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>"));
336 _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>"));
[1453]337 _makePauseCheckBox->setWhatsThis(tr("<p>In case of a continuously corrupted stream, the decoding process can be paused and decodings are then attempted again at decreasing rate till the stream hopefully recovers. Tick 'Pause' to activate this function.</p><p>Do not tick 'Pause' (default) in order to prevent BNC from making any decoding pause. Be aware that this may incur an unnecessary workload.</p>"));
[1409]338 _logFileLineEdit->setWhatsThis(tr("Records of BNC's activities are shown in the 'Logs' section 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."));
[1440]339 _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 can be configured to send an 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>"));
[1409]340 _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 'Logs' section 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>"));
341 _mountPointsTable->setWhatsThis(tr("<p>Streams selected for retrieval are listed in the 'Streams' section. Clicking on 'Add Streams' 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 Streams' 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>"));
342 _log->setWhatsThis(tr("Records of BNC's activities are shown in the 'Logs' section. 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."));
[1454]343 _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."));
[683]344 _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."));
[1340]345 _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>"));
[1453]346 _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>"));
[1340]347 _serialMountPointLineEdit->setWhatsThis(tr("<p>Enter a 'Mountpoint' to forward the corresponding stream to a serial connected device.</p>"));
[1422]348 _serialPortNameLineEdit->setWhatsThis(tr("<p>Enter the serial 'Port name' selected for communication with your serial connected device. 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>"));
[1340]349 _serialBaudRateComboBox->setWhatsThis(tr("<p>Select a 'Baud rate' for the serial link.</p><p>Note that your selection must equal the baud rate configured to the serial connected device. Note further that using a high baud rate is recommended.</p>"));
350 _serialParityComboBox->setWhatsThis(tr("<p>Select the 'Parity' for the serial link.</p><p>Note that your selection must equal the parity selection configured to the serial connected device. Note further that parity is often set to 'NONE'.</p>"));
351 _serialDataBitsComboBox->setWhatsThis(tr("<p>Select the number of 'Data bits' for the serial link.</p><p>Note that your selection must equal the number of data bits configured to the serial connected device. Note further that often 8 data bits are used.</p>"));
352 _serialStopBitsComboBox->setWhatsThis(tr("<p>Select the number of 'Stop bits' for the serial link.</p><p>Note that your selection must equal the number of stop bits configured to the serial connected device. Note further that often 1 stop bit is used.</p>"));
[1341]353 _serialAutoNMEACheckBox->setWhatsThis(tr("<p>Tick 'Auto NMEA' to forward NMEA GGA messages coming from your serial connected device to the NTRIP brodacaster.</p><p>Note that this replaces the simulation of an initial NMEA GGA message based on latitude/longitude from the broadcaster's sourcetable.</p>"));
[375]354
[679]355 // Canvas with Editable Fields
356 // ---------------------------
357 _canvas = new QWidget;
358 setCentralWidget(_canvas);
[143]359
[1409]360//QTabWidget* aogroup = new QTabWidget();
361 aogroup = new QTabWidget();
[679]362 QWidget* pgroup = new QWidget();
363 QWidget* ggroup = new QWidget();
364 QWidget* sgroup = new QWidget();
365 QWidget* egroup = new QWidget();
366 QWidget* agroup = new QWidget();
[934]367 QWidget* cgroup = new QWidget();
[679]368 QWidget* ogroup = new QWidget();
[1030]369 QWidget* rgroup = new QWidget();
[1327]370 QWidget* sergroup = new QWidget();
[679]371 aogroup->addTab(pgroup,tr("Proxy"));
372 aogroup->addTab(ggroup,tr("General"));
[701]373 aogroup->addTab(ogroup,tr("RINEX Observations"));
374 aogroup->addTab(egroup,tr("RINEX Ephemeris"));
[1231]375 aogroup->addTab(cgroup,tr("Ephemeris Corrections"));
[1230]376 aogroup->addTab(sgroup,tr("Feed Engine"));
[1347]377 aogroup->addTab(sergroup,tr("Serial Link"));
[1307]378 aogroup->addTab(agroup,tr("Outages"));
379 aogroup->addTab(rgroup,tr("Miscellaneous"));
[143]380
[1439]381 // Proxy
382 // ----
[679]383 QGridLayout* pLayout = new QGridLayout;
[1409]384 pLayout->setColumnMinimumWidth(0,13*ww);
385 pLayout->addWidget(new QLabel("Proxy host"), 0, 0);
386 pLayout->addWidget(_proxyHostLineEdit, 0, 1, 1,10);
387 pLayout->addWidget(new QLabel("Proxy port"), 1, 0);
388 pLayout->addWidget(_proxyPortLineEdit, 1, 1);
389 pLayout->addWidget(new QLabel("Settings for the proxy in protected networks, leave boxes blank if none."),2, 0, 1, 50, Qt::AlignLeft);
[679]390 pLayout->addWidget(new QLabel(" "),3,0);
391 pLayout->addWidget(new QLabel(" "),4,0);
392 pLayout->addWidget(new QLabel(" "),5,0);
393 pgroup->setLayout(pLayout);
[1439]394
395
396 connect(_proxyHostLineEdit, SIGNAL(textChanged(const QString &)),
397 this, SLOT(bncText(const QString &)));
398 if (_proxyHostLineEdit->text().isEmpty()) {
[1446]399 _proxyPortLineEdit->setStyleSheet("background-color: lightGray");
[1439]400 _proxyPortLineEdit->setEnabled(false);
401 }
[679]402
[1439]403 // General
404 // -------
[679]405 QGridLayout* gLayout = new QGridLayout;
[1042]406 gLayout->setColumnMinimumWidth(0,14*ww);
[1231]407 gLayout->addWidget(new QLabel("Logfile (full path)"), 0, 0);
408 gLayout->addWidget(_logFileLineEdit, 0, 1);
409 gLayout->addWidget(new QLabel("Append files"), 1, 0);
410 gLayout->addWidget(_rnxAppendCheckBox, 1, 1);
411 gLayout->addWidget(new QLabel("Reread configuration"), 2, 0);
412 gLayout->addWidget(_onTheFlyComboBox, 2, 1);
[1333]413 gLayout->addWidget(new QLabel("Auto start"), 3, 0);
414 gLayout->addWidget(_autoStartCheckBox, 3, 1);
415 gLayout->addWidget(new QLabel("General settings for logfile, file handling, configuration on-the-fly, and auto-start."),4, 0, 1, 2, Qt::AlignLeft);
[679]416 gLayout->addWidget(new QLabel(" "),5,0);
417 ggroup->setLayout(gLayout);
[533]418
[1439]419 // Feed Engine
420 // -----------
[679]421 QGridLayout* sLayout = new QGridLayout;
[1042]422 sLayout->setColumnMinimumWidth(0,14*ww);
[1455]423 sLayout->addWidget(new QLabel("Port"), 0, 0);
424 sLayout->addWidget(_outPortLineEdit, 0, 1);
425 sLayout->addWidget(new QLabel("Wait for full epoch"), 0, 2, Qt::AlignRight);
426 sLayout->addWidget(_waitTimeSpinBox, 0, 3, Qt::AlignLeft);
427 sLayout->addWidget(new QLabel("Sampling"), 1, 0);
428 sLayout->addWidget(_binSamplSpinBox, 1, 1, Qt::AlignLeft);
[679]429 sLayout->addWidget(new QLabel("File (full path)"), 2, 0);
[1230]430 sLayout->addWidget(_outFileLineEdit, 2, 1, 1, 30);
[1455]431 sLayout->addWidget(new QLabel("Port (unsynchronized)"), 3, 0);
432 sLayout->addWidget(_outUPortLineEdit, 3, 1);
[1235]433 sLayout->addWidget(new QLabel("Output decoded observations in a binary format to feed a real-time GNSS engine."),4,0,1,30);
[679]434 sLayout->addWidget(new QLabel(" "),5,0);
435 sgroup->setLayout(sLayout);
[143]436
[1439]437 connect(_outPortLineEdit, SIGNAL(textChanged(const QString &)),
438 this, SLOT(bncText(const QString &)));
[1444]439 connect(_outFileLineEdit, SIGNAL(textChanged(const QString &)),
440 this, SLOT(bncText(const QString &)));
441 if (_outPortLineEdit->text().isEmpty() && _outFileLineEdit->text().isEmpty()) {
[1446]442 _waitTimeSpinBox->setStyleSheet("background-color: lightGray");
443 _binSamplSpinBox->setStyleSheet("background-color: lightGray");
[1439]444 _waitTimeSpinBox->setEnabled(false);
445 _binSamplSpinBox->setEnabled(false);
446 }
447
448 // RINEX Ephemeris
449 // ---------------
[679]450 QGridLayout* eLayout = new QGridLayout;
[1042]451 eLayout->setColumnMinimumWidth(0,14*ww);
[681]452 eLayout->addWidget(new QLabel("Directory"), 0, 0);
453 eLayout->addWidget(_ephPathLineEdit, 0, 1);
454 eLayout->addWidget(new QLabel("Interval"), 1, 0);
455 eLayout->addWidget(_ephIntrComboBox, 1, 1);
456 eLayout->addWidget(new QLabel("Port"), 2, 0);
457 eLayout->addWidget(_outEphPortLineEdit, 2, 1);
[679]458 eLayout->addWidget(new QLabel("Version 3"), 3, 0);
459 eLayout->addWidget(_ephV3CheckBox, 3, 1);
[682]460 eLayout->addWidget(new QLabel("Saving RINEX ephemeris files and ephemeris output through IP port."),4,0,1,2,Qt::AlignLeft);
[679]461 eLayout->addWidget(new QLabel(" "),5,0);
462 egroup->setLayout(eLayout);
[560]463
[1439]464 connect(_ephPathLineEdit, SIGNAL(textChanged(const QString &)),
465 this, SLOT(bncText(const QString &)));
[1454]466 connect(_outEphPortLineEdit, SIGNAL(textChanged(const QString &)),
467 this, SLOT(bncText(const QString &)));
468
469 if (_ephPathLineEdit->text().isEmpty() && _outEphPortLineEdit->text().isEmpty()) {
[1446]470 _ephIntrComboBox->setStyleSheet("background-color: lightGray");
[1441]471 palette.setColor(_ephV3CheckBox->backgroundRole(), lightGray);
[1439]472 _ephV3CheckBox->setPalette(palette);
473 _ephIntrComboBox->setEnabled(false);
474 _ephV3CheckBox->setEnabled(false);
475 }
[1454]476 if (_ephPathLineEdit->text().isEmpty() && !_outEphPortLineEdit->text().isEmpty()) {
477 _ephIntrComboBox->setStyleSheet("background-color: lightGray");
478 _ephIntrComboBox->setEnabled(false);
479 }
[1439]480
481 // Outages
482 // -------
[679]483 QGridLayout* aLayout = new QGridLayout;
[1042]484 aLayout->setColumnMinimumWidth(0,14*ww);
[693]485 aLayout->addWidget(new QLabel("Observation rate"), 0, 0);
[686]486 aLayout->addWidget(_obsRateComboBox, 0, 1);
487 aLayout->addWidget(new QLabel("Failure threshold"), 1, 0);
[681]488 aLayout->addWidget(_adviseFailSpinBox, 1, 1);
[686]489 aLayout->addWidget(new QLabel("Recovery threshold"), 2, 0);
[681]490 aLayout->addWidget(_adviseRecoSpinBox, 2, 1);
[723]491 aLayout->addWidget(new QLabel("Pause"), 2, 2, Qt::AlignRight);
492 aLayout->addWidget(_makePauseCheckBox, 2, 3, Qt::AlignLeft);
[681]493 aLayout->addWidget(new QLabel("Script (full path)"), 3, 0);
[1041]494 aLayout->addWidget(_adviseScriptLineEdit, 3, 1,1,10);
[1307]495 aLayout->addWidget(new QLabel("Outage report, handling of corrupted streams."),5,0,1,10,Qt::AlignLeft);
[679]496 agroup->setLayout(aLayout);
[560]497
[1439]498 connect(_obsRateComboBox, SIGNAL(currentIndexChanged(const QString &)),
499 this, SLOT(bncText(const QString)));
500 if (_obsRateComboBox->currentText().isEmpty()) {
[1446]501 _adviseFailSpinBox->setStyleSheet("background-color: lightGray");
502 _adviseRecoSpinBox->setStyleSheet("background-color: lightGray");
[1441]503 palette.setColor(_makePauseCheckBox->backgroundRole(), lightGray);
[1439]504 _makePauseCheckBox->setPalette(palette);
[1446]505 _adviseScriptLineEdit->setStyleSheet("background-color: lightGray");
[1439]506 _adviseFailSpinBox->setEnabled(false);
507 _adviseRecoSpinBox->setEnabled(false);
508 _makePauseCheckBox->setEnabled(false);
509 _adviseScriptLineEdit->setEnabled(false);
510 }
511
512 // Miscellaneous
513 // -------------
[1030]514 QGridLayout* rLayout = new QGridLayout;
[1042]515 rLayout->setColumnMinimumWidth(0,14*ww);
[1409]516 rLayout->addWidget(new QLabel("Mountpoint"), 0, 0);
517 rLayout->addWidget(_miscMountLineEdit, 0, 1, 1,7);
[1307]518 rLayout->addWidget(new QLabel("Log latency"), 1, 0);
519 rLayout->addWidget(_perfIntrComboBox, 1, 1);
520 rLayout->addWidget(new QLabel("Scan RTCM"), 2, 0);
521 rLayout->addWidget(_scanRTCMCheckBox, 2, 1);
[1409]522 rLayout->addWidget(new QLabel("Log latencies or scan RTCM streams for numbers of message types and antenna information."),3, 0,1,30);
[1231]523 rLayout->addWidget(new QLabel(" "), 4, 0);
524 rLayout->addWidget(new QLabel(" "), 5, 0);
[1030]525 rgroup->setLayout(rLayout);
526
[1439]527 connect(_miscMountLineEdit, SIGNAL(textChanged(const QString &)),
528 this, SLOT(bncText(const QString &)));
529 if (_miscMountLineEdit->text().isEmpty()) {
[1446]530 _perfIntrComboBox->setStyleSheet("background-color: lightGray");
[1441]531 palette.setColor(_scanRTCMCheckBox->backgroundRole(), lightGray);
[1439]532 _scanRTCMCheckBox->setPalette(palette);
533 _perfIntrComboBox->setEnabled(false);
534 _scanRTCMCheckBox->setEnabled(false);
535 }
536
537 // RINEX Observations
538 // ------------------
[679]539 QGridLayout* oLayout = new QGridLayout;
[1042]540 oLayout->setColumnMinimumWidth(0,14*ww);
[681]541 oLayout->addWidget(new QLabel("Directory"), 0, 0);
[1041]542 oLayout->addWidget(_rnxPathLineEdit, 0, 1,1,12);
[681]543 oLayout->addWidget(new QLabel("Interval"), 1, 0);
544 oLayout->addWidget(_rnxIntrComboBox, 1, 1);
545 oLayout->addWidget(new QLabel("Sampling"), 1, 2, Qt::AlignRight);
546 oLayout->addWidget(_rnxSamplSpinBox, 1, 3, Qt::AlignLeft);
[682]547 oLayout->addWidget(new QLabel("Skeleton extension"), 2, 0);
[1041]548 oLayout->addWidget(_rnxSkelLineEdit, 2, 1,1,1, Qt::AlignLeft);
[679]549 oLayout->addWidget(new QLabel("Script (full path)"), 3, 0);
[1041]550 oLayout->addWidget(_rnxScrpLineEdit, 3, 1,1,12);
[679]551 oLayout->addWidget(new QLabel("Version 3"), 4, 0);
552 oLayout->addWidget(_rnxV3CheckBox, 4, 1);
[1041]553 oLayout->addWidget(new QLabel("Saving RINEX observation files."),5,0,1,12, Qt::AlignLeft);
[679]554 ogroup->setLayout(oLayout);
[1439]555
556 connect(_rnxPathLineEdit, SIGNAL(textChanged(const QString &)),
557 this, SLOT(bncText(const QString &)));
558 if (_rnxPathLineEdit->text().isEmpty()) {
[1446]559 _rnxIntrComboBox->setStyleSheet("background-color: lightGray");
560 _rnxSamplSpinBox->setStyleSheet("background-color: lightGray");
561 _rnxSkelLineEdit->setStyleSheet("background-color: lightGray");
562 _rnxScrpLineEdit->setStyleSheet("background-color: lightGray");
[1441]563 palette.setColor(_rnxV3CheckBox->backgroundRole(), lightGray);
[1439]564 _rnxV3CheckBox->setPalette(palette);
565 _rnxIntrComboBox->setEnabled(false);
566 _rnxSamplSpinBox->setEnabled(false);
567 _rnxSkelLineEdit->setEnabled(false);
568 _rnxScrpLineEdit->setEnabled(false);
569 _rnxV3CheckBox->setEnabled(false);
570 }
571
572 // Ephemeris Corrections
573 // ---------------------
[934]574 QGridLayout* cLayout = new QGridLayout;
[1042]575 cLayout->setColumnMinimumWidth(0,14*ww);
[934]576 cLayout->addWidget(new QLabel("Directory"), 0, 0);
[1242]577 cLayout->addWidget(_corrPathLineEdit, 0, 1,1,30);
[934]578 cLayout->addWidget(new QLabel("Interval"), 1, 0);
579 cLayout->addWidget(_corrIntrComboBox, 1, 1);
580 cLayout->addWidget(new QLabel("Port"), 2, 0);
581 cLayout->addWidget(_corrPortLineEdit, 2, 1);
[1242]582 cLayout->addWidget(new QLabel("Wait for full epoch"), 2, 2, Qt::AlignRight);
583 cLayout->addWidget(_corrTimeSpinBox, 2, 3, Qt::AlignLeft);
584 cLayout->addWidget(new QLabel("Saving Broadcast Ephemeris correction files and correction output through IP port."),3,0,1,30);
585 cLayout->addWidget(new QLabel(" "),4,0);
[1095]586 cLayout->addWidget(new QLabel(" "),5,0);
[934]587 cgroup->setLayout(cLayout);
588
[1439]589 connect(_corrPathLineEdit, SIGNAL(textChanged(const QString &)),
590 this, SLOT(bncText(const QString &)));
[1447]591 connect(_corrPortLineEdit, SIGNAL(textChanged(const QString &)),
592 this, SLOT(bncText(const QString &)));
[1439]593 if (_corrPathLineEdit->text().isEmpty()) {
[1446]594 _corrIntrComboBox->setStyleSheet("background-color: lightGray");
[1439]595 _corrIntrComboBox->setEnabled(false);
[1447]596 }
597 if (_corrPortLineEdit->text().isEmpty()) {
598 _corrTimeSpinBox->setStyleSheet("background-color: lightGray");
[1439]599 _corrTimeSpinBox->setEnabled(false);
600 }
601
602 // Serial Link
603 // -----------
[1327]604 QGridLayout* serLayout = new QGridLayout;
[1339]605 serLayout->setColumnMinimumWidth(0,14*ww);
606 serLayout->addWidget(new QLabel("Mountpoint"), 0,0, Qt::AlignLeft);
607 serLayout->addWidget(_serialMountPointLineEdit, 0,1,1,2);
608 serLayout->addWidget(new QLabel("Port name"), 1,0, Qt::AlignLeft);
609 serLayout->addWidget(_serialPortNameLineEdit, 1,1,1,2);
610 serLayout->addWidget(new QLabel("Baud rate"), 2,0, Qt::AlignLeft);
611 serLayout->addWidget(_serialBaudRateComboBox, 2,1);
612 serLayout->addWidget(new QLabel(" Parity "), 2,2, Qt::AlignRight);
613 serLayout->addWidget(_serialParityComboBox, 2,3);
614 serLayout->addWidget(new QLabel("Data bits"), 3,0, Qt::AlignLeft);
615 serLayout->addWidget(_serialDataBitsComboBox, 3,1);
616 serLayout->addWidget(new QLabel(" Stop bits "), 3,2, Qt::AlignRight);
617 serLayout->addWidget(_serialStopBitsComboBox, 3,3);
[1340]618 serLayout->addWidget(new QLabel("Auto NMEA"), 4, 0);
619 serLayout->addWidget(_serialAutoNMEACheckBox, 4, 1);
620 serLayout->addWidget(new QLabel("Serial port settings to feed a serial connected device."),5,0,1,30);
[1329]621
[1439]622 connect(_serialMountPointLineEdit, SIGNAL(textChanged(const QString &)),
623 this, SLOT(bncText(const QString &)));
624 if (_serialMountPointLineEdit->text().isEmpty()) {
[1446]625 _serialPortNameLineEdit->setStyleSheet("background-color: lightGray");
626 _serialBaudRateComboBox->setStyleSheet("background-color: lightGray");
627 _serialParityComboBox->setStyleSheet("background-color: lightGray");
628 _serialDataBitsComboBox->setStyleSheet("background-color: lightGray");
629 _serialStopBitsComboBox->setStyleSheet("background-color: lightGray");
[1441]630 palette.setColor(_serialAutoNMEACheckBox->backgroundRole(), lightGray);
[1439]631 _serialAutoNMEACheckBox->setPalette(palette);
632 _serialPortNameLineEdit->setEnabled(false);
633 _serialBaudRateComboBox->setEnabled(false);
634 _serialParityComboBox->setEnabled(false);
635 _serialDataBitsComboBox->setEnabled(false);
636 _serialStopBitsComboBox->setEnabled(false);
637 _serialAutoNMEACheckBox->setEnabled(false);
638 }
639
[1327]640 sergroup->setLayout(serLayout);
641
[1409]642 QGridLayout* mLayout = new QGridLayout;
643 aogroup->setCurrentIndex(settings.value("startTab").toInt());
644 mLayout->addWidget(aogroup, 0,0);
645 mLayout->addWidget(_mountPointsTable, 1,0);
646 mLayout->addWidget(new QLabel(" Logs:"),2,0);
647 mLayout->addWidget(_log, 3,0);
[106]648
[679]649 _canvas->setLayout(mLayout);
[1333]650
651 // Auto start
652 // ----------
653 if ( Qt::CheckState(settings.value("autoStart").toInt()) == Qt::Checked) {
654 slotGetData();
655 }
[35]656}
657
658// Destructor
659////////////////////////////////////////////////////////////////////////////
660bncWindow::~bncWindow() {
[609]661 delete _caster;
[35]662}
663
[1178]664//
665////////////////////////////////////////////////////////////////////////////
666void bncWindow::populateMountPointsTable() {
667
668 for (int iRow = _mountPointsTable->rowCount()-1; iRow >=0; iRow--) {
669 _mountPointsTable->removeRow(iRow);
670 }
671
672 QSettings settings;
673
674 QListIterator<QString> it(settings.value("mountPoints").toStringList());
675 if (!it.hasNext()) {
676 _actGetData->setEnabled(false);
677 }
678 int iRow = 0;
679 while (it.hasNext()) {
680 QStringList hlp = it.next().split(" ");
681 if (hlp.size() < 5) continue;
682 _mountPointsTable->insertRow(iRow);
683
684 QUrl url(hlp[0]);
685
686 QString fullPath = url.host() + QString(":%1").arg(url.port()) + url.path();
687 QString format(hlp[1]); QString latitude(hlp[2]); QString longitude(hlp[3]);
688 QString nmea(hlp[4]);
[1352]689 QString ntripVersion = "1";
690 if (hlp.size() >= 6) {
691 ntripVersion = (hlp[5]);
692 }
[1178]693
694 QTableWidgetItem* it;
695 it = new QTableWidgetItem(url.userInfo());
696 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
697 _mountPointsTable->setItem(iRow, 0, it);
698
699 it = new QTableWidgetItem(fullPath);
700 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
701 _mountPointsTable->setItem(iRow, 1, it);
702
703 it = new QTableWidgetItem(format);
704 _mountPointsTable->setItem(iRow, 2, it);
705
706 if (nmea == "yes") {
707 it = new QTableWidgetItem(latitude);
708 _mountPointsTable->setItem(iRow, 3, it);
709 it = new QTableWidgetItem(longitude);
710 _mountPointsTable->setItem(iRow, 4, it);
711 } else {
712 it = new QTableWidgetItem(latitude);
713 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
714 _mountPointsTable->setItem(iRow, 3, it);
715 it = new QTableWidgetItem(longitude);
716 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
717 _mountPointsTable->setItem(iRow, 4, it);
718 }
719
720 it = new QTableWidgetItem(nmea);
721 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
722 _mountPointsTable->setItem(iRow, 5, it);
723
[1352]724 it = new QTableWidgetItem(ntripVersion);
725 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
726 _mountPointsTable->setItem(iRow, 6, it);
727
[1178]728 bncTableItem* bncIt = new bncTableItem();
729 bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
[1352]730 _mountPointsTable->setItem(iRow, 7, bncIt);
[1178]731
732 iRow++;
733 }
734
735 _mountPointsTable->sortItems(1);
736}
737
[35]738// Retrieve Table
739////////////////////////////////////////////////////////////////////////////
740void bncWindow::slotAddMountPoints() {
[101]741
742 QSettings settings;
743 QString proxyHost = settings.value("proxyHost").toString();
744 int proxyPort = settings.value("proxyPort").toInt();
745 if (proxyHost != _proxyHostLineEdit->text() ||
746 proxyPort != _proxyPortLineEdit->text().toInt()) {
[102]747 int iRet = QMessageBox::question(this, "Question", "Proxy options "
[101]748 "changed. Use the new ones?",
749 QMessageBox::Yes, QMessageBox::No,
750 QMessageBox::NoButton);
751 if (iRet == QMessageBox::Yes) {
752 settings.setValue("proxyHost", _proxyHostLineEdit->text());
753 settings.setValue("proxyPort", _proxyPortLineEdit->text());
[1405]754 settings.sync();
[101]755 }
756 }
757
[90]758 bncTableDlg* dlg = new bncTableDlg(this);
[83]759 dlg->move(this->pos().x()+50, this->pos().y()+50);
[35]760 connect(dlg, SIGNAL(newMountPoints(QStringList*)),
761 this, SLOT(slotNewMountPoints(QStringList*)));
762 dlg->exec();
763 delete dlg;
764
765}
766
767// Delete Selected Mount Points
768////////////////////////////////////////////////////////////////////////////
769void bncWindow::slotDeleteMountPoints() {
[117]770
771 int nRows = _mountPointsTable->rowCount();
772 bool flg[nRows];
773 for (int iRow = 0; iRow < nRows; iRow++) {
[116]774 if (_mountPointsTable->isItemSelected(_mountPointsTable->item(iRow,1))) {
[117]775 flg[iRow] = true;
776 }
777 else {
778 flg[iRow] = false;
779 }
780 }
781 for (int iRow = nRows-1; iRow >= 0; iRow--) {
782 if (flg[iRow]) {
[116]783 _mountPointsTable->removeRow(iRow);
[83]784 }
785 }
786 _actDeleteMountPoints->setEnabled(false);
[183]787
788 if (_mountPointsTable->rowCount() == 0) {
789 _actGetData->setEnabled(false);
790 }
[35]791}
792
793// New Mount Points Selected
794////////////////////////////////////////////////////////////////////////////
795void bncWindow::slotNewMountPoints(QStringList* mountPoints) {
796 int iRow = 0;
797 QListIterator<QString> it(*mountPoints);
798 while (it.hasNext()) {
[59]799 QStringList hlp = it.next().split(" ");
[110]800 QUrl url(hlp[0]);
801 QString fullPath = url.host() + QString(":%1").arg(url.port()) + url.path();
[366]802 QString format(hlp[1]); QString latitude(hlp[2]); QString longitude(hlp[3]);
803 QString nmea(hlp[4]);
[1352]804 QString ntripVersion = "1";
805 if (hlp.size() >= 6) {
806 ntripVersion = (hlp[5]);
807 }
[110]808
[35]809 _mountPointsTable->insertRow(iRow);
[110]810
811 QTableWidgetItem* it;
812 it = new QTableWidgetItem(url.userInfo());
[115]813 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
[110]814 _mountPointsTable->setItem(iRow, 0, it);
815
816 it = new QTableWidgetItem(fullPath);
[115]817 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
[110]818 _mountPointsTable->setItem(iRow, 1, it);
819
820 it = new QTableWidgetItem(format);
821 _mountPointsTable->setItem(iRow, 2, it);
[184]822
[410]823 if (nmea == "yes") {
[366]824 it = new QTableWidgetItem(latitude);
825 _mountPointsTable->setItem(iRow, 3, it);
826 it = new QTableWidgetItem(longitude);
827 _mountPointsTable->setItem(iRow, 4, it);
828 } else {
829 it = new QTableWidgetItem(latitude);
830 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
831 _mountPointsTable->setItem(iRow, 3, it);
832 it = new QTableWidgetItem(longitude);
833 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
834 _mountPointsTable->setItem(iRow, 4, it);
835 }
836
837 it = new QTableWidgetItem(nmea);
838 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
839 _mountPointsTable->setItem(iRow, 5, it);
840
[1352]841 it = new QTableWidgetItem(ntripVersion);
842 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
843 _mountPointsTable->setItem(iRow, 6, it);
844
[184]845 bncTableItem* bncIt = new bncTableItem();
[1352]846 _mountPointsTable->setItem(iRow, 7, bncIt);
[184]847
[35]848 iRow++;
849 }
[111]850 _mountPointsTable->hideColumn(0);
[110]851 _mountPointsTable->sortItems(1);
[1199]852 if (mountPoints->count() > 0 && !_actStop->isEnabled()) {
[35]853 _actGetData->setEnabled(true);
854 }
855 delete mountPoints;
856}
857
[1487]858// Reset Options
859////////////////////////////////////////////////////////////////////////////
860void bncWindow::slotResetOptions() {
[1503]861 int iRet = QMessageBox::question(this, "Reset", "Remove all options from"
862 " configuration file/register"
863 " saved on disk?",
[1487]864 QMessageBox::Yes, QMessageBox::No,
865 QMessageBox::NoButton);
866 if (iRet == QMessageBox::Yes) {
867 QSettings settings;
868 settings.remove("");
869 }
870}
871
[35]872// Save Options
873////////////////////////////////////////////////////////////////////////////
874void bncWindow::slotSaveOptions() {
875 QSettings settings;
[668]876 settings.setValue("adviseFail", _adviseFailSpinBox->value());
877 settings.setValue("adviseReco", _adviseRecoSpinBox->value());
[1503]878 settings.setValue("adviseScript",_adviseScriptLineEdit->text());
879 settings.setValue("autoStart", _autoStartCheckBox->checkState());
880 settings.setValue("binSampl", _binSamplSpinBox->value());
881 settings.setValue("corrIntr", _corrIntrComboBox->currentText());
882 settings.setValue("corrPath", _corrPathLineEdit->text());
883 settings.setValue("corrPort", _corrPortLineEdit->text());
884 settings.setValue("corrTime", _corrTimeSpinBox->value());
885 settings.setValue("ephIntr", _ephIntrComboBox->currentText());
886 settings.setValue("ephPath", _ephPathLineEdit->text());
887 settings.setValue("ephV3", _ephV3CheckBox->checkState());
888 settings.setValue("logFile", _logFileLineEdit->text());
[723]889 settings.setValue("makePause", _makePauseCheckBox->checkState());
[1503]890 settings.setValue("miscMount", _miscMountLineEdit->text());
891 settings.setValue("obsRate", _obsRateComboBox->currentText());
892 settings.setValue("onTheFlyInterval", _onTheFlyComboBox->currentText());
893 settings.setValue("outEphPort", _outEphPortLineEdit->text());
[35]894 settings.setValue("outFile", _outFileLineEdit->text());
895 settings.setValue("outPort", _outPortLineEdit->text());
[1222]896 settings.setValue("outUPort", _outUPortLineEdit->text());
[1503]897 settings.setValue("perfIntr", _perfIntrComboBox->currentText());
898 settings.setValue("proxyHost", _proxyHostLineEdit->text());
899 settings.setValue("proxyPort", _proxyPortLineEdit->text());
900 settings.setValue("rnxAppend", _rnxAppendCheckBox->checkState());
901 settings.setValue("rnxIntr", _rnxIntrComboBox->currentText());
[83]902 settings.setValue("rnxPath", _rnxPathLineEdit->text());
[1503]903 settings.setValue("rnxSampl", _rnxSamplSpinBox->value());
[106]904 settings.setValue("rnxScript", _rnxScrpLineEdit->text());
[83]905 settings.setValue("rnxSkel", _rnxSkelLineEdit->text());
[533]906 settings.setValue("rnxV3", _rnxV3CheckBox->checkState());
[1307]907 settings.setValue("scanRTCM", _scanRTCMCheckBox->checkState());
[1503]908 settings.setValue("serialAutoNMEA", _serialAutoNMEACheckBox->checkState());
909 settings.setValue("serialBaudRate", _serialBaudRateComboBox->currentText());
910 settings.setValue("serialDataBits", _serialDataBitsComboBox->currentText());
[1409]911 settings.setValue("serialMountPoint",_serialMountPointLineEdit->text());
912 settings.setValue("serialParity", _serialParityComboBox->currentText());
[1503]913 settings.setValue("serialPortName", _serialPortNameLineEdit->text());
[1409]914 settings.setValue("serialStopBits", _serialStopBitsComboBox->currentText());
915 settings.setValue("startTab", aogroup->currentIndex());
[1503]916 settings.setValue("waitTime", _waitTimeSpinBox->value());
[1327]917 QStringList mountPoints;
[110]918
[35]919 for (int iRow = 0; iRow < _mountPointsTable->rowCount(); iRow++) {
[112]920 QUrl url( "//" + _mountPointsTable->item(iRow, 0)->text() +
921 "@" + _mountPointsTable->item(iRow, 1)->text() );
[110]922
923 mountPoints.append(url.toString() + " " +
[366]924 _mountPointsTable->item(iRow, 2)->text()
925 + " " + _mountPointsTable->item(iRow, 3)->text()
926 + " " + _mountPointsTable->item(iRow, 4)->text()
[1352]927 + " " + _mountPointsTable->item(iRow, 5)->text()
928 + " " + _mountPointsTable->item(iRow, 6)->text());
[35]929 }
930 settings.setValue("mountPoints", mountPoints);
[1200]931 if (_caster) {
932 _caster->slotReadMountPoints();
933 }
[1405]934 settings.sync();
[35]935}
936
937// All get slots terminated
938////////////////////////////////////////////////////////////////////////////
939void bncWindow::slotGetThreadErrors() {
[1299]940 ((bncApp*)qApp)->slotMessage("All Get Threads Terminated", true);
[1199]941 if (!_actStop->isEnabled()) {
942 _actGetData->setEnabled(true);
943 }
[35]944}
945
946// Retrieve Data
947////////////////////////////////////////////////////////////////////////////
948void bncWindow::slotGetData() {
[128]949 slotSaveOptions();
950
[35]951 _actDeleteMountPoints->setEnabled(false);
952 _actGetData->setEnabled(false);
[182]953 _actStop->setEnabled(true);
[35]954
[463]955 _caster = new bncCaster(_outFileLineEdit->text(),
[592]956 _outPortLineEdit->text().toInt());
[35]957
[592]958 ((bncApp*)qApp)->setPort(_outEphPortLineEdit->text().toInt());
[937]959 ((bncApp*)qApp)->setPortCorr(_corrPortLineEdit->text().toInt());
[592]960
[463]961 connect(_caster, SIGNAL(getThreadErrors()),
[35]962 this, SLOT(slotGetThreadErrors()));
963
[1179]964 connect (_caster, SIGNAL(mountPointsRead(QList<bncGetThread*>)),
965 this, SLOT(slotMountPointsRead(QList<bncGetThread*>)));
[1173]966
[1299]967 ((bncApp*)qApp)->slotMessage("============ Start BNC ============", true);
[1188]968
[1179]969 _caster->slotReadMountPoints();
[35]970}
[83]971
[182]972// Retrieve Data
973////////////////////////////////////////////////////////////////////////////
974void bncWindow::slotStop() {
975 int iRet = QMessageBox::question(this, "Stop", "Stop retrieving data?",
976 QMessageBox::Yes, QMessageBox::No,
977 QMessageBox::NoButton);
978 if (iRet == QMessageBox::Yes) {
[463]979 delete _caster; _caster = 0;
[182]980 _actGetData->setEnabled(true);
981 _actStop->setEnabled(false);
982 }
983}
984
[83]985// Close Application gracefully
986////////////////////////////////////////////////////////////////////////////
987void bncWindow::closeEvent(QCloseEvent* event) {
988
989 int iRet = QMessageBox::question(this, "Close", "Save Options?",
990 QMessageBox::Yes, QMessageBox::No,
991 QMessageBox::Cancel);
992
993 if (iRet == QMessageBox::Cancel) {
994 event->ignore();
995 return;
996 }
997 else if (iRet == QMessageBox::Yes) {
998 slotSaveOptions();
999 }
1000
[608]1001 QMainWindow::closeEvent(event);
[83]1002}
1003
1004// User changed the selection of mountPoints
1005////////////////////////////////////////////////////////////////////////////
1006void bncWindow::slotSelectionChanged() {
1007 if (_mountPointsTable->selectedItems().isEmpty()) {
1008 _actDeleteMountPoints->setEnabled(false);
1009 }
1010 else {
1011 _actDeleteMountPoints->setEnabled(true);
1012 }
1013}
1014
1015// Display Program Messages
1016////////////////////////////////////////////////////////////////////////////
[1299]1017void bncWindow::slotWindowMessage(const QByteArray msg, bool showOnScreen) {
[83]1018
[1218]1019#ifdef DEBUG_RTCM2_2021
1020 const int maxBufferSize = 1000;
1021#else
[83]1022 const int maxBufferSize = 10000;
[1218]1023#endif
[1299]1024
1025 if (! showOnScreen ) {
1026 return;
1027 }
[83]1028
[189]1029 QString txt = _log->toPlainText() + "\n" +
[566]1030 QDateTime::currentDateTime().toUTC().toString("yy-MM-dd hh:mm:ss ") + msg;
[83]1031 _log->clear();
1032 _log->append(txt.right(maxBufferSize));
1033}
1034
[108]1035// About Message
1036////////////////////////////////////////////////////////////////////////////
1037void bncWindow::slotAbout() {
[679]1038 new bncAboutDlg(0);
[108]1039}
1040
[989]1041//Flowchart
1042////////////////////////////////////////////////////////////////////////////
1043void bncWindow::slotFlowchart() {
1044 new bncFlowchartDlg(0);
1045}
1046
[108]1047// Help Window
1048////////////////////////////////////////////////////////////////////////////
1049void bncWindow::slotHelp() {
[177]1050 QUrl url;
1051 url.setPath(":bnchelp.html");
[676]1052 new bncHlpDlg(0, url);
[108]1053}
[110]1054
1055// Select Fonts
1056////////////////////////////////////////////////////////////////////////////
1057void bncWindow::slotFontSel() {
1058 bool ok;
1059 QFont newFont = QFontDialog::getFont(&ok, this->font(), this);
1060 if (ok) {
[113]1061 QSettings settings;
1062 settings.setValue("font", newFont.toString());
[110]1063 QApplication::setFont(newFont);
[113]1064 int ww = QFontMetrics(newFont).width('w');
[152]1065 setMinimumSize(60*ww, 80*ww);
1066 resize(60*ww, 80*ww);
[110]1067 }
1068}
[399]1069
1070// Whats This Help
1071void bncWindow::slotWhatsThis() {
[1173]1072 QWhatsThis::enterWhatsThisMode();
[399]1073}
1074
[1173]1075//
1076////////////////////////////////////////////////////////////////////////////
[1179]1077void bncWindow::slotMountPointsRead(QList<bncGetThread*> threads) {
[1178]1078 populateMountPointsTable();
[1180]1079 QSettings settings;
1080 _binSamplSpinBox->setValue(settings.value("binSampl").toInt());
1081 _waitTimeSpinBox->setValue(settings.value("waitTime").toInt());
[1179]1082 QListIterator<bncGetThread*> iTh(threads);
1083 while (iTh.hasNext()) {
1084 bncGetThread* thread = iTh.next();
1085 for (int iRow = 0; iRow < _mountPointsTable->rowCount(); iRow++) {
1086 QUrl url( "//" + _mountPointsTable->item(iRow, 0)->text() +
1087 "@" + _mountPointsTable->item(iRow, 1)->text() );
1088 if (url == thread->mountPoint() &&
1089 _mountPointsTable->item(iRow, 3)->text() == thread->latitude() &&
1090 _mountPointsTable->item(iRow, 4)->text() == thread->longitude() ) {
[1352]1091 ((bncTableItem*) _mountPointsTable->item(iRow, 7))->setGetThread(thread);
[1179]1092 break;
1093 }
1094 }
1095 }
[1173]1096}
1097
1098//
1099////////////////////////////////////////////////////////////////////////////
[679]1100void bncWindow::CreateMenu() {
1101 // Create Menus
1102 // ------------
1103 _menuFile = menuBar()->addMenu(tr("&File"));
1104 _menuFile->addAction(_actFontSel);
1105 _menuFile->addSeparator();
1106 _menuFile->addAction(_actSaveOpt);
1107 _menuFile->addSeparator();
[1487]1108 _menuFile->addAction(_actResetOpt);
1109 _menuFile->addSeparator();
[679]1110 _menuFile->addAction(_actQuit);
[399]1111
[679]1112 _menuHlp = menuBar()->addMenu(tr("&Help"));
1113 _menuHlp->addAction(_actHelp);
[989]1114 _menuHlp->addAction(_actFlowchart);
[679]1115 _menuHlp->addAction(_actAbout);
1116}
1117
[1439]1118// Toolbar
[1173]1119////////////////////////////////////////////////////////////////////////////
[679]1120void bncWindow::AddToolbar() {
1121 // Tool (Command) Bar
1122 // ------------------
1123 QToolBar* toolBar = new QToolBar;
1124 addToolBar(Qt::BottomToolBarArea, toolBar);
1125 toolBar->setMovable(false);
1126 toolBar->addAction(_actAddMountPoints);
1127 toolBar->addAction(_actDeleteMountPoints);
1128 toolBar->addAction(_actGetData);
1129 toolBar->addAction(_actStop);
1130 toolBar->addWidget(new QLabel(" "));
1131 toolBar->addAction(_actwhatsthis);
[1439]1132}
[679]1133
[1439]1134// About
[1173]1135////////////////////////////////////////////////////////////////////////////
[679]1136bncAboutDlg::bncAboutDlg(QWidget* parent) :
1137 QDialog(parent) {
1138
1139 QTextBrowser* tb = new QTextBrowser;
1140 QUrl url; url.setPath(":bncabout.html");
1141 tb->setSource(url);
1142 tb->setReadOnly(true);
1143
1144 int ww = QFontMetrics(font()).width('w');
1145 QPushButton* _closeButton = new QPushButton("Close");
1146 _closeButton->setMaximumWidth(10*ww);
1147 connect(_closeButton, SIGNAL(clicked()), this, SLOT(close()));
1148
1149 QGridLayout* dlgLayout = new QGridLayout();
1150 QLabel* img = new QLabel();
1151 img->setPixmap(QPixmap(":ntrip-logo.png"));
1152 dlgLayout->addWidget(img, 0,0);
[1292]1153 dlgLayout->addWidget(new QLabel("BKG Ntrip Client (BNC) Version 1.7"), 0,1);
[679]1154 dlgLayout->addWidget(tb,1,0,1,2);
1155 dlgLayout->addWidget(_closeButton,2,1,Qt::AlignRight);
1156
1157 setLayout(dlgLayout);
1158 resize(60*ww, 60*ww);
1159 show();
1160}
1161
[1173]1162//
1163////////////////////////////////////////////////////////////////////////////
[679]1164bncAboutDlg::~bncAboutDlg() {
1165};
1166
[1439]1167// Flowchart
[1173]1168////////////////////////////////////////////////////////////////////////////
[989]1169bncFlowchartDlg::bncFlowchartDlg(QWidget* parent) :
1170 QDialog(parent) {
1171
1172 int ww = QFontMetrics(font()).width('w');
1173 QPushButton* _closeButton = new QPushButton("Close");
1174 _closeButton->setMaximumWidth(10*ww);
1175 connect(_closeButton, SIGNAL(clicked()), this, SLOT(close()));
1176
1177 QGridLayout* dlgLayout = new QGridLayout();
1178 QLabel* img = new QLabel();
[997]1179 img->setPixmap(QPixmap(":bncflowchart.png"));
[989]1180 dlgLayout->addWidget(img, 0,0);
1181 dlgLayout->addWidget(_closeButton,1,0,Qt::AlignLeft);
1182
1183 setLayout(dlgLayout);
1184 show();
1185}
1186
[1173]1187//
1188////////////////////////////////////////////////////////////////////////////
[989]1189bncFlowchartDlg::~bncFlowchartDlg() {
1190};
1191
[1439]1192// Bnc Text
1193////////////////////////////////////////////////////////////////////////////
1194void bncWindow::bncText(const QString &text){
1195
1196 bool isEmpty = text.isEmpty();
1197
1198 QPalette palette;
[1443]1199 QColor lightGray(230, 230, 230);
[1446]1200 QColor white(255, 255, 255);
[1439]1201
1202 // Proxy
1203 //------
1204 if (aogroup->currentIndex() == 0) {
1205 if (!isEmpty) {
[1446]1206 _proxyPortLineEdit->setStyleSheet("background-color: white");
[1439]1207 _proxyPortLineEdit->setEnabled(true);
1208 } else {
[1446]1209 _proxyPortLineEdit->setStyleSheet("background-color: lightGray");
[1439]1210 _proxyPortLineEdit->setEnabled(false);
1211 }
1212 }
1213
1214 // RINEX Observations
1215 // ------------------
1216 if (aogroup->currentIndex() == 2) {
1217 if (!isEmpty) {
[1446]1218 _rnxSamplSpinBox->setStyleSheet("background-color: white");
1219 _rnxSkelLineEdit->setStyleSheet("background-color: white");
1220 _rnxScrpLineEdit->setStyleSheet("background-color: white");
1221 palette.setColor(_rnxV3CheckBox->backgroundRole(), white);
[1439]1222 _rnxV3CheckBox->setPalette(palette);
[1446]1223 _rnxIntrComboBox->setStyleSheet("background-color: white");
[1439]1224 _rnxSamplSpinBox->setEnabled(true);
1225 _rnxSkelLineEdit->setEnabled(true);
1226 _rnxScrpLineEdit->setEnabled(true);
1227 _rnxV3CheckBox->setEnabled(true);
[1442]1228 _rnxIntrComboBox->setEnabled(true);
[1439]1229 } else {
[1446]1230 _rnxSamplSpinBox->setStyleSheet("background-color: lightGray");
1231 _rnxSkelLineEdit->setStyleSheet("background-color: lightGray");
1232 _rnxScrpLineEdit->setStyleSheet("background-color: lightGray");
[1441]1233 palette.setColor(_rnxV3CheckBox->backgroundRole(), lightGray);
[1439]1234 _rnxV3CheckBox->setPalette(palette);
[1446]1235 _rnxIntrComboBox->setStyleSheet("background-color: lightGray");
[1439]1236 _rnxSamplSpinBox->setEnabled(false);
1237 _rnxSkelLineEdit->setEnabled(false);
1238 _rnxScrpLineEdit->setEnabled(false);
1239 _rnxV3CheckBox->setEnabled(false);
[1442]1240 _rnxIntrComboBox->setEnabled(false);
[1439]1241 }
1242 }
1243
1244 // RINEX Ephemeris
1245 // ---------------
1246 if (aogroup->currentIndex() == 3) {
[1454]1247 if (!_ephPathLineEdit->text().isEmpty() && !_outEphPortLineEdit->text().isEmpty()) {
1248 _ephIntrComboBox->setStyleSheet("background-color: white");
[1446]1249 palette.setColor(_ephV3CheckBox->backgroundRole(), white);
[1439]1250 _ephV3CheckBox->setPalette(palette);
[1454]1251 _ephIntrComboBox->setEnabled(true);
1252 _ephV3CheckBox->setEnabled(true);
1253 }
1254 if (_ephPathLineEdit->text().isEmpty() && !_outEphPortLineEdit->text().isEmpty()) {
1255 _ephIntrComboBox->setStyleSheet("background-color: lightGray");
1256 palette.setColor(_ephV3CheckBox->backgroundRole(), white);
1257 _ephV3CheckBox->setPalette(palette);
1258 _ephIntrComboBox->setEnabled(false);
1259 _ephV3CheckBox->setEnabled(true);
1260 }
1261 if (!_ephPathLineEdit->text().isEmpty() && _outEphPortLineEdit->text().isEmpty()) {
[1446]1262 _ephIntrComboBox->setStyleSheet("background-color: white");
[1454]1263 palette.setColor(_ephV3CheckBox->backgroundRole(), white);
1264 _ephV3CheckBox->setPalette(palette);
1265 _ephIntrComboBox->setEnabled(true);
[1439]1266 _ephV3CheckBox->setEnabled(true);
[1454]1267 }
1268 if (_ephPathLineEdit->text().isEmpty() && _outEphPortLineEdit->text().isEmpty()) {
1269 _ephIntrComboBox->setStyleSheet("background-color: lightGray");
[1441]1270 palette.setColor(_ephV3CheckBox->backgroundRole(), lightGray);
[1439]1271 _ephV3CheckBox->setPalette(palette);
[1454]1272 _ephIntrComboBox->setEnabled(false);
[1439]1273 _ephV3CheckBox->setEnabled(false);
1274 }
1275 }
1276
1277 // Ephemeris Corrections
1278 // ---------------------
1279 if (aogroup->currentIndex() == 4) {
1280 if (!isEmpty) {
[1447]1281 if (!_corrPathLineEdit->text().isEmpty()) {
1282 _corrIntrComboBox->setStyleSheet("background-color: white");
[1446]1283 _corrPortLineEdit->setStyleSheet("background-color: white");
[1447]1284 _corrIntrComboBox->setEnabled(true);
1285 _corrPortLineEdit->setEnabled(true);
1286 }
1287 if (!_corrPortLineEdit->text().isEmpty()) {
[1446]1288 _corrTimeSpinBox->setStyleSheet("background-color: white");
[1439]1289 _corrTimeSpinBox->setEnabled(true);
[1447]1290 }
[1439]1291 } else {
[1447]1292 if (_corrPathLineEdit->text().isEmpty()) {
1293 _corrIntrComboBox->setStyleSheet("background-color: lightGray");
[1454]1294 _corrIntrComboBox->setEnabled(false);
[1447]1295 }
1296 if (_corrPortLineEdit->text().isEmpty()) {
1297 _corrTimeSpinBox->setStyleSheet("background-color: lightGray");
1298 _corrTimeSpinBox->setEnabled(false);
1299 }
[1439]1300 }
1301 }
1302
1303 // Feed Engine
1304 // -----------
1305 if (aogroup->currentIndex() == 5) {
[1444]1306 if ( !_outPortLineEdit->text().isEmpty() || !_outFileLineEdit->text().isEmpty()) {
[1446]1307 _waitTimeSpinBox->setStyleSheet("background-color: white");
1308 _binSamplSpinBox->setStyleSheet("background-color: white");
[1444]1309 _waitTimeSpinBox->setEnabled(true);
1310 _binSamplSpinBox->setEnabled(true);
1311 } else {
[1446]1312 _waitTimeSpinBox->setStyleSheet("background-color: lightGray");
1313 _binSamplSpinBox->setStyleSheet("background-color: lightGray");
[1444]1314 _waitTimeSpinBox->setEnabled(false);
[1446]1315 _binSamplSpinBox->setEnabled(false);
[1439]1316 }
1317 }
1318
1319 // Serial Link
1320 // -----------
1321 if (aogroup->currentIndex() == 6) {
1322 if (!isEmpty) {
[1446]1323 _serialPortNameLineEdit->setStyleSheet("background-color: white");
1324 _serialBaudRateComboBox->setStyleSheet("background-color: white");
1325 _serialParityComboBox->setStyleSheet("background-color: white");
1326 _serialDataBitsComboBox->setStyleSheet("background-color: white");
1327 _serialStopBitsComboBox->setStyleSheet("background-color: white");
1328 palette.setColor(_serialAutoNMEACheckBox->backgroundRole(), white);
[1439]1329 _serialAutoNMEACheckBox->setPalette(palette);
1330 _serialPortNameLineEdit->setEnabled(true);
1331 _serialBaudRateComboBox->setEnabled(true);
1332 _serialParityComboBox->setEnabled(true);
1333 _serialDataBitsComboBox->setEnabled(true);
1334 _serialStopBitsComboBox->setEnabled(true);
1335 _serialAutoNMEACheckBox->setEnabled(true);
1336 } else {
[1446]1337 _serialPortNameLineEdit->setStyleSheet("background-color: lightGray");
1338 _serialBaudRateComboBox->setStyleSheet("background-color: lightGray");
1339 _serialParityComboBox->setStyleSheet("background-color: lightGray");
1340 _serialDataBitsComboBox->setStyleSheet("background-color: lightGray");
1341 _serialStopBitsComboBox->setStyleSheet("background-color: lightGray");
[1441]1342 palette.setColor(_serialAutoNMEACheckBox->backgroundRole(), lightGray);
[1439]1343 _serialAutoNMEACheckBox->setPalette(palette);
1344 _serialPortNameLineEdit->setEnabled(false);
1345 _serialBaudRateComboBox->setEnabled(false);
1346 _serialParityComboBox->setEnabled(false);
1347 _serialDataBitsComboBox->setEnabled(false);
1348 _serialStopBitsComboBox->setEnabled(false);
1349 _serialAutoNMEACheckBox->setEnabled(false);
1350 }
1351 }
1352
1353 // Outages
1354 // -------
1355 if (aogroup->currentIndex() == 7) {
1356 if (!isEmpty) {
[1446]1357 _adviseScriptLineEdit->setStyleSheet("background-color: white");
1358 _adviseFailSpinBox->setStyleSheet("background-color: white");
1359 _adviseRecoSpinBox->setStyleSheet("background-color: white");
1360 palette.setColor(_makePauseCheckBox->backgroundRole(), white);
[1439]1361 _makePauseCheckBox->setPalette(palette);
1362 _adviseFailSpinBox->setEnabled(true);
1363 _adviseRecoSpinBox->setEnabled(true);
1364 _makePauseCheckBox->setEnabled(true);
1365 _adviseScriptLineEdit->setEnabled(true);
1366 } else {
[1446]1367 _adviseScriptLineEdit->setStyleSheet("background-color: lightGray");
1368 _adviseFailSpinBox->setStyleSheet("background-color: lightGray");
1369 _adviseRecoSpinBox->setStyleSheet("background-color: lightGray");
[1441]1370 palette.setColor(_makePauseCheckBox->backgroundRole(), lightGray);
[1439]1371 _makePauseCheckBox->setPalette(palette);
1372 _adviseFailSpinBox->setEnabled(false);
1373 _adviseRecoSpinBox->setEnabled(false);
1374 _makePauseCheckBox->setEnabled(false);
1375 _adviseScriptLineEdit->setEnabled(false);
1376 }
1377 }
1378
1379 // Miscellaneous
1380 // -------------
1381 if (aogroup->currentIndex() == 8) {
1382 if (!isEmpty) {
[1446]1383 _perfIntrComboBox->setStyleSheet("background-color: white");
1384 palette.setColor(_scanRTCMCheckBox->backgroundRole(), white);
1385 _scanRTCMCheckBox->setPalette(palette);
[1442]1386 _perfIntrComboBox->setEnabled(true);
[1439]1387 _scanRTCMCheckBox->setEnabled(true);
1388 } else {
[1446]1389 _perfIntrComboBox->setStyleSheet("background-color: lightGray");
[1442]1390 palette.setColor(_scanRTCMCheckBox->backgroundRole(), lightGray);
1391 _scanRTCMCheckBox->setPalette(palette);
[1446]1392 _perfIntrComboBox->setEnabled(false);
[1442]1393 _scanRTCMCheckBox->setEnabled(false);
[1439]1394 }
1395 }
1396}
Note: See TracBrowser for help on using the repository browser.