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