source: ntrip/trunk/BNS/bnswindow.cpp@ 2348

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

* empty log message *

File size: 71.7 KB
Line 
1
2/* -------------------------------------------------------------------------
3 * BKG NTRIP Server
4 * -------------------------------------------------------------------------
5 *
6 * Class: bnsWindow
7 *
8 * Purpose: This class implements the main application window.
9 *
10 * Author: L. Mervart
11 *
12 * Created: 29-Mar-2008
13 *
14 * Changes:
15 *
16 * -----------------------------------------------------------------------*/
17
18#include <iostream>
19
20#include "bnswindow.h"
21#include "bnshlpdlg.h"
22#include "bnssettings.h"
23#include "bnscustomtrafo.h"
24
25using namespace std;
26
27// About Dialog - Constructor
28////////////////////////////////////////////////////////////////////////////
29bnsAboutDlg::bnsAboutDlg(QWidget* parent) :
30 QDialog(parent) {
31
32 QTextBrowser* tb = new QTextBrowser;
33 QUrl url; url.setPath(":bnsabout.html");
34 tb->setSource(url);
35 tb->setReadOnly(true);
36
37 int ww = QFontMetrics(font()).width('w');
38 QPushButton* _closeButton = new QPushButton("Close");
39 _closeButton->setMaximumWidth(10*ww);
40 connect(_closeButton, SIGNAL(clicked()), this, SLOT(close()));
41
42 QGridLayout* dlgLayout = new QGridLayout();
43 QLabel* img = new QLabel();
44 img->setPixmap(QPixmap(":ntrip-logo.png"));
45 dlgLayout->addWidget(img, 0,0);
46 dlgLayout->addWidget(new QLabel("BKG Ntrip State Space Server (BNS) Version 1.1"), 0,1);
47 dlgLayout->addWidget(tb,1,0,1,2);
48 dlgLayout->addWidget(_closeButton,2,1,Qt::AlignRight);
49
50 setLayout(dlgLayout);
51 resize(60*ww, 60*ww);
52 show();
53}
54
55// About Dialog - Destructor
56////////////////////////////////////////////////////////////////////////////
57bnsAboutDlg::~bnsAboutDlg() {
58};
59
60// Flowchart Dialog - Constructor
61////////////////////////////////////////////////////////////////////////////
62bnsFlowchartDlg::bnsFlowchartDlg(QWidget* parent) :
63 QDialog(parent) {
64
65 int ww = QFontMetrics(font()).width('w');
66 QPushButton* _closeButton = new QPushButton("Close");
67 _closeButton->setMaximumWidth(10*ww);
68 connect(_closeButton, SIGNAL(clicked()), this, SLOT(close()));
69
70 QGridLayout* dlgLayout = new QGridLayout();
71 QLabel* img = new QLabel();
72 img->setPixmap(QPixmap(":bnsflowchart.png"));
73 dlgLayout->addWidget(img, 0,0);
74 dlgLayout->addWidget(_closeButton,1,0,Qt::AlignLeft);
75
76 setLayout(dlgLayout);
77 show();
78}
79
80// Flowchart Dialog - Destructor
81////////////////////////////////////////////////////////////////////////////
82bnsFlowchartDlg::~bnsFlowchartDlg() {
83};
84
85// Constructor
86////////////////////////////////////////////////////////////////////////////
87bnsWindow::bnsWindow() {
88
89 _bns = 0;
90
91 bnsSettings settings;
92
93 QString fontString = settings.value("font").toString();
94 if ( !fontString.isEmpty() ) {
95 QFont newFont;
96 if (newFont.fromString(fontString)) {
97 QApplication::setFont(newFont);
98 }
99 }
100
101 int ww = QFontMetrics(this->font()).width('w');
102 setMinimumSize(77*ww, 65*ww);
103 setWindowTitle(tr("BKG Ntrip State Space Server (BNS) Version 1.1"));
104 setWindowIcon(QPixmap(":ntrip-logo.png"));
105
106 // Create Actions
107 // --------------
108 _actHelp = new QAction(tr("&Help Contents"),this);
109 connect(_actHelp, SIGNAL(triggered()), SLOT(slotHelp()));
110
111 _actAbout = new QAction(tr("&About BNS"),this);
112 connect(_actAbout, SIGNAL(triggered()), SLOT(slotAbout()));
113
114 _actFlowchart = new QAction(tr("&Flow Chart"),this);
115 connect(_actFlowchart, SIGNAL(triggered()), SLOT(slotFlowchart()));
116
117 _actFontSel = new QAction(tr("Select &Font"),this);
118 connect(_actFontSel, SIGNAL(triggered()), SLOT(slotFontSel()));
119
120 _actSaveOpt = new QAction(tr("&Save Options"),this);
121 connect(_actSaveOpt, SIGNAL(triggered()), SLOT(slotSaveOptions()));
122
123 _actQuit = new QAction(tr("&Quit"),this);
124 connect(_actQuit, SIGNAL(triggered()), SLOT(close()));
125
126 _actWhatsThis= new QAction(tr("Help=Shift+F1"),this);
127 connect(_actWhatsThis, SIGNAL(triggered()), SLOT(slotWhatsThis()));
128
129 _actStart = new QAction(tr("Sta&rt"),this);
130 connect(_actStart, SIGNAL(triggered()), SLOT(slotStart()));
131
132 _actStop = new QAction(tr("Sto&p"),this);
133 connect(_actStop, SIGNAL(triggered()), SLOT(slotStop()));
134 _actStop->setEnabled(false);
135
136 CreateMenu();
137 AddToolbar();
138
139 // Canvas with Editable Fields
140 // ---------------------------
141 _canvas = new QWidget;
142 setCentralWidget(_canvas);
143
144 // Proxy Options
145 // -------------
146 _proxyHostLineEdit = new QLineEdit(settings.value("proxyHost").toString());
147 _proxyPortLineEdit = new QLineEdit(settings.value("proxyPort").toString());
148
149 // General Options
150 // ---------------
151 _logFileLineEdit = new QLineEdit(settings.value("logFile").toString());
152 _fileAppendCheckBox = new QCheckBox();
153 _fileAppendCheckBox->setCheckState(Qt::CheckState(settings.value("fileAppend").toInt()));
154 _autoStartCheckBox = new QCheckBox();
155 _autoStartCheckBox->setCheckState(Qt::CheckState(
156 settings.value("autoStart").toInt()));
157
158 // RINEX Ephemeris Options
159 // -----------------------
160 _ephHostLineEdit = new QLineEdit(settings.value("ephHost").toString());
161 _ephPortLineEdit = new QLineEdit(settings.value("ephPort").toString());
162 _ephEchoLineEdit = new QLineEdit(settings.value("ephEcho").toString());
163
164 // Clocks & Orbits Options
165 // -----------------------
166 _clkPortLineEdit = new QLineEdit(settings.value("clkPort").toString());
167 _inpEchoLineEdit = new QLineEdit(settings.value("inpEcho").toString());
168
169
170 // Broadcast Corrections I Options
171 // -------------------------------
172 _outHost_1_LineEdit = new QLineEdit(settings.value("outHost1").toString());
173 _outPort_1_LineEdit = new QLineEdit(settings.value("outPort1").toString());
174 _password_1_LineEdit = new QLineEdit(settings.value("password1").toString());
175 _password_1_LineEdit->setEchoMode(QLineEdit::Password);
176 _mountpoint_1_LineEdit = new QLineEdit(settings.value("mountpoint_1").toString());
177 _refSys_1_ComboBox = new QComboBox;
178 _refSys_1_ComboBox->setEditable(false);
179 _refSys_1_ComboBox->addItems(QString("IGS05,ETRF2000,NAD83,GDA94,SIRGAS2000,Custom").split(","));
180 int ii = _refSys_1_ComboBox->findText(settings.value("refSys_1").toString());
181 if (ii != -1) {
182 _refSys_1_ComboBox->setCurrentIndex(ii);
183 }
184 _outFile_1_LineEdit = new QLineEdit(settings.value("outFile_1").toString());
185 _CoM_1_CheckBox = new QCheckBox();
186 _CoM_1_CheckBox->setCheckState(Qt::CheckState(settings.value("CoM_1").toInt()));
187
188 // Broadcast Corrections II Options
189 // --------------------------------
190 _outHost_2_LineEdit = new QLineEdit(settings.value("outHost2").toString());
191 _outPort_2_LineEdit = new QLineEdit(settings.value("outPort2").toString());
192 _password_2_LineEdit = new QLineEdit(settings.value("password2").toString());
193 _password_2_LineEdit->setEchoMode(QLineEdit::Password);
194 _mountpoint_2_LineEdit = new QLineEdit(settings.value("mountpoint_2").toString());
195 _refSys_2_ComboBox = new QComboBox;
196 _refSys_2_ComboBox->setEditable(false);
197 _refSys_2_ComboBox->addItems(QString("IGS05,ETRF2000,NAD83,GDA94,SIRGAS2000,Custom").split(","));
198 ii = _refSys_2_ComboBox->findText(settings.value("refSys_2").toString());
199 if (ii != -1) {
200 _refSys_2_ComboBox->setCurrentIndex(ii);
201 }
202 _outFile_2_LineEdit = new QLineEdit(settings.value("outFile_2").toString());
203 _CoM_2_CheckBox = new QCheckBox();
204 _CoM_2_CheckBox->setCheckState(Qt::CheckState(settings.value("CoM_2").toInt()));
205
206 // Broadcast Corrections III Options
207 // ---------------------------------
208 _outHost_3_LineEdit = new QLineEdit(settings.value("outHost3").toString());
209 _outPort_3_LineEdit = new QLineEdit(settings.value("outPort3").toString());
210 _password_3_LineEdit = new QLineEdit(settings.value("password3").toString());
211 _password_3_LineEdit->setEchoMode(QLineEdit::Password);
212 _mountpoint_3_LineEdit = new QLineEdit(settings.value("mountpoint_3").toString());
213 _refSys_3_ComboBox = new QComboBox;
214 _refSys_3_ComboBox->setEditable(false);
215 _refSys_3_ComboBox->addItems(QString("IGS05,ETRF2000,NAD83,GDA94,SIRGAS2000,Custom").split(","));
216 ii = _refSys_3_ComboBox->findText(settings.value("refSys_3").toString());
217 if (ii != -1) {
218 _refSys_3_ComboBox->setCurrentIndex(ii);
219 }
220 _outFile_3_LineEdit = new QLineEdit(settings.value("outFile_3").toString());
221 _CoM_3_CheckBox = new QCheckBox();
222 _CoM_3_CheckBox->setCheckState(Qt::CheckState(settings.value("CoM_3").toInt()));
223
224 // Broadcast Corrections IV Options
225 // --------------------------------
226 _outHost_4_LineEdit = new QLineEdit(settings.value("outHost4").toString());
227 _outPort_4_LineEdit = new QLineEdit(settings.value("outPort4").toString());
228 _password_4_LineEdit = new QLineEdit(settings.value("password4").toString());
229 _password_4_LineEdit->setEchoMode(QLineEdit::Password);
230 _mountpoint_4_LineEdit = new QLineEdit(settings.value("mountpoint_4").toString());
231 _refSys_4_ComboBox = new QComboBox;
232 _refSys_4_ComboBox->setEditable(false);
233 _refSys_4_ComboBox->addItems(QString("IGS05,ETRF2000,NAD83,GDA94,SIRGAS2000,Custom").split(","));
234 ii = _refSys_4_ComboBox->findText(settings.value("refSys_4").toString());
235 if (ii != -1) {
236 _refSys_4_ComboBox->setCurrentIndex(ii);
237 }
238 _outFile_4_LineEdit = new QLineEdit(settings.value("outFile_4").toString());
239 _CoM_4_CheckBox = new QCheckBox();
240 _CoM_4_CheckBox->setCheckState(Qt::CheckState(settings.value("CoM_4").toInt()));
241
242 // Broadcast Corrections V Options
243 // -------------------------------
244 _outHost_5_LineEdit = new QLineEdit(settings.value("outHost5").toString());
245 _outPort_5_LineEdit = new QLineEdit(settings.value("outPort5").toString());
246 _password_5_LineEdit = new QLineEdit(settings.value("password5").toString());
247 _password_5_LineEdit->setEchoMode(QLineEdit::Password);
248 _mountpoint_5_LineEdit = new QLineEdit(settings.value("mountpoint_5").toString());
249 _refSys_5_ComboBox = new QComboBox;
250 _refSys_5_ComboBox->setEditable(false);
251 _refSys_5_ComboBox->addItems(QString("IGS05,ETRF2000,NAD83,GDA94,SIRGAS2000,Custom").split(","));
252 ii = _refSys_5_ComboBox->findText(settings.value("refSys_5").toString());
253 if (ii != -1) {
254 _refSys_5_ComboBox->setCurrentIndex(ii);
255 }
256 _outFile_5_LineEdit = new QLineEdit(settings.value("outFile_5").toString());
257 _CoM_5_CheckBox = new QCheckBox();
258 _CoM_5_CheckBox->setCheckState(Qt::CheckState(settings.value("CoM_5").toInt()));
259
260 // Broadcast Corrections VI Options
261 // --------------------------------
262 _outHost_6_LineEdit = new QLineEdit(settings.value("outHost6").toString());
263 _outPort_6_LineEdit = new QLineEdit(settings.value("outPort6").toString());
264 _password_6_LineEdit = new QLineEdit(settings.value("password6").toString());
265 _password_6_LineEdit->setEchoMode(QLineEdit::Password);
266 _mountpoint_6_LineEdit = new QLineEdit(settings.value("mountpoint_6").toString());
267 _refSys_6_ComboBox = new QComboBox;
268 _refSys_6_ComboBox->setEditable(false);
269 _refSys_6_ComboBox->addItems(QString("IGS05,ETRF2000,NAD83,GDA94,SIRGAS2000,Custom").split(","));
270 ii = _refSys_6_ComboBox->findText(settings.value("refSys_6").toString());
271 if (ii != -1) {
272 _refSys_6_ComboBox->setCurrentIndex(ii);
273 }
274 _outFile_6_LineEdit = new QLineEdit(settings.value("outFile_6").toString());
275 _CoM_6_CheckBox = new QCheckBox();
276 _CoM_6_CheckBox->setCheckState(Qt::CheckState(settings.value("CoM_6").toInt()));
277
278 // Broadcast Ephemerides
279 // ---------------------
280 _outHost_Eph_LineEdit = new QLineEdit(settings.value("outHostEph").toString());
281 _outPort_Eph_LineEdit = new QLineEdit(settings.value("outPortEph").toString());
282 _password_Eph_LineEdit = new QLineEdit(settings.value("passwordEph").toString());
283 _password_Eph_LineEdit->setEchoMode(QLineEdit::Password);
284 _mountpoint_Eph_LineEdit = new QLineEdit(settings.value("mountpoint_Eph").toString());
285 _samplEphSpinBox = new QSpinBox;
286 _samplEphSpinBox->setMinimum(0);
287 _samplEphSpinBox->setMaximum(60);
288 _samplEphSpinBox->setSingleStep(5);
289 _samplEphSpinBox->setMaximumWidth(9*ww);
290 _samplEphSpinBox->setValue(settings.value("samplEph").toInt());
291 _samplEphSpinBox->setSuffix(" sec");
292
293 // RINEX Clocks Options
294 // --------------------
295 _rnxPathLineEdit = new QLineEdit(settings.value("rnxPath").toString());
296 _rnxIntrComboBox = new QComboBox;
297 _rnxIntrComboBox->setEditable(false);
298 _rnxIntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
299 ii = _rnxIntrComboBox->findText(settings.value("rnxIntr").toString());
300 if (ii != -1) {
301 _rnxIntrComboBox->setCurrentIndex(ii);
302 }
303 _rnxSamplSpinBox = new QSpinBox;
304 _rnxSamplSpinBox->setMinimum(0);
305 _rnxSamplSpinBox->setMaximum(60);
306 _rnxSamplSpinBox->setSingleStep(5);
307 _rnxSamplSpinBox->setMaximumWidth(9*ww);
308 _rnxSamplSpinBox->setValue(settings.value("rnxSampl").toInt());
309 _rnxSamplSpinBox->setSuffix(" sec");
310
311 // SP3 Orbits Options
312 // ------------------
313 _sp3PathLineEdit = new QLineEdit(settings.value("sp3Path").toString());
314 _sp3IntrComboBox = new QComboBox;
315 _sp3IntrComboBox->setEditable(false);
316 _sp3IntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
317 ii = _sp3IntrComboBox->findText(settings.value("sp3Intr").toString());
318 if (ii != -1) {
319 _sp3IntrComboBox->setCurrentIndex(ii);
320 }
321 _sp3SamplSpinBox = new QSpinBox;
322 _sp3SamplSpinBox->setMinimum(0);
323 _sp3SamplSpinBox->setMaximum(900);
324 _sp3SamplSpinBox->setSingleStep(60);
325 _sp3SamplSpinBox->setMaximumWidth(9*ww);
326 _sp3SamplSpinBox->setValue(settings.value("sp3Sampl").toInt());
327 _sp3SamplSpinBox->setSuffix(" sec");
328
329 // Whats This
330 // ----------
331 _proxyHostLineEdit->setWhatsThis(tr("<p>If you are running BNS 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 BNS. 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 BNS outside your LAN on a network that has unobstructed connection to the Internet.</p>"));
332 _proxyPortLineEdit->setWhatsThis(tr("<p>Enter your proxy server port number in case one is operated in front of BNS.</p>"));
333 _logFileLineEdit->setWhatsThis(tr("<p>Records of BNS activities are shown in the Log 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>"));
334 _fileAppendCheckBox->setWhatsThis(tr("<p>When BNS 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 BNS, a system crash or when BNS crashed. Tick 'Append files' to continue with existing files and keep what has been recorded so far.</p>"));
335 _inpEchoLineEdit->setWhatsThis(tr("Specify the full path to a file where incoming clocks and orbits are saved. Beware that the size of this file can rapidly increase. Default is an empty option field meaning that incoming clocks and orbits are not saved."));
336 _ephHostLineEdit->setWhatsThis(tr("BNS reads Broadcast Ephemeris in RINEX Version 3 Navigation file format from an IP address. Specify the host IP e.g. of a BNC installation providing this information."));
337 _ephPortLineEdit->setWhatsThis(tr("BNS reads Broadcast Ephemeris in RINEX Version 3 Navigation file format from an IP address. Specify the IP port e.g. of a BNC installation providing this information."));
338 _ephEchoLineEdit->setWhatsThis(tr("Specify the full path to a file where incoming Broadcast Ephemeris are saved. Beware that the size of this file can rapidly increase. Default is an empty option field meaning that incoming Broadcast Ephemeris are not saved."));
339 _clkPortLineEdit->setWhatsThis(tr("BNS reads Clocks & Orbits referring to the IGS system (X,Y,Z, ECEF) in SP3 format from an IP port. Specify a local IP port e.g. for an RTNet installation to provide this information."));
340
341 _outHost_1_LineEdit->setWhatsThis(tr("BNS can stream clock and orbit Corrections to Broadcast Ephemeris (Broadcast Corrections) in RTCM Version 3 format. Specify the host IP of an NTRIP Broadcaster to upload the stream. An empty option field means that you don't want to upload corrections."));
342 _outPort_1_LineEdit->setWhatsThis(tr("Specify the IP port of an NTRIP Broadcaster to upload the stream. Default is port 80."));
343 _mountpoint_1_LineEdit->setWhatsThis(tr("Specify the mounpoint for stream upload to an NTRIP Broadcaster."));
344 _password_1_LineEdit->setWhatsThis(tr("Specify the stream upload password protecting the mounpoint on an NTRIP Broadcaster."));
345 _refSys_1_ComboBox->setWhatsThis(tr("Select the target reference system for outgoing clock and orbit corrections."));
346 _outFile_1_LineEdit->setWhatsThis(tr("Specify the full path to a file where outgoing clock and orbit corrections to Broadcast Ephemeris are saved. Beware that the size of this file can rapidly increase. Default is an empty option field meaning that outgoing corrections are not saved."));
347
348 _outHost_2_LineEdit->setWhatsThis(tr("BNS can stream clock and orbit Corrections to Broadcast Ephemeris (Broadcast Corrections) in RTCM Version 3 format. Specify the host IP of an NTRIP Broadcaster to upload the stream. An empty option field means that you don't want to upload corrections."));
349 _outPort_2_LineEdit->setWhatsThis(tr("Specify the IP port of an NTRIP Broadcaster to upload the stream. Default is port 80."));
350 _mountpoint_2_LineEdit->setWhatsThis(tr("Specify the mounpoint for stream upload to an NTRIP Broadcaster."));
351 _password_2_LineEdit->setWhatsThis(tr("Specify the stream upload password protecting the mounpoint on an NTRIP Broadcaster."));
352 _refSys_2_ComboBox->setWhatsThis(tr("Select the target reference system for outgoing clock and orbit corrections."));
353 _outFile_2_LineEdit->setWhatsThis(tr("Specify the full path to a file where outgoing clock and orbit corrections to Broadcast Ephemeris are saved. Beware that the size of this file can rapidly increase. Default is an empty option field meaning that outgoing corrections are not saved."));
354
355 _outHost_3_LineEdit->setWhatsThis(tr("BNS can stream clock and orbit Corrections to Broadcast Ephemeris (Broadcast Corrections) in RTCM Version 3 format. Specify the host IP of an NTRIP Broadcaster to upload the stream. An empty option field means that you don't want to upload corrections."));
356 _outPort_3_LineEdit->setWhatsThis(tr("Specify the IP port of an NTRIP Broadcaster to upload the stream. Default is port 80."));
357 _mountpoint_3_LineEdit->setWhatsThis(tr("Specify the mounpoint for stream upload to an NTRIP Broadcaster."));
358 _password_3_LineEdit->setWhatsThis(tr("Specify the stream upload password protecting the mounpoint on an NTRIP Broadcaster."));
359 _refSys_3_ComboBox->setWhatsThis(tr("Select the target reference system for outgoing clock and orbit corrections."));
360 _outFile_3_LineEdit->setWhatsThis(tr("Specify the full path to a file where outgoing clock and orbit corrections to Broadcast Ephemeris are saved. Beware that the size of this file can rapidly increase. Default is an empty option field meaning that outgoing corrections are not saved."));
361
362 _outHost_4_LineEdit->setWhatsThis(tr("BNS can stream clock and orbit Corrections to Broadcast Ephemeris (Broadcast Corrections) in RTCM Version 4 format. Specify the host IP of an NTRIP Broadcaster to upload the stream. An empty option field means that you don't want to upload corrections."));
363 _outPort_4_LineEdit->setWhatsThis(tr("Specify the IP port of an NTRIP Broadcaster to upload the stream. Default is port 80."));
364 _mountpoint_4_LineEdit->setWhatsThis(tr("Specify the mounpoint for stream upload to an NTRIP Broadcaster."));
365 _password_4_LineEdit->setWhatsThis(tr("Specify the stream upload password protecting the mounpoint on an NTRIP Broadcaster."));
366 _refSys_4_ComboBox->setWhatsThis(tr("Select the target reference system for outgoing clock and orbit corrections."));
367 _outFile_4_LineEdit->setWhatsThis(tr("Specify the full path to a file where outgoing clock and orbit corrections to Broadcast Ephemeris are saved. Beware that the size of this file can rapidly increase. Default is an empty option field meaning that outgoing corrections are not saved."));
368
369 _outHost_5_LineEdit->setWhatsThis(tr("BNS can stream clock and orbit Corrections to Broadcast Ephemeris (Broadcast Corrections) in RTCM Version 3 format. Specify the host IP of an NTRIP Broadcaster to upload the stream. An empty option field means that you don't want to upload corrections."));
370 _outPort_5_LineEdit->setWhatsThis(tr("Specify the IP port of an NTRIP Broadcaster to upload the stream. Default is port 80."));
371 _mountpoint_5_LineEdit->setWhatsThis(tr("Specify the mounpoint for stream upload to an NTRIP Broadcaster."));
372 _password_5_LineEdit->setWhatsThis(tr("Specify the stream upload password protecting the mounpoint on an NTRIP Broadcaster."));
373 _refSys_5_ComboBox->setWhatsThis(tr("Select the target reference system for outgoing clock and orbit corrections."));
374 _outFile_5_LineEdit->setWhatsThis(tr("Specify the full path to a file where outgoing clock and orbit corrections to Broadcast Ephemeris are saved. Beware that the size of this file can rapidly increase. Default is an empty option field meaning that outgoing corrections are not saved."));
375
376 _outHost_6_LineEdit->setWhatsThis(tr("BNS can stream clock and orbit Corrections to Broadcast Ephemeris (Broadcast Corrections) in RTCM Version 6 format. Specify the host IP of an NTRIP Broadcaster to upload the stream. An empty option field means that you don't want to upload corrections."));
377 _outPort_6_LineEdit->setWhatsThis(tr("Specify the IP port of an NTRIP Broadcaster to upload the stream. Default is port 80."));
378 _mountpoint_6_LineEdit->setWhatsThis(tr("Specify the mounpoint for stream upload to an NTRIP Broadcaster."));
379 _password_6_LineEdit->setWhatsThis(tr("Specify the stream upload password protecting the mounpoint on an NTRIP Broadcaster."));
380 _refSys_6_ComboBox->setWhatsThis(tr("Select the target reference system for outgoing clock and orbit corrections."));
381 _outFile_6_LineEdit->setWhatsThis(tr("Specify the full path to a file where outgoing clock and orbit corrections to Broadcast Ephemeris are saved. Beware that the size of this file can rapidly increase. Default is an empty option field meaning that outgoing corrections are not saved."));
382
383 _outHost_Eph_LineEdit->setWhatsThis(tr("BNS can upload a Broadcast Ephemeris stream in RTCM Version 3 format. Specify the host IP of an NTRIP Broadcaster to upload the stream. An empty option field means that you don't want to upload Broadcast Ephemeris."));
384 _outPort_Eph_LineEdit->setWhatsThis(tr("Specify the IP port of an NTRIP Broadcaster to upload the stream. Default is port 80."));
385 _mountpoint_Eph_LineEdit->setWhatsThis(tr("Specify the mounpoint for stream upload to an NTRIP Broadcaster."));
386 _password_Eph_LineEdit->setWhatsThis(tr("Specify the stream upload password protecting the mounpoint on an NTRIP Broadcaster."));
387 _samplEphSpinBox->setWhatsThis(tr("Select the Broadcast Ephemeris sampling interval in seconds. Defaut is '5' meaning that a complete set of Broadcast Ephemeris is uploaded every 5 seconds."));
388 _rnxPathLineEdit->setWhatsThis(tr("Specify the path for saving the generated clock corrections as Clock RINEX files. If the specified directory does not exist, BNS will not create Clock RINEX files."));
389 _rnxIntrComboBox->setWhatsThis(tr("Select the length of the Clock RINEX file."));
390 _rnxSamplSpinBox->setWhatsThis(tr("Select the Clock RINEX file sampling interval in seconds. A value of zero '0' tells BNS to store all available samples into Clock RINEX files."));
391 _sp3PathLineEdit->setWhatsThis(tr("Specify the path for saving the generated orbit corrections as SP3 orbit files. If the specified directory does not exist, BNS will not create SP3 orbit files."));
392 _sp3IntrComboBox->setWhatsThis(tr("Select the length of the SP3 orbit file."));
393 _sp3SamplSpinBox->setWhatsThis(tr("Select the SP3 orbit file sampling interval in seconds. A value of zero '0' tells BNS to store all available samples into SP3 orbit files."));
394 _autoStartCheckBox->setWhatsThis(tr("<p>Tick 'Auto start' for auto-start of BNS at startup time in window mode with preassigned processing options.</p>"));
395 _CoM_1_CheckBox->setWhatsThis(tr("<p>By default orbit and clock corrections refer to APC. Tick 'Center of Mass' to refer uploaded corrections to CoM.</p>"));
396 _CoM_2_CheckBox->setWhatsThis(tr("<p>By default orbit and clock corrections refer to APC. Tick 'Center of Mass' to refer uploaded corrections to CoM.</p>"));
397 _CoM_3_CheckBox->setWhatsThis(tr("<p>By default orbit and clock corrections refer to APC. Tick 'Center of Mass' to refer uploaded corrections to CoM.</p>"));
398
399
400 // TabWidget
401 // ---------
402 tabs = new QTabWidget();
403
404 // Proxy Tab
405 // ---------
406 QWidget* tab_prx = new QWidget();
407 tabs->setMaximumHeight(20*ww);
408 tabs->addTab(tab_prx, "Proxy");
409
410 QGridLayout* layout_prx = new QGridLayout;
411
412 layout_prx->setColumnMinimumWidth(0,9*ww);
413 _proxyPortLineEdit->setMaximumWidth(9*ww);
414
415 layout_prx->addWidget(new QLabel("Host"), 0, 0);
416 layout_prx->addWidget(_proxyHostLineEdit, 0, 1, 1, 10);
417 layout_prx->addWidget(new QLabel("Port"), 1, 0);
418 layout_prx->addWidget(_proxyPortLineEdit, 1, 1);
419 layout_prx->addWidget(new QLabel("Settings for the proxy in protected networks, leave boxes blank if none."),2, 0, 1, 50, Qt::AlignLeft);
420 layout_prx->addWidget(new QLabel(" "), 3, 0);
421
422 tab_prx->setLayout(layout_prx);
423
424 connect(_proxyHostLineEdit, SIGNAL(textChanged(const QString &)),
425 this, SLOT(slotBnsTextChanged()));
426
427 // General Tab
428 // -----------
429 QWidget* tab_gen = new QWidget();
430 tabs->addTab(tab_gen, "General");
431
432 QGridLayout* layout_gen = new QGridLayout;
433
434 layout_gen->setColumnMinimumWidth(0,9*ww);
435 _logFileLineEdit->setMaximumWidth(40*ww);
436
437 layout_gen->addWidget(new QLabel("Logfile (full path) "), 0, 0);
438 layout_gen->addWidget(_logFileLineEdit, 0, 1);
439 layout_gen->addWidget(new QLabel("Append files"), 1, 0);
440 layout_gen->addWidget(_fileAppendCheckBox, 1, 1);
441 layout_gen->addWidget(new QLabel("Auto start"), 2, 0);
442 layout_gen->addWidget(_autoStartCheckBox, 2, 1);
443 layout_gen->addWidget(new QLabel("General settings for logfile and file handling."), 3, 0, 1, 50, Qt::AlignLeft);
444
445 tab_gen->setLayout(layout_gen);
446
447 // RINEX Ephemeris Tab
448 // -------------------
449 QWidget* tab_eph = new QWidget();
450 tabs->addTab(tab_eph, "RINEX Ephemeris");
451
452 QGridLayout* layout_eph = new QGridLayout;
453
454 layout_eph->setColumnMinimumWidth(0, 9*ww);
455 _ephPortLineEdit->setMaximumWidth(9*ww);
456
457 layout_eph->addWidget(new QLabel("Host"), 0, 0);
458 layout_eph->addWidget(_ephHostLineEdit, 0, 1, 1, 10);
459 layout_eph->addWidget(new QLabel("Port"), 1, 0);
460 layout_eph->addWidget(_ephPortLineEdit, 1, 1);
461 layout_eph->addWidget(new QLabel("Save (full path)"), 2, 0);
462 layout_eph->addWidget(_ephEchoLineEdit, 2, 1, 1, 26);
463 layout_eph->addWidget(new QLabel("Read broadcast ephemeris in RINEX Version 3 Navigation format."), 3, 0, 1, 50, Qt::AlignLeft);
464
465 tab_eph->setLayout(layout_eph);
466
467 connect(_ephHostLineEdit, SIGNAL(textChanged(const QString &)),
468 this, SLOT(slotBnsTextChanged()));
469
470 // Clocks & Orbits Tab
471 // -------------------
472 QWidget* tab_co = new QWidget();
473 tabs->addTab(tab_co,"Clocks && Orbits");
474
475 QGridLayout* layout_co = new QGridLayout;
476
477 layout_co->setColumnMinimumWidth(0, 9*ww);
478 _clkPortLineEdit->setMaximumWidth(9*ww);
479
480 layout_co->addWidget(new QLabel("Listening port"), 0, 0);
481 layout_co->addWidget(_clkPortLineEdit, 0, 1);
482 layout_co->addWidget(new QLabel("Save (full path) "), 1, 0);
483 layout_co->addWidget(_inpEchoLineEdit, 1, 1);
484 layout_co->addWidget(new QLabel("Read clocks and orbits in SP3 format."), 2, 0, 1, 50, Qt::AlignLeft);
485 layout_co->addWidget(new QLabel(""), 3, 0);
486
487 tab_co->setLayout(layout_co);
488
489 connect(_clkPortLineEdit, SIGNAL(textChanged(const QString &)),
490 this, SLOT(slotBnsTextChanged()));
491
492 // Broadcast Corrections I Tab
493 // ---------------------------
494 QWidget* tab_cas1 = new QWidget();
495 tabs->addTab(tab_cas1, "BC I");
496
497 QGridLayout* layout_cas1 = new QGridLayout;
498
499 layout_cas1->setColumnMinimumWidth(0, 9*ww);
500 _outPort_1_LineEdit->setMaximumWidth(9*ww);
501 _password_1_LineEdit->setMaximumWidth(9*ww);
502 _mountpoint_1_LineEdit->setMaximumWidth(12*ww);
503 _refSys_1_ComboBox->setMaximumWidth(12*ww);
504
505 layout_cas1->addWidget(new QLabel("Host"), 0, 0);
506 layout_cas1->addWidget(_outHost_1_LineEdit, 0, 1, 1, 3);
507 layout_cas1->addWidget(new QLabel(" Port"), 0, 4, Qt::AlignRight);
508 layout_cas1->addWidget(_outPort_1_LineEdit, 0, 5, 1, 10);
509 layout_cas1->addWidget(new QLabel("Mountpoint"), 1, 0);
510 layout_cas1->addWidget(_mountpoint_1_LineEdit, 1, 1);
511 layout_cas1->addWidget(new QLabel("Password"), 1, 2, Qt::AlignRight);
512 layout_cas1->addWidget(_password_1_LineEdit, 1, 3);
513 layout_cas1->addWidget(new QLabel(" "), 1, 4);
514 layout_cas1->addWidget(new QLabel(" "), 1, 5);
515 layout_cas1->addWidget(new QLabel("System"), 2, 0);
516 layout_cas1->addWidget(_refSys_1_ComboBox, 2, 1);
517 layout_cas1->addWidget(new QLabel(" Save (full path)"), 2, 2, Qt::AlignRight);
518 layout_cas1->addWidget(_outFile_1_LineEdit, 2, 3, 1, 30);
519 layout_cas1->addWidget(new QLabel("Center of Mass"), 3, 0);
520 layout_cas1->addWidget(_CoM_1_CheckBox, 3, 1);
521 layout_cas1->addWidget(new QLabel("Produce broadcast ephemeris corrections, upload to caster, reference system, local storage."), 4, 0, 1, 50);
522
523 tab_cas1->setLayout(layout_cas1);
524
525 connect(_refSys_1_ComboBox, SIGNAL(currentIndexChanged(const QString &)),
526 this, SLOT(customTrafo(const QString)));
527
528 connect(_outHost_1_LineEdit, SIGNAL(textChanged(const QString &)),
529 this, SLOT(slotBnsTextChanged()));
530
531 // Broadcast Corrections II Tab
532 // ----------------------------
533 QWidget* tab_cas2 = new QWidget();
534 tabs->addTab(tab_cas2, "BC II");
535
536 QGridLayout* layout_cas2 = new QGridLayout;
537
538 layout_cas2->setColumnMinimumWidth(0, 9*ww);
539 _outPort_2_LineEdit->setMaximumWidth(9*ww);
540 _password_2_LineEdit->setMaximumWidth(9*ww);
541 _mountpoint_2_LineEdit->setMaximumWidth(12*ww);
542 _refSys_2_ComboBox->setMaximumWidth(12*ww);
543
544 layout_cas2->addWidget(new QLabel("Host"), 0, 0);
545 layout_cas2->addWidget(_outHost_2_LineEdit, 0, 1, 1, 3);
546 layout_cas2->addWidget(new QLabel(" Port"), 0, 4, Qt::AlignRight);
547 layout_cas2->addWidget(_outPort_2_LineEdit, 0, 5, 1, 10);
548 layout_cas2->addWidget(new QLabel("Mountpoint"), 1, 0);
549 layout_cas2->addWidget(_mountpoint_2_LineEdit, 1, 1);
550 layout_cas2->addWidget(new QLabel("Password"), 1, 2, Qt::AlignRight);
551 layout_cas2->addWidget(_password_2_LineEdit, 1, 3);
552 layout_cas2->addWidget(new QLabel(" "), 1, 4);
553 layout_cas2->addWidget(new QLabel(" "), 1, 5);
554 layout_cas2->addWidget(new QLabel("System"), 2, 0);
555 layout_cas2->addWidget(_refSys_2_ComboBox, 2, 1);
556 layout_cas2->addWidget(new QLabel(" Save (full path)"), 2, 2, Qt::AlignRight);
557 layout_cas2->addWidget(_outFile_2_LineEdit, 2, 3, 1, 30);
558 layout_cas2->addWidget(new QLabel("Center of Mass"), 3, 0);
559 layout_cas2->addWidget(_CoM_2_CheckBox, 3, 1);
560 layout_cas2->addWidget(new QLabel("Produce broadcast ephemeris corrections, upload to caster, reference system, local storage."), 4, 0, 1, 50);
561
562 tab_cas2->setLayout(layout_cas2);
563
564 connect(_refSys_2_ComboBox, SIGNAL(currentIndexChanged(const QString &)),
565 this, SLOT(customTrafo(const QString)));
566
567 connect(_outHost_2_LineEdit, SIGNAL(textChanged(const QString &)),
568 this, SLOT(slotBnsTextChanged()));
569
570 // Broadcast Corrections III Tab
571 // -----------------------------
572 QWidget* tab_cas3 = new QWidget();
573 tabs->addTab(tab_cas3, "BC III");
574
575 QGridLayout* layout_cas3 = new QGridLayout;
576
577 layout_cas3->setColumnMinimumWidth(0, 9*ww);
578 _outPort_3_LineEdit->setMaximumWidth(9*ww);
579 _password_3_LineEdit->setMaximumWidth(9*ww);
580 _mountpoint_3_LineEdit->setMaximumWidth(12*ww);
581 _refSys_3_ComboBox->setMaximumWidth(12*ww);
582
583 layout_cas3->addWidget(new QLabel("Host"), 0, 0);
584 layout_cas3->addWidget(_outHost_3_LineEdit, 0, 1, 1, 3);
585 layout_cas3->addWidget(new QLabel(" Port"), 0, 4, Qt::AlignRight);
586 layout_cas3->addWidget(_outPort_3_LineEdit, 0, 5, 1, 10);
587 layout_cas3->addWidget(new QLabel("Mountpoint"), 1, 0);
588 layout_cas3->addWidget(_mountpoint_3_LineEdit, 1, 1);
589 layout_cas3->addWidget(new QLabel("Password"), 1, 2, Qt::AlignRight);
590 layout_cas3->addWidget(_password_3_LineEdit, 1, 3);
591 layout_cas3->addWidget(new QLabel(" "), 1, 4);
592 layout_cas3->addWidget(new QLabel(" "), 1, 5);
593 layout_cas3->addWidget(new QLabel("System"), 2, 0);
594 layout_cas3->addWidget(_refSys_3_ComboBox, 2, 1);
595 layout_cas3->addWidget(new QLabel(" Save (full path)"), 2, 2, Qt::AlignRight);
596 layout_cas3->addWidget(_outFile_3_LineEdit, 2, 3, 1, 30);
597 layout_cas3->addWidget(new QLabel("Center of Mass"), 3, 0);
598 layout_cas3->addWidget(_CoM_3_CheckBox, 3, 1);
599 layout_cas3->addWidget(new QLabel("Produce broadcast ephemeris corrections, upload to caster, reference system, local storage."), 4, 0, 1, 50);
600
601 tab_cas3->setLayout(layout_cas3);
602
603 connect(_refSys_3_ComboBox, SIGNAL(currentIndexChanged(const QString &)),
604 this, SLOT(customTrafo(const QString)));
605
606 connect(_outHost_3_LineEdit, SIGNAL(textChanged(const QString &)),
607 this, SLOT(slotBnsTextChanged()));
608
609 // Broadcast Corrections IV Tab
610 // ----------------------------
611 QWidget* tab_cas4 = new QWidget();
612 tabs->addTab(tab_cas4, "BC IV");
613
614 QGridLayout* layout_cas4 = new QGridLayout;
615
616 layout_cas4->setColumnMinimumWidth(0, 9*ww);
617 _outPort_4_LineEdit->setMaximumWidth(9*ww);
618 _password_4_LineEdit->setMaximumWidth(9*ww);
619 _mountpoint_4_LineEdit->setMaximumWidth(12*ww);
620 _refSys_4_ComboBox->setMaximumWidth(12*ww);
621
622 layout_cas4->addWidget(new QLabel("Host"), 0, 0);
623 layout_cas4->addWidget(_outHost_4_LineEdit, 0, 1, 1, 3);
624 layout_cas4->addWidget(new QLabel(" Port"), 0, 4, Qt::AlignRight);
625 layout_cas4->addWidget(_outPort_4_LineEdit, 0, 5, 1, 10);
626 layout_cas4->addWidget(new QLabel("Mountpoint"), 1, 0);
627 layout_cas4->addWidget(_mountpoint_4_LineEdit, 1, 1);
628 layout_cas4->addWidget(new QLabel("Password"), 1, 2, Qt::AlignRight);
629 layout_cas4->addWidget(_password_4_LineEdit, 1, 3);
630 layout_cas4->addWidget(new QLabel(" "), 1, 4);
631 layout_cas4->addWidget(new QLabel(" "), 1, 5);
632 layout_cas4->addWidget(new QLabel("System"), 2, 0);
633 layout_cas4->addWidget(_refSys_4_ComboBox, 2, 1);
634 layout_cas4->addWidget(new QLabel(" Save (full path)"), 2, 2, Qt::AlignRight);
635 layout_cas4->addWidget(_outFile_4_LineEdit, 2, 3, 1, 30);
636 layout_cas4->addWidget(new QLabel("Center of Mass"), 3, 0);
637 layout_cas4->addWidget(_CoM_4_CheckBox, 3, 1);
638 layout_cas4->addWidget(new QLabel("Produce broadcast ephemeris corrections, upload to caster, reference system, local storage."), 4, 0, 1, 50);
639
640 tab_cas4->setLayout(layout_cas4);
641
642 connect(_refSys_4_ComboBox, SIGNAL(currentIndexChanged(const QString &)),
643 this, SLOT(customTrafo(const QString)));
644
645 connect(_outHost_4_LineEdit, SIGNAL(textChanged(const QString &)),
646 this, SLOT(slotBnsTextChanged()));
647
648 // Broadcast Corrections V Tab
649 // ---------------------------
650 QWidget* tab_cas5 = new QWidget();
651 tabs->addTab(tab_cas5, "BC V");
652
653 QGridLayout* layout_cas5 = new QGridLayout;
654
655 layout_cas5->setColumnMinimumWidth(0, 9*ww);
656 _outPort_5_LineEdit->setMaximumWidth(9*ww);
657 _password_5_LineEdit->setMaximumWidth(9*ww);
658 _mountpoint_5_LineEdit->setMaximumWidth(12*ww);
659 _refSys_5_ComboBox->setMaximumWidth(12*ww);
660
661 layout_cas5->addWidget(new QLabel("Host"), 0, 0);
662 layout_cas5->addWidget(_outHost_5_LineEdit, 0, 1, 1, 3);
663 layout_cas5->addWidget(new QLabel(" Port"), 0, 4, Qt::AlignRight);
664 layout_cas5->addWidget(_outPort_5_LineEdit, 0, 5, 1, 10);
665 layout_cas5->addWidget(new QLabel("Mountpoint"), 1, 0);
666 layout_cas5->addWidget(_mountpoint_5_LineEdit, 1, 1);
667 layout_cas5->addWidget(new QLabel("Password"), 1, 2, Qt::AlignRight);
668 layout_cas5->addWidget(_password_5_LineEdit, 1, 3);
669 layout_cas5->addWidget(new QLabel(" "), 1, 4);
670 layout_cas5->addWidget(new QLabel(" "), 1, 5);
671 layout_cas5->addWidget(new QLabel("System"), 2, 0);
672 layout_cas5->addWidget(_refSys_5_ComboBox, 2, 1);
673 layout_cas5->addWidget(new QLabel(" Save (full path)"), 2, 2, Qt::AlignRight);
674 layout_cas5->addWidget(_outFile_5_LineEdit, 2, 3, 1, 30);
675 layout_cas5->addWidget(new QLabel("Center of Mass"), 3, 0);
676 layout_cas5->addWidget(_CoM_5_CheckBox, 3, 1);
677 layout_cas5->addWidget(new QLabel("Produce broadcast ephemeris corrections, upload to caster, reference system, local storage."), 4, 0, 1, 50);
678
679 tab_cas5->setLayout(layout_cas5);
680
681 connect(_refSys_5_ComboBox, SIGNAL(currentIndexChanged(const QString &)),
682 this, SLOT(customTrafo(const QString)));
683
684 connect(_outHost_5_LineEdit, SIGNAL(textChanged(const QString &)),
685 this, SLOT(slotBnsTextChanged()));
686
687 // Broadcast Corrections VI Tab
688 // ----------------------------
689 QWidget* tab_cas6 = new QWidget();
690 tabs->addTab(tab_cas6, "BC VI");
691
692 QGridLayout* layout_cas6 = new QGridLayout;
693
694 layout_cas6->setColumnMinimumWidth(0, 9*ww);
695 _outPort_6_LineEdit->setMaximumWidth(9*ww);
696 _password_6_LineEdit->setMaximumWidth(9*ww);
697 _mountpoint_6_LineEdit->setMaximumWidth(12*ww);
698 _refSys_6_ComboBox->setMaximumWidth(12*ww);
699
700 layout_cas6->addWidget(new QLabel("Host"), 0, 0);
701 layout_cas6->addWidget(_outHost_6_LineEdit, 0, 1, 1, 3);
702 layout_cas6->addWidget(new QLabel(" Port"), 0, 4, Qt::AlignRight);
703 layout_cas6->addWidget(_outPort_6_LineEdit, 0, 5, 1, 10);
704 layout_cas6->addWidget(new QLabel("Mountpoint"), 1, 0);
705 layout_cas6->addWidget(_mountpoint_6_LineEdit, 1, 1);
706 layout_cas6->addWidget(new QLabel("Password"), 1, 2, Qt::AlignRight);
707 layout_cas6->addWidget(_password_6_LineEdit, 1, 3);
708 layout_cas6->addWidget(new QLabel(" "), 1, 4);
709 layout_cas6->addWidget(new QLabel(" "), 1, 5);
710 layout_cas6->addWidget(new QLabel("System"), 2, 0);
711 layout_cas6->addWidget(_refSys_6_ComboBox, 2, 1);
712 layout_cas6->addWidget(new QLabel(" Save (full path)"), 2, 2, Qt::AlignRight);
713 layout_cas6->addWidget(_outFile_6_LineEdit, 2, 3, 1, 30);
714 layout_cas6->addWidget(new QLabel("Center of Mass"), 3, 0);
715 layout_cas6->addWidget(_CoM_6_CheckBox, 3, 1);
716 layout_cas6->addWidget(new QLabel("Produce broadcast ephemeris corrections, upload to caster, reference system, local storage."), 4, 0, 1, 50);
717
718 tab_cas6->setLayout(layout_cas6);
719
720 connect(_refSys_6_ComboBox, SIGNAL(currentIndexChanged(const QString &)),
721 this, SLOT(customTrafo(const QString)));
722
723 connect(_outHost_6_LineEdit, SIGNAL(textChanged(const QString &)),
724 this, SLOT(slotBnsTextChanged()));
725
726 // Broadcast Ephemerides
727 // ---------------------
728 QWidget* tab_casEph = new QWidget();
729 tabs->addTab(tab_casEph, "Broadcast Ephemeris");
730
731 QGridLayout* layout_casEph = new QGridLayout;
732
733 layout_casEph->setColumnMinimumWidth(0, 9*ww);
734 _outPort_Eph_LineEdit->setMaximumWidth(9*ww);
735 _password_Eph_LineEdit->setMaximumWidth(9*ww);
736 _mountpoint_Eph_LineEdit->setMaximumWidth(12*ww);
737
738 layout_casEph->addWidget(new QLabel("Host"), 0, 0);
739 layout_casEph->addWidget(_outHost_Eph_LineEdit, 0, 1, 1, 3);
740 layout_casEph->addWidget(new QLabel(" Port"), 0, 4, Qt::AlignRight);
741 layout_casEph->addWidget(_outPort_Eph_LineEdit, 0, 5, 1, 10);
742 layout_casEph->addWidget(new QLabel("Mountpoint "), 1, 0);
743 layout_casEph->addWidget(_mountpoint_Eph_LineEdit, 1, 1);
744 layout_casEph->addWidget(new QLabel(" Password"), 1, 2, Qt::AlignRight);
745 layout_casEph->addWidget(_password_Eph_LineEdit, 1, 3);
746 layout_casEph->addWidget(new QLabel("Sampling"), 2, 0);
747 layout_casEph->addWidget(_samplEphSpinBox, 2, 1);
748 layout_casEph->addWidget(new QLabel("Upload concatenated RTCMv3 Broadcast Ephemeris to caster."), 3, 0, 1, 50);
749
750 tab_casEph->setLayout(layout_casEph);
751
752 connect(_outHost_Eph_LineEdit, SIGNAL(textChanged(const QString &)),
753 this, SLOT(slotBnsTextChanged()));
754
755 // RINEX Clocks Tab
756 // ----------------
757 QWidget* tab_rin = new QWidget();
758 tabs->addTab(tab_rin, "RINEX Clocks ");
759
760 QGridLayout* layout_rin = new QGridLayout;
761
762 layout_rin->setColumnMinimumWidth(0, 9*ww);
763 _rnxIntrComboBox->setMaximumWidth(9*ww);
764
765 layout_rin->addWidget(new QLabel("Directory"), 0, 0);
766 layout_rin->addWidget(_rnxPathLineEdit, 0, 1, 1, 27);
767 layout_rin->addWidget(new QLabel("Interval"), 1, 0);
768 layout_rin->addWidget(_rnxIntrComboBox, 1, 1);
769 layout_rin->addWidget(new QLabel("Sampling"), 2, 0);
770 layout_rin->addWidget(_rnxSamplSpinBox, 2, 1);
771 layout_rin->addWidget(new QLabel("Save clock corrections in Clock RINEX file format."), 3, 0, 1, 50, Qt::AlignLeft);
772 layout_rin->addWidget(new QLabel(" "), 3, 0);
773
774 tab_rin->setLayout(layout_rin);
775
776 connect(_rnxPathLineEdit, SIGNAL(textChanged(const QString &)),
777 this, SLOT(slotBnsTextChanged()));
778
779 // SP3 Orbits Tab
780 // --------------
781 QWidget* tab_sp3 = new QWidget();
782 tabs->addTab(tab_sp3, "SP3 Orbits");
783
784 QGridLayout* layout_sp3 = new QGridLayout;
785
786 layout_sp3->setColumnMinimumWidth(0, 9*ww);
787 _sp3IntrComboBox->setMaximumWidth(9*ww);
788
789 layout_sp3->addWidget(new QLabel("Directory"), 0, 0);
790 layout_sp3->addWidget(_sp3PathLineEdit, 0, 1, 1, 27);
791 layout_sp3->addWidget(new QLabel("Interval"), 1, 0);
792 layout_sp3->addWidget(_sp3IntrComboBox, 1, 1);
793 layout_sp3->addWidget(new QLabel("Sampling"), 2, 0);
794 layout_sp3->addWidget(_sp3SamplSpinBox, 2, 1);
795 layout_sp3->addWidget(new QLabel("Save orbit corrections in SP3 file format."), 3, 0, 1, 50, Qt::AlignLeft);
796 layout_sp3->addWidget(new QLabel(" "), 3, 0);
797
798 tab_sp3->setLayout(layout_sp3);
799
800 connect(_sp3PathLineEdit, SIGNAL(textChanged(const QString &)),
801 this, SLOT(slotBnsTextChanged()));
802
803 tabs->setCurrentIndex(settings.value("startTab").toInt());
804
805 // Log
806 // ---
807 _log = new QTextBrowser();
808 _log->setReadOnly(true);
809 _log->setWhatsThis(tr("Records of BNS's activities are shown in the Log section."));
810
811 // Status
812 // ------
813 _status = new QGroupBox(tr("Status"));
814 QGridLayout* layout_status = new QGridLayout;
815
816 _statusLbl[0] = new QLabel("0 byte(s)"); _statusCnt[0] = 0;
817 _statusLbl[1] = new QLabel("0 byte(s)"); _statusCnt[1] = 0;
818 _statusLbl[2] = new QLabel("0 byte(s)"); _statusCnt[2] = 0;
819 _statusLbl[3] = new QLabel("0 byte(s)"); _statusCnt[3] = 0;
820 _statusLbl[4] = new QLabel("0 byte(s)"); _statusCnt[4] = 0;
821 _statusLbl[5] = new QLabel("0 byte(s)"); _statusCnt[5] = 0;
822 _statusLbl[6] = new QLabel("0 byte(s)"); _statusCnt[6] = 0;
823 _statusLbl[7] = new QLabel("0 byte(s)"); _statusCnt[7] = 0;
824 _statusLbl[8] = new QLabel("0 byte(s)"); _statusCnt[8] = 0;
825
826 _statusLbl[9] = new QLabel("RINEX Ephemeris:");
827 _statusLbl[10] = new QLabel("Clocks & Orbits:");
828 _statusLbl[11] = new QLabel("Broadcast Corrections I:");
829 _statusLbl[12] = new QLabel("Broadcast Corrections II:");
830 _statusLbl[13] = new QLabel("Broadcast Corrections III:");
831 _statusLbl[14] = new QLabel("Broadcast Corrections IV:");
832 _statusLbl[15] = new QLabel("Broadcast Corrections V:");
833 _statusLbl[16] = new QLabel("Broadcast Corrections VI:");
834 _statusLbl[17] = new QLabel("Broadcast Ephemeris:");
835
836 _statusLbl[0]->setWhatsThis(tr("Status of incoming broadcast ephemeris."));
837 _statusLbl[1]->setWhatsThis(tr("Status of incoming stream of clocks and orbits."));
838 _statusLbl[2]->setWhatsThis(tr("Status of outgoing corrections stream to NTRIP broadcaster I."));
839 _statusLbl[3]->setWhatsThis(tr("Status of outgoing corrections stream to NTRIP broadcaster II."));
840 _statusLbl[4]->setWhatsThis(tr("Status of outgoing corrections stream to NTRIP broadcaster III."));
841 _statusLbl[5]->setWhatsThis(tr("Status of outgoing corrections stream to NTRIP broadcaster IV."));
842 _statusLbl[6]->setWhatsThis(tr("Status of outgoing corrections stream to NTRIP broadcaster V."));
843 _statusLbl[7]->setWhatsThis(tr("Status of outgoing corrections stream to NTRIP broadcaster VI."));
844 _statusLbl[8]->setWhatsThis(tr("Status of outgoing Broadcast Ephemeris to NTRIP broadcaster"));
845
846 _statusLbl[9]->setWhatsThis(tr("Status of incoming broadcast ephemeris."));
847 _statusLbl[10]->setWhatsThis(tr("Status of incoming stream of clocks and orbits I."));
848 _statusLbl[11]->setWhatsThis(tr("Status of outgoing corrections stream to NTRIP broadcaster I."));
849 _statusLbl[12]->setWhatsThis(tr("Status of outgoing corrections stream to NTRIP broadcaster II."));
850 _statusLbl[13]->setWhatsThis(tr("Status of outgoing corrections stream to NTRIP broadcaster III."));
851 _statusLbl[14]->setWhatsThis(tr("Status of outgoing corrections stream to NTRIP broadcaster IV."));
852 _statusLbl[15]->setWhatsThis(tr("Status of outgoing corrections stream to NTRIP broadcaster V."));
853 _statusLbl[16]->setWhatsThis(tr("Status of outgoing corrections stream to NTRIP broadcaster VI."));
854 _statusLbl[17]->setWhatsThis(tr("Status of outgoing Broadcast Ephemeris to NTRIP broadcaster"));
855
856 layout_status->addWidget(_statusLbl[9], 0, 0);
857 layout_status->addWidget(_statusLbl[0], 0, 1);
858 layout_status->addWidget(_statusLbl[10], 1, 0);
859 layout_status->addWidget(_statusLbl[1], 1, 1);
860 layout_status->addWidget(_statusLbl[17], 2, 0);
861 layout_status->addWidget(_statusLbl[8], 2, 1);
862
863 layout_status->addWidget(_statusLbl[11], 0, 2);
864 layout_status->addWidget(_statusLbl[2], 0, 3);
865 layout_status->addWidget(_statusLbl[12], 1, 2);
866 layout_status->addWidget(_statusLbl[3], 1, 3);
867 layout_status->addWidget(_statusLbl[13], 2, 2);
868 layout_status->addWidget(_statusLbl[4], 2, 3);
869 layout_status->addWidget(_statusLbl[14], 3, 2);
870 layout_status->addWidget(_statusLbl[5], 3, 3);
871 layout_status->addWidget(_statusLbl[15], 4, 2);
872 layout_status->addWidget(_statusLbl[6], 4, 3);
873 layout_status->addWidget(_statusLbl[16], 5, 2);
874 layout_status->addWidget(_statusLbl[7], 5, 3);
875 _status->setLayout(layout_status);
876
877 // Main Layout
878 // -----------
879 QVBoxLayout* mainLayout = new QVBoxLayout;
880 mainLayout->addWidget(tabs);
881 mainLayout->addWidget(_log);
882 mainLayout->addWidget(_status);
883
884 _canvas->setLayout(mainLayout);
885
886 // Enable/Disable all Widgets
887 // --------------------------
888 slotBnsTextChanged();
889
890 // Auto start
891 // ----------
892 if ( Qt::CheckState(settings.value("autoStart").toInt()) == Qt::Checked) {
893 slotStart();
894 }
895
896}
897
898// Destructor
899////////////////////////////////////////////////////////////////////////////
900bnsWindow::~bnsWindow() {
901}
902
903// Close Application gracefully
904////////////////////////////////////////////////////////////////////////////
905void bnsWindow::closeEvent(QCloseEvent* event) {
906
907int iRet = QMessageBox::question(this, "Close", "Save Options?",
908 QMessageBox::Yes, QMessageBox::No,
909 QMessageBox::Cancel);
910
911 if (iRet == QMessageBox::Cancel) {
912 event->ignore();
913 return;
914 }
915 else if (iRet == QMessageBox::Yes) {
916 slotSaveOptions();
917 }
918
919 QMainWindow::closeEvent(event);
920}
921
922// About Message
923////////////////////////////////////////////////////////////////////////////
924void bnsWindow::slotAbout() {
925 new bnsAboutDlg(0);
926}
927
928// Flowchart
929////////////////////////////////////////////////////////////////////////////
930void bnsWindow::slotFlowchart() {
931 new bnsFlowchartDlg(0);
932}
933
934// Help Window
935////////////////////////////////////////////////////////////////////////////
936void bnsWindow::slotHelp() {
937 QUrl url;
938 url.setPath(":bnshelp.html");
939 new bnsHlpDlg(0, url);
940}
941
942// Select Fonts
943////////////////////////////////////////////////////////////////////////////
944void bnsWindow::slotFontSel() {
945 bool ok;
946 QFont newFont = QFontDialog::getFont(&ok, this->font(), this);
947 if (ok) {
948 bnsSettings settings;
949 settings.setValue("font", newFont.toString());
950 QApplication::setFont(newFont);
951 int ww = QFontMetrics(newFont).width('w');
952 setMinimumSize(77*ww, 65*ww);
953 }
954}
955
956// Whats This Help
957////////////////////////////////////////////////////////////////////////////
958void bnsWindow::slotWhatsThis() {
959QWhatsThis::enterWhatsThisMode();
960}
961
962// Create Menus
963////////////////////////////////////////////////////////////////////////////
964void bnsWindow::CreateMenu() {
965 _menuFile = menuBar()->addMenu(tr("&File"));
966 _menuFile->addAction(_actFontSel);
967 _menuFile->addSeparator();
968 _menuFile->addAction(_actSaveOpt);
969 _menuFile->addSeparator();
970 _menuFile->addAction(_actQuit);
971
972 _menuHlp = menuBar()->addMenu(tr("&Help"));
973 _menuHlp->addAction(_actHelp);
974 _menuHlp->addAction(_actFlowchart);
975 _menuHlp->addAction(_actAbout);
976}
977
978// Tool (Command) Bar
979////////////////////////////////////////////////////////////////////////////
980void bnsWindow::AddToolbar() {
981 QToolBar* toolBar = new QToolBar;
982 addToolBar(Qt::BottomToolBarArea, toolBar);
983 toolBar->setMovable(false);
984 toolBar->addAction(_actStart);
985 toolBar->addAction(_actStop);
986 toolBar->addWidget(new QLabel(" "));
987 toolBar->addAction(_actWhatsThis);
988}
989
990// Save Options
991////////////////////////////////////////////////////////////////////////////
992void bnsWindow::slotSaveOptions() {
993 bnsSettings settings;
994 settings.setValue("proxyHost", _proxyHostLineEdit->text());
995 settings.setValue("proxyPort", _proxyPortLineEdit->text());
996
997 settings.setValue("logFile", _logFileLineEdit->text());
998 settings.setValue("fileAppend", _fileAppendCheckBox->checkState());
999 settings.setValue("autoStart", _autoStartCheckBox->checkState());
1000
1001 settings.setValue("ephHost", _ephHostLineEdit->text());
1002 settings.setValue("ephPort", _ephPortLineEdit->text());
1003 settings.setValue("ephEcho", _ephEchoLineEdit->text());
1004
1005 settings.setValue("clkPort", _clkPortLineEdit->text());
1006 settings.setValue("inpEcho", _inpEchoLineEdit->text());
1007
1008 settings.setValue("outHost1", _outHost_1_LineEdit->text());
1009 settings.setValue("outPort1", _outPort_1_LineEdit->text());
1010 settings.setValue("mountpoint_1",_mountpoint_1_LineEdit->text());
1011 settings.setValue("password1", _password_1_LineEdit->text());
1012 settings.setValue("refSys_1", _refSys_1_ComboBox->currentText());
1013 settings.setValue("outFile_1", _outFile_1_LineEdit->text());
1014 settings.setValue("CoM_1", _CoM_1_CheckBox->checkState());
1015
1016 settings.setValue("outHost2", _outHost_2_LineEdit->text());
1017 settings.setValue("outPort2", _outPort_2_LineEdit->text());
1018 settings.setValue("mountpoint_2",_mountpoint_2_LineEdit->text());
1019 settings.setValue("password2", _password_2_LineEdit->text());
1020 settings.setValue("refSys_2", _refSys_2_ComboBox->currentText());
1021 settings.setValue("outFile_2", _outFile_2_LineEdit->text());
1022 settings.setValue("CoM_2", _CoM_2_CheckBox->checkState());
1023
1024 settings.setValue("outHost3", _outHost_3_LineEdit->text());
1025 settings.setValue("outPort3", _outPort_3_LineEdit->text());
1026 settings.setValue("mountpoint_3",_mountpoint_3_LineEdit->text());
1027 settings.setValue("password3", _password_3_LineEdit->text());
1028 settings.setValue("refSys_3", _refSys_3_ComboBox->currentText());
1029 settings.setValue("outFile_3", _outFile_3_LineEdit->text());
1030 settings.setValue("CoM_3", _CoM_3_CheckBox->checkState());
1031
1032 settings.setValue("outHost4", _outHost_4_LineEdit->text());
1033 settings.setValue("outPort4", _outPort_4_LineEdit->text());
1034 settings.setValue("mountpoint_4",_mountpoint_4_LineEdit->text());
1035 settings.setValue("password4", _password_4_LineEdit->text());
1036 settings.setValue("refSys_4", _refSys_4_ComboBox->currentText());
1037 settings.setValue("outFile_4", _outFile_4_LineEdit->text());
1038 settings.setValue("CoM_4", _CoM_4_CheckBox->checkState());
1039
1040 settings.setValue("outHost5", _outHost_5_LineEdit->text());
1041 settings.setValue("outPort5", _outPort_5_LineEdit->text());
1042 settings.setValue("mountpoint_5",_mountpoint_5_LineEdit->text());
1043 settings.setValue("password5", _password_5_LineEdit->text());
1044 settings.setValue("refSys_5", _refSys_5_ComboBox->currentText());
1045 settings.setValue("outFile_5", _outFile_5_LineEdit->text());
1046 settings.setValue("CoM_5", _CoM_5_CheckBox->checkState());
1047
1048 settings.setValue("outHost6", _outHost_6_LineEdit->text());
1049 settings.setValue("outPort6", _outPort_6_LineEdit->text());
1050 settings.setValue("mountpoint_6",_mountpoint_6_LineEdit->text());
1051 settings.setValue("password6", _password_6_LineEdit->text());
1052 settings.setValue("refSys_6", _refSys_6_ComboBox->currentText());
1053 settings.setValue("outFile_6", _outFile_6_LineEdit->text());
1054 settings.setValue("CoM_6", _CoM_6_CheckBox->checkState());
1055
1056 settings.setValue("outHostEph", _outHost_Eph_LineEdit->text());
1057 settings.setValue("outPortEph", _outPort_Eph_LineEdit->text());
1058 settings.setValue("mountpoint_Eph",_mountpoint_Eph_LineEdit->text());
1059 settings.setValue("passwordEph", _password_Eph_LineEdit->text());
1060 settings.setValue("samplEph", _samplEphSpinBox->value());
1061
1062 settings.setValue("rnxPath", _rnxPathLineEdit->text());
1063 settings.setValue("rnxIntr", _rnxIntrComboBox->currentText());
1064 settings.setValue("rnxSampl", _rnxSamplSpinBox->value());
1065
1066 settings.setValue("sp3Path", _sp3PathLineEdit->text());
1067 settings.setValue("sp3Intr", _sp3IntrComboBox->currentText());
1068 settings.setValue("sp3Sampl", _sp3SamplSpinBox->value());
1069
1070 settings.setValue("startTab", tabs->currentIndex());
1071}
1072
1073// Display Program Messages
1074////////////////////////////////////////////////////////////////////////////
1075void bnsWindow::slotMessage(const QByteArray msg) {
1076
1077 const int maxBufferSize = 10000;
1078
1079 QString txt = _log->toPlainText() + "\n" +
1080 QDateTime::currentDateTime().toUTC().toString("yy-MM-dd hh:mm:ss ") + msg;
1081 _log->clear();
1082 _log->append(txt.right(maxBufferSize));
1083}
1084
1085// Delete bns
1086////////////////////////////////////////////////////////////////////////////
1087void bnsWindow::deleteBns() {
1088 _actStart->setEnabled(true);
1089 _actStop->setEnabled(false);
1090 _bns->terminate();
1091 _bns->wait(100);
1092 delete _bns;
1093 _bns = 0;
1094}
1095
1096// Error in bns
1097////////////////////////////////////////////////////////////////////////////
1098void bnsWindow::slotError(const QByteArray msg) {
1099 slotMessage(msg);
1100 deleteBns();
1101}
1102
1103// Stop
1104////////////////////////////////////////////////////////////////////////////
1105void bnsWindow::slotStop() {
1106 int iRet = QMessageBox::question(this, "Stop", "Do you want to stop?",
1107 QMessageBox::Yes, QMessageBox::No,
1108 QMessageBox::NoButton);
1109 if (iRet == QMessageBox::Yes) {
1110 deleteBns();
1111 }
1112}
1113
1114// Start
1115////////////////////////////////////////////////////////////////////////////
1116void bnsWindow::slotStart() {
1117 slotSaveOptions();
1118
1119 _actStart->setEnabled(false);
1120 _actStop->setEnabled(true);
1121
1122 _bns = new t_bns(0);
1123
1124 connect(_bns, SIGNAL(newMessage(QByteArray)),
1125 this, SLOT(slotMessage(const QByteArray)));
1126
1127 connect(_bns, SIGNAL(error(QByteArray)),
1128 this, SLOT(slotError(const QByteArray)));
1129
1130 connect(_bns, SIGNAL(newEphBytes(int)), this, SLOT(slotEphBytes(int)));
1131 connect(_bns, SIGNAL(newClkBytes(int)), this, SLOT(slotClkBytes(int)));
1132 connect(_bns, SIGNAL(newOutBytes1(int)), this, SLOT(slotOutBytes1(int)));
1133 connect(_bns, SIGNAL(newOutBytes2(int)), this, SLOT(slotOutBytes2(int)));
1134 connect(_bns, SIGNAL(newOutBytes3(int)), this, SLOT(slotOutBytes3(int)));
1135 connect(_bns, SIGNAL(newOutBytes4(int)), this, SLOT(slotOutBytes4(int)));
1136 connect(_bns, SIGNAL(newOutBytes5(int)), this, SLOT(slotOutBytes5(int)));
1137 connect(_bns, SIGNAL(newOutBytes6(int)), this, SLOT(slotOutBytes6(int)));
1138 connect(_bns, SIGNAL(newOutEphBytes(int)), this, SLOT(slotOutEphBytes(int)));
1139
1140 _bns->start();
1141}
1142
1143// Input and output bytes statistics
1144////////////////////////////////////////////////////////////////////////////
1145void bnsWindow::slotEphBytes(int nBytes) {
1146 updateStatus(0, nBytes);
1147}
1148void bnsWindow::slotClkBytes(int nBytes) {
1149 updateStatus(1, nBytes);
1150}
1151void bnsWindow::slotOutBytes1(int nBytes) {
1152 updateStatus(2, nBytes);
1153}
1154void bnsWindow::slotOutBytes2(int nBytes) {
1155 updateStatus(3, nBytes);
1156}
1157void bnsWindow::slotOutBytes3(int nBytes) {
1158 updateStatus(4, nBytes);
1159}
1160void bnsWindow::slotOutBytes4(int nBytes) {
1161 updateStatus(5, nBytes);
1162}
1163void bnsWindow::slotOutBytes5(int nBytes) {
1164 updateStatus(6, nBytes);
1165}
1166void bnsWindow::slotOutBytes6(int nBytes) {
1167 updateStatus(7, nBytes);
1168}
1169void bnsWindow::slotOutEphBytes(int nBytes) {
1170 updateStatus(8, nBytes);
1171}
1172
1173void bnsWindow::updateStatus(int ii, int nBytes) {
1174 QMutexLocker locker(&_mutex);
1175
1176 _statusCnt[ii] += nBytes;
1177
1178 if (_statusCnt[ii] < 1e3) {
1179 _statusLbl[ii]->setText(QString("%1 byte(s)").arg((int)_statusCnt[ii]));
1180 }
1181 else if (_statusCnt[ii] < 1e6) {
1182 _statusLbl[ii]->setText(QString("%1 kb").arg(_statusCnt[ii]/1.e3, 5));
1183 }
1184 else {
1185 _statusLbl[ii]->setText(QString("%1 Mb").arg(_statusCnt[ii]/1.e6, 5));
1186 }
1187}
1188
1189// Enable/Disable Widgets according to user input
1190////////////////////////////////////////////////////////////////////////////
1191void bnsWindow::slotBnsTextChanged(){
1192
1193 QPalette palette_white(QColor(255, 255, 255));
1194 QPalette palette_gray(QColor(230, 230, 230));
1195
1196 // Enable/disable Proxy Options
1197 // ----------------------------
1198 if (sender() == 0 || sender() == _proxyHostLineEdit) {
1199 if (!_proxyHostLineEdit->text().isEmpty()) {
1200 _proxyPortLineEdit->setStyleSheet("background-color: white");
1201 _proxyPortLineEdit->setEnabled(true);
1202 }
1203 else {
1204 _proxyPortLineEdit->setStyleSheet("background-color: lightGray");
1205 _proxyPortLineEdit->setEnabled(false);
1206 }
1207 }
1208
1209 // Enable/disable RINEX Ephemeris Options
1210 // --------------------------------------
1211 if (sender() == 0 || sender() == _ephHostLineEdit) {
1212 if (!_ephHostLineEdit->text().isEmpty()) {
1213 _ephPortLineEdit->setStyleSheet("background-color: white");
1214 _ephEchoLineEdit->setStyleSheet("background-color: white");
1215 _ephPortLineEdit->setEnabled(true);
1216 _ephEchoLineEdit->setEnabled(true);
1217 }
1218 else {
1219 _ephPortLineEdit->setStyleSheet("background-color: lightGray");
1220 _ephEchoLineEdit->setStyleSheet("background-color: lightGray");
1221 _ephPortLineEdit->setEnabled(false);
1222 _ephEchoLineEdit->setEnabled(false);
1223 }
1224 }
1225
1226 // Enable/disable Clocks & Orbits Options
1227 // --------------------------------------
1228 if (sender() == 0 || sender() == _clkPortLineEdit) {
1229 if (!_clkPortLineEdit->text().isEmpty()) {
1230 _inpEchoLineEdit->setStyleSheet("background-color: white");
1231 _inpEchoLineEdit->setEnabled(true);
1232 }
1233 else {
1234 _inpEchoLineEdit->setStyleSheet("background-color: lightGray");
1235 _inpEchoLineEdit->setEnabled(false);
1236 }
1237 }
1238
1239 // Enable/disable Broadcast Corrections I Options
1240 // -----------------------------------------------
1241 if (sender() == 0 || sender() == _outHost_1_LineEdit) {
1242 if (!_outHost_1_LineEdit->text().isEmpty()) {
1243 _outPort_1_LineEdit->setStyleSheet("background-color: white");
1244 _mountpoint_1_LineEdit->setStyleSheet("background-color: white");
1245 _password_1_LineEdit->setStyleSheet("background-color: white");
1246 _outFile_1_LineEdit->setStyleSheet("background-color: white");
1247 _refSys_1_ComboBox->setStyleSheet("background-color: white");
1248 _CoM_1_CheckBox->setPalette(palette_white);
1249 _outPort_1_LineEdit->setEnabled(true);
1250 _mountpoint_1_LineEdit->setEnabled(true);
1251 _password_1_LineEdit->setEnabled(true);
1252 _outFile_1_LineEdit->setEnabled(true);
1253 _refSys_1_ComboBox->setEnabled(true);
1254 _CoM_1_CheckBox->setEnabled(true);
1255 }
1256 else {
1257 _outPort_1_LineEdit->setStyleSheet("background-color: lightGray");
1258 _mountpoint_1_LineEdit->setStyleSheet("background-color: lightGray");
1259 _password_1_LineEdit->setStyleSheet("background-color: lightGray");
1260 _outFile_1_LineEdit->setStyleSheet("background-color: lightGray");
1261 _refSys_1_ComboBox->setStyleSheet("background-color: lightGray");
1262 _CoM_1_CheckBox->setPalette(palette_gray);
1263 _outPort_1_LineEdit->setEnabled(false);
1264 _mountpoint_1_LineEdit->setEnabled(false);
1265 _password_1_LineEdit->setEnabled(false);
1266 _outFile_1_LineEdit->setEnabled(false);
1267 _refSys_1_ComboBox->setEnabled(false);
1268 _CoM_1_CheckBox->setEnabled(false);
1269 }
1270 }
1271
1272 // Enable/disable Broadcast Corrections II Options
1273 // -----------------------------------------------
1274 if (sender() == 0 || sender() == _outHost_2_LineEdit) {
1275 if (!_outHost_2_LineEdit->text().isEmpty()) {
1276 _outPort_2_LineEdit->setStyleSheet("background-color: white");
1277 _mountpoint_2_LineEdit->setStyleSheet("background-color: white");
1278 _password_2_LineEdit->setStyleSheet("background-color: white");
1279 _outFile_2_LineEdit->setStyleSheet("background-color: white");
1280 _refSys_2_ComboBox->setStyleSheet("background-color: white");
1281 _CoM_2_CheckBox->setPalette(palette_white);
1282 _outPort_2_LineEdit->setEnabled(true);
1283 _mountpoint_2_LineEdit->setEnabled(true);
1284 _password_2_LineEdit->setEnabled(true);
1285 _outFile_2_LineEdit->setEnabled(true);
1286 _refSys_2_ComboBox->setEnabled(true);
1287 _CoM_2_CheckBox->setEnabled(true);
1288 }
1289 else {
1290 _outPort_2_LineEdit->setStyleSheet("background-color: lightGray");
1291 _mountpoint_2_LineEdit->setStyleSheet("background-color: lightGray");
1292 _password_2_LineEdit->setStyleSheet("background-color: lightGray");
1293 _outFile_2_LineEdit->setStyleSheet("background-color: lightGray");
1294 _refSys_2_ComboBox->setStyleSheet("background-color: lightGray");
1295 _CoM_2_CheckBox->setPalette(palette_gray);
1296 _outPort_2_LineEdit->setEnabled(false);
1297 _mountpoint_2_LineEdit->setEnabled(false);
1298 _password_2_LineEdit->setEnabled(false);
1299 _outFile_2_LineEdit->setEnabled(false);
1300 _refSys_2_ComboBox->setEnabled(false);
1301 _CoM_2_CheckBox->setEnabled(false);
1302 }
1303 }
1304
1305 // Enable/disable Broadcast Corrections III Options
1306 // -----------------------------------------------
1307 if (sender() == 0 || sender() == _outHost_3_LineEdit) {
1308 if (!_outHost_3_LineEdit->text().isEmpty()) {
1309 _outPort_3_LineEdit->setStyleSheet("background-color: white");
1310 _mountpoint_3_LineEdit->setStyleSheet("background-color: white");
1311 _password_3_LineEdit->setStyleSheet("background-color: white");
1312 _outFile_3_LineEdit->setStyleSheet("background-color: white");
1313 _refSys_3_ComboBox->setStyleSheet("background-color: white");
1314 _CoM_3_CheckBox->setPalette(palette_white);
1315 _outPort_3_LineEdit->setEnabled(true);
1316 _mountpoint_3_LineEdit->setEnabled(true);
1317 _password_3_LineEdit->setEnabled(true);
1318 _outFile_3_LineEdit->setEnabled(true);
1319 _refSys_3_ComboBox->setEnabled(true);
1320 _CoM_3_CheckBox->setEnabled(true);
1321 }
1322 else {
1323 _outPort_3_LineEdit->setStyleSheet("background-color: lightGray");
1324 _mountpoint_3_LineEdit->setStyleSheet("background-color: lightGray");
1325 _password_3_LineEdit->setStyleSheet("background-color: lightGray");
1326 _outFile_3_LineEdit->setStyleSheet("background-color: lightGray");
1327 _refSys_3_ComboBox->setStyleSheet("background-color: lightGray");
1328 _CoM_3_CheckBox->setPalette(palette_gray);
1329 _outPort_3_LineEdit->setEnabled(false);
1330 _mountpoint_3_LineEdit->setEnabled(false);
1331 _password_3_LineEdit->setEnabled(false);
1332 _outFile_3_LineEdit->setEnabled(false);
1333 _refSys_3_ComboBox->setEnabled(false);
1334 _CoM_3_CheckBox->setEnabled(false);
1335 }
1336 }
1337
1338 // Enable/disable Broadcast Corrections IV Options
1339 // -----------------------------------------------
1340 if (sender() == 0 || sender() == _outHost_4_LineEdit) {
1341 if (!_outHost_4_LineEdit->text().isEmpty()) {
1342 _outPort_4_LineEdit->setStyleSheet("background-color: white");
1343 _mountpoint_4_LineEdit->setStyleSheet("background-color: white");
1344 _password_4_LineEdit->setStyleSheet("background-color: white");
1345 _outFile_4_LineEdit->setStyleSheet("background-color: white");
1346 _refSys_4_ComboBox->setStyleSheet("background-color: white");
1347 _CoM_4_CheckBox->setPalette(palette_white);
1348 _outPort_4_LineEdit->setEnabled(true);
1349 _mountpoint_4_LineEdit->setEnabled(true);
1350 _password_4_LineEdit->setEnabled(true);
1351 _outFile_4_LineEdit->setEnabled(true);
1352 _refSys_4_ComboBox->setEnabled(true);
1353 _CoM_4_CheckBox->setEnabled(true);
1354 }
1355 else {
1356 _outPort_4_LineEdit->setStyleSheet("background-color: lightGray");
1357 _mountpoint_4_LineEdit->setStyleSheet("background-color: lightGray");
1358 _password_4_LineEdit->setStyleSheet("background-color: lightGray");
1359 _outFile_4_LineEdit->setStyleSheet("background-color: lightGray");
1360 _refSys_4_ComboBox->setStyleSheet("background-color: lightGray");
1361 _CoM_4_CheckBox->setPalette(palette_gray);
1362 _outPort_4_LineEdit->setEnabled(false);
1363 _mountpoint_4_LineEdit->setEnabled(false);
1364 _password_4_LineEdit->setEnabled(false);
1365 _outFile_4_LineEdit->setEnabled(false);
1366 _refSys_4_ComboBox->setEnabled(false);
1367 _CoM_4_CheckBox->setEnabled(false);
1368 }
1369 }
1370
1371 // Enable/disable Broadcast Corrections V Options
1372 // ----------------------------------------------
1373 if (sender() == 0 || sender() == _outHost_5_LineEdit) {
1374 if (!_outHost_5_LineEdit->text().isEmpty()) {
1375 _outPort_5_LineEdit->setStyleSheet("background-color: white");
1376 _mountpoint_5_LineEdit->setStyleSheet("background-color: white");
1377 _password_5_LineEdit->setStyleSheet("background-color: white");
1378 _outFile_5_LineEdit->setStyleSheet("background-color: white");
1379 _refSys_5_ComboBox->setStyleSheet("background-color: white");
1380 _CoM_5_CheckBox->setPalette(palette_white);
1381 _outPort_5_LineEdit->setEnabled(true);
1382 _mountpoint_5_LineEdit->setEnabled(true);
1383 _password_5_LineEdit->setEnabled(true);
1384 _outFile_5_LineEdit->setEnabled(true);
1385 _refSys_5_ComboBox->setEnabled(true);
1386 _CoM_5_CheckBox->setEnabled(true);
1387 }
1388 else {
1389 _outPort_5_LineEdit->setStyleSheet("background-color: lightGray");
1390 _mountpoint_5_LineEdit->setStyleSheet("background-color: lightGray");
1391 _password_5_LineEdit->setStyleSheet("background-color: lightGray");
1392 _outFile_5_LineEdit->setStyleSheet("background-color: lightGray");
1393 _refSys_5_ComboBox->setStyleSheet("background-color: lightGray");
1394 _CoM_5_CheckBox->setPalette(palette_gray);
1395 _outPort_5_LineEdit->setEnabled(false);
1396 _mountpoint_5_LineEdit->setEnabled(false);
1397 _password_5_LineEdit->setEnabled(false);
1398 _outFile_5_LineEdit->setEnabled(false);
1399 _refSys_5_ComboBox->setEnabled(false);
1400 _CoM_5_CheckBox->setEnabled(false);
1401 }
1402 }
1403
1404 // Enable/disable Broadcast Corrections VI Options
1405 // -----------------------------------------------
1406 if (sender() == 0 || sender() == _outHost_6_LineEdit) {
1407 if (!_outHost_6_LineEdit->text().isEmpty()) {
1408 _outPort_6_LineEdit->setStyleSheet("background-color: white");
1409 _mountpoint_6_LineEdit->setStyleSheet("background-color: white");
1410 _password_6_LineEdit->setStyleSheet("background-color: white");
1411 _outFile_6_LineEdit->setStyleSheet("background-color: white");
1412 _refSys_6_ComboBox->setStyleSheet("background-color: white");
1413 _CoM_6_CheckBox->setPalette(palette_white);
1414 _outPort_6_LineEdit->setEnabled(true);
1415 _mountpoint_6_LineEdit->setEnabled(true);
1416 _password_6_LineEdit->setEnabled(true);
1417 _outFile_6_LineEdit->setEnabled(true);
1418 _refSys_6_ComboBox->setEnabled(true);
1419 _CoM_6_CheckBox->setEnabled(true);
1420 }
1421 else {
1422 _outPort_6_LineEdit->setStyleSheet("background-color: lightGray");
1423 _mountpoint_6_LineEdit->setStyleSheet("background-color: lightGray");
1424 _password_6_LineEdit->setStyleSheet("background-color: lightGray");
1425 _outFile_6_LineEdit->setStyleSheet("background-color: lightGray");
1426 _refSys_6_ComboBox->setStyleSheet("background-color: lightGray");
1427 _CoM_6_CheckBox->setPalette(palette_gray);
1428 _outPort_6_LineEdit->setEnabled(false);
1429 _mountpoint_6_LineEdit->setEnabled(false);
1430 _password_6_LineEdit->setEnabled(false);
1431 _outFile_6_LineEdit->setEnabled(false);
1432 _refSys_6_ComboBox->setEnabled(false);
1433 _CoM_6_CheckBox->setEnabled(false);
1434 }
1435 }
1436
1437 // Enable/disable Broadcast Ephemerides
1438 // ------------------------------------
1439 if (sender() == 0 || sender() == _outHost_Eph_LineEdit) {
1440 if (!_outHost_Eph_LineEdit->text().isEmpty()) {
1441 _outPort_Eph_LineEdit->setStyleSheet("background-color: white");
1442 _mountpoint_Eph_LineEdit->setStyleSheet("background-color: white");
1443 _password_Eph_LineEdit->setStyleSheet("background-color: white");
1444 _samplEphSpinBox->setStyleSheet("background-color: white");
1445 _outPort_Eph_LineEdit->setEnabled(true);
1446 _mountpoint_Eph_LineEdit->setEnabled(true);
1447 _password_Eph_LineEdit->setEnabled(true);
1448 _samplEphSpinBox->setEnabled(true);
1449 }
1450 else {
1451 _outPort_Eph_LineEdit->setStyleSheet("background-color: lightGray");
1452 _mountpoint_Eph_LineEdit->setStyleSheet("background-color: lightGray");
1453 _password_Eph_LineEdit->setStyleSheet("background-color: lightGray");
1454 _samplEphSpinBox->setStyleSheet("background-color: lightGray");
1455 _outPort_Eph_LineEdit->setEnabled(false);
1456 _mountpoint_Eph_LineEdit->setEnabled(false);
1457 _password_Eph_LineEdit->setEnabled(false);
1458 _samplEphSpinBox->setEnabled(false);
1459 }
1460 }
1461
1462 // Enable/disable RINEX Clocks Options
1463 // -----------------------------------
1464 if (sender() == 0 || sender() == _rnxPathLineEdit) {
1465 if (!_rnxPathLineEdit->text().isEmpty()) {
1466 _rnxIntrComboBox->setStyleSheet("background-color: white");
1467 _rnxSamplSpinBox->setStyleSheet("background-color: white");
1468 _rnxIntrComboBox->setEnabled(true);
1469 _rnxSamplSpinBox->setEnabled(true);
1470 }
1471 else {
1472 _rnxIntrComboBox->setStyleSheet("background-color: lightGray");
1473 _rnxSamplSpinBox->setStyleSheet("background-color: lightGray");
1474 _rnxIntrComboBox->setEnabled(false);
1475 _rnxSamplSpinBox->setEnabled(false);
1476 }
1477 }
1478
1479 // Enable/disable SP3 Orbits Options
1480 // ---------------------------------
1481 if (sender() == 0 || sender() == _sp3PathLineEdit) {
1482 if (!_sp3PathLineEdit->text().isEmpty()) {
1483 _sp3IntrComboBox->setStyleSheet("background-color: white");
1484 _sp3SamplSpinBox->setStyleSheet("background-color: white");
1485 _sp3IntrComboBox->setEnabled(true);
1486 _sp3SamplSpinBox->setEnabled(true);
1487 }
1488 else {
1489 _sp3IntrComboBox->setStyleSheet("background-color: lightGray");
1490 _sp3SamplSpinBox->setStyleSheet("background-color: lightGray");
1491 _sp3IntrComboBox->setEnabled(false);
1492 _sp3SamplSpinBox->setEnabled(false);
1493 }
1494 }
1495
1496}
1497
1498// Custom transformation parameters
1499////////////////////////////////////////////////////////////////////////////
1500void bnsWindow::customTrafo(const QString &text){
1501 if (text == "Custom" ) {
1502 bnsCustomTrafo* dlg = new bnsCustomTrafo(this);
1503 dlg->exec();
1504 delete dlg;
1505 }
1506}
1507
Note: See TracBrowser for help on using the repository browser.