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

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

* empty log message *

File size: 40.6 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
24using namespace std;
25
26// About Dialog - Constructor
27////////////////////////////////////////////////////////////////////////////
28bnsAboutDlg::bnsAboutDlg(QWidget* parent) :
29 QDialog(parent) {
30
31 QTextBrowser* tb = new QTextBrowser;
32 QUrl url; url.setPath(":bnsabout.html");
33 tb->setSource(url);
34 tb->setReadOnly(true);
35
36 int ww = QFontMetrics(font()).width('w');
37 QPushButton* _closeButton = new QPushButton("Close");
38 _closeButton->setMaximumWidth(10*ww);
39 connect(_closeButton, SIGNAL(clicked()), this, SLOT(close()));
40
41 QGridLayout* dlgLayout = new QGridLayout();
42 QLabel* img = new QLabel();
43 img->setPixmap(QPixmap(":ntrip-logo.png"));
44 dlgLayout->addWidget(img, 0,0);
45 dlgLayout->addWidget(new QLabel("BKG Ntrip State Space Server (BNS) Version 1.1"), 0,1);
46 dlgLayout->addWidget(tb,1,0,1,2);
47 dlgLayout->addWidget(_closeButton,2,1,Qt::AlignRight);
48
49 setLayout(dlgLayout);
50 resize(60*ww, 60*ww);
51 show();
52}
53
54// About Dialog - Destructor
55////////////////////////////////////////////////////////////////////////////
56bnsAboutDlg::~bnsAboutDlg() {
57};
58
59// Flowchart Dialog - Constructor
60////////////////////////////////////////////////////////////////////////////
61bnsFlowchartDlg::bnsFlowchartDlg(QWidget* parent) :
62 QDialog(parent) {
63
64 int ww = QFontMetrics(font()).width('w');
65 QPushButton* _closeButton = new QPushButton("Close");
66 _closeButton->setMaximumWidth(10*ww);
67 connect(_closeButton, SIGNAL(clicked()), this, SLOT(close()));
68
69 QGridLayout* dlgLayout = new QGridLayout();
70 QLabel* img = new QLabel();
71 img->setPixmap(QPixmap(":bnsflowchart.png"));
72 dlgLayout->addWidget(img, 0,0);
73 dlgLayout->addWidget(_closeButton,1,0,Qt::AlignLeft);
74
75 setLayout(dlgLayout);
76 show();
77}
78
79// Flowchart Dialog - Destructor
80////////////////////////////////////////////////////////////////////////////
81bnsFlowchartDlg::~bnsFlowchartDlg() {
82};
83
84// Constructor
85////////////////////////////////////////////////////////////////////////////
86bnsWindow::bnsWindow() {
87
88 _bns = 0;
89
90 bnsSettings settings;
91 QPalette palette;
92 QColor lightGray(230, 230, 230);
93
94 QString fontString = settings.value("font").toString();
95 if ( !fontString.isEmpty() ) {
96 QFont newFont;
97 if (newFont.fromString(fontString)) {
98 QApplication::setFont(newFont);
99 }
100 }
101
102 int ww = QFontMetrics(this->font()).width('w');
103 setMinimumSize(77*ww, 65*ww);
104 setWindowTitle(tr("BKG Ntrip State Space Server (BNS) Version 1.1"));
105 setWindowIcon(QPixmap(":ntrip-logo.png"));
106
107 // Create Actions
108 // --------------
109 _actHelp = new QAction(tr("&Help Contents"),this);
110 connect(_actHelp, SIGNAL(triggered()), SLOT(slotHelp()));
111
112 _actAbout = new QAction(tr("&About BNS"),this);
113 connect(_actAbout, SIGNAL(triggered()), SLOT(slotAbout()));
114
115 _actFlowchart = new QAction(tr("&Flow Chart"),this);
116 connect(_actFlowchart, SIGNAL(triggered()), SLOT(slotFlowchart()));
117
118 _actFontSel = new QAction(tr("Select &Font"),this);
119 connect(_actFontSel, SIGNAL(triggered()), SLOT(slotFontSel()));
120
121 _actSaveOpt = new QAction(tr("&Save Options"),this);
122 connect(_actSaveOpt, SIGNAL(triggered()), SLOT(slotSaveOptions()));
123
124 _actQuit = new QAction(tr("&Quit"),this);
125 connect(_actQuit, SIGNAL(triggered()), SLOT(close()));
126
127 _actWhatsThis= new QAction(tr("Help=Shift+F1"),this);
128 connect(_actWhatsThis, SIGNAL(triggered()), SLOT(slotWhatsThis()));
129
130 _actStart = new QAction(tr("Sta&rt"),this);
131 connect(_actStart, SIGNAL(triggered()), SLOT(slotStart()));
132
133 _actStop = new QAction(tr("Sto&p"),this);
134 connect(_actStop, SIGNAL(triggered()), SLOT(slotStop()));
135 _actStop->setEnabled(false);
136
137 CreateMenu();
138 AddToolbar();
139
140 // Canvas with Editable Fields
141 // ---------------------------
142 _canvas = new QWidget;
143 setCentralWidget(_canvas);
144
145 // Proxy Options
146 // -------------
147 _proxyHostLineEdit = new QLineEdit(settings.value("proxyHost").toString());
148 _proxyPortLineEdit = new QLineEdit(settings.value("proxyPort").toString());
149
150 // General Options
151 // ---------------
152 _logFileLineEdit = new QLineEdit(settings.value("logFile").toString());
153 _fileAppendCheckBox = new QCheckBox();
154 _fileAppendCheckBox->setCheckState(Qt::CheckState(settings.value("fileAppend").toInt()));
155 _autoStartCheckBox = new QCheckBox();
156 _autoStartCheckBox->setCheckState(Qt::CheckState(
157 settings.value("autoStart").toInt()));
158
159 // RINEX Ephemeris Options
160 // -----------------------
161 _ephHostLineEdit = new QLineEdit(settings.value("ephHost").toString());
162 _ephPortLineEdit = new QLineEdit(settings.value("ephPort").toString());
163 _ephEchoLineEdit = new QLineEdit(settings.value("ephEcho").toString());
164
165 // Clocks & Orbits Options
166 // -----------------------
167 _clkPortLineEdit = new QLineEdit(settings.value("clkPort").toString());
168 _inpEchoLineEdit = new QLineEdit(settings.value("inpEcho").toString());
169
170
171 // Ephemeris Corrections I Options
172 // -------------------------------
173 _outHost_1_LineEdit = new QLineEdit(settings.value("outHost1").toString());
174 _outPort_1_LineEdit = new QLineEdit(settings.value("outPort1").toString());
175 _password_1_LineEdit = new QLineEdit(settings.value("password1").toString());
176 _password_1_LineEdit->setEchoMode(QLineEdit::Password);
177 _mountpoint_1_LineEdit = new QLineEdit(settings.value("mountpoint_1").toString());
178 _refSys_1_ComboBox = new QComboBox;
179 _refSys_1_ComboBox->setEditable(false);
180 _refSys_1_ComboBox->addItems(QString("IGS05,ETRF2000").split(","));
181 int ii = _refSys_1_ComboBox->findText(settings.value("refSys_1").toString());
182 if (ii != -1) {
183 _refSys_1_ComboBox->setCurrentIndex(ii);
184 }
185 _outFile_1_LineEdit = new QLineEdit(settings.value("outFile_1").toString());
186 _beClocks1CheckBox = new QCheckBox();
187 _beClocks1CheckBox->setCheckState(Qt::CheckState(settings.value("beClocks1").toInt()));
188
189 // Ephemeris Corrections II Options
190 // --------------------------------
191 _outHost_2_LineEdit = new QLineEdit(settings.value("outHost2").toString());
192 _outPort_2_LineEdit = new QLineEdit(settings.value("outPort2").toString());
193 _password_2_LineEdit = new QLineEdit(settings.value("password2").toString());
194 _password_2_LineEdit->setEchoMode(QLineEdit::Password);
195 _mountpoint_2_LineEdit = new QLineEdit(settings.value("mountpoint_2").toString());
196 _refSys_2_ComboBox = new QComboBox;
197 _refSys_2_ComboBox->setEditable(false);
198 _refSys_2_ComboBox->addItems(QString("IGS05,ETRF2000").split(","));
199 ii = _refSys_2_ComboBox->findText(settings.value("refSys_2").toString());
200 if (ii != -1) {
201 _refSys_2_ComboBox->setCurrentIndex(ii);
202 }
203 _outFile_2_LineEdit = new QLineEdit(settings.value("outFile_2").toString());
204 _beClocks2CheckBox = new QCheckBox();
205 _beClocks2CheckBox->setCheckState(Qt::CheckState(settings.value("beClocks2").toInt()));
206
207 // RINEX Clocks Options
208 // --------------------
209 _rnxPathLineEdit = new QLineEdit(settings.value("rnxPath").toString());
210 _rnxIntrComboBox = new QComboBox;
211 _rnxIntrComboBox->setEditable(false);
212 _rnxIntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
213 ii = _rnxIntrComboBox->findText(settings.value("rnxIntr").toString());
214 if (ii != -1) {
215 _rnxIntrComboBox->setCurrentIndex(ii);
216 }
217 _rnxSamplSpinBox = new QSpinBox;
218 _rnxSamplSpinBox->setMinimum(0);
219 _rnxSamplSpinBox->setMaximum(60);
220 _rnxSamplSpinBox->setSingleStep(5);
221 _rnxSamplSpinBox->setMaximumWidth(9*ww);
222 _rnxSamplSpinBox->setValue(settings.value("rnxSampl").toInt());
223 _rnxSamplSpinBox->setSuffix(" sec");
224
225 // SP3 Orbits Options
226 // ------------------
227 _sp3PathLineEdit = new QLineEdit(settings.value("sp3Path").toString());
228 _sp3IntrComboBox = new QComboBox;
229 _sp3IntrComboBox->setEditable(false);
230 _sp3IntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
231 ii = _sp3IntrComboBox->findText(settings.value("sp3Intr").toString());
232 if (ii != -1) {
233 _sp3IntrComboBox->setCurrentIndex(ii);
234 }
235 _sp3SamplSpinBox = new QSpinBox;
236 _sp3SamplSpinBox->setMinimum(0);
237 _sp3SamplSpinBox->setMaximum(900);
238 _sp3SamplSpinBox->setSingleStep(60);
239 _sp3SamplSpinBox->setMaximumWidth(9*ww);
240 _sp3SamplSpinBox->setValue(settings.value("sp3Sampl").toInt());
241 _sp3SamplSpinBox->setSuffix(" sec");
242
243 // Whats This
244 // ----------
245 _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>"));
246 _proxyPortLineEdit->setWhatsThis(tr("<p>Enter your proxy server port number in case one is operated in front of BNS.</p>"));
247 _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>"));
248 _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>"));
249 _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."));
250 _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."));
251 _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."));
252 _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."));
253 _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."));
254 _outHost_1_LineEdit->setWhatsThis(tr("BNS can stream clock and orbit corrections to Broadcast Ephemeris 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."));
255 _outPort_1_LineEdit->setWhatsThis(tr("Specify the IP port of an NTRIP Broadcaster to upload the stream. Default is port 80."));
256 _password_1_LineEdit->setWhatsThis(tr("Specify the stream upload password protecting the mounpoint on an NTRIP Broadcaster."));
257 _mountpoint_1_LineEdit->setWhatsThis(tr("Specify the mounpoint for stream upload to an NTRIP Broadcaster."));
258 _refSys_1_ComboBox->setWhatsThis(tr("Select the target reference system for outgoing clock and orbit corrections."));
259 _outHost_2_LineEdit->setWhatsThis(tr("BNS can stream clock and orbit corrections to Broadcast Ephemeris 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."));
260 _outPort_2_LineEdit->setWhatsThis(tr("Specify the IP port of an NTRIP Broadcaster to upload the stream. Default is port 80."));
261 _password_2_LineEdit->setWhatsThis(tr("Specify the stream upload password protecting the mounpoint on an NTRIP Broadcaster."));
262 _mountpoint_2_LineEdit->setWhatsThis(tr("Specify the mounpoint for stream upload to an NTRIP Broadcaster."));
263 _refSys_2_ComboBox->setWhatsThis(tr("Select the target reference system for outgoing clock and orbit corrections."));
264 _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."));
265 _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."));
266 _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."));
267 _rnxIntrComboBox->setWhatsThis(tr("Select the length of the Clock RINEX file."));
268 _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."));
269 _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."));
270 _sp3IntrComboBox->setWhatsThis(tr("Select the length of the SP3 orbit file."));
271 _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."));
272 _autoStartCheckBox->setWhatsThis(tr("<p>Tick 'Auto start' for auto-start of BNS at startup time in window mode with preassigned processing options.</p>"));
273 _beClocks1CheckBox->setWhatsThis(tr("<p>Send broadcast clocks instead of broadcast clock corrections and ignore the incoming clock estimates.</p>"));
274 _beClocks2CheckBox->setWhatsThis(tr("<p>Send broadcast clocks instead of broadcast clock corrections and ignore the incoming clock estimates.</p>"));
275
276
277 // TabWidget
278 // ---------
279 tabs = new QTabWidget();
280
281 // Proxy Tab
282 // ---------
283 QWidget* tab_prx = new QWidget();
284 tabs->setMaximumHeight(20*ww);
285 tabs->addTab(tab_prx, "Proxy");
286
287 QGridLayout* layout_prx = new QGridLayout;
288
289 layout_prx->setColumnMinimumWidth(0,9*ww);
290 _proxyPortLineEdit->setMaximumWidth(9*ww);
291
292 layout_prx->addWidget(new QLabel("Host"), 0, 0);
293 layout_prx->addWidget(_proxyHostLineEdit, 0, 1, 1, 10);
294 layout_prx->addWidget(new QLabel("Port"), 1, 0);
295 layout_prx->addWidget(_proxyPortLineEdit, 1, 1);
296 layout_prx->addWidget(new QLabel("Settings for the proxy in protected networks, leave boxes blank if none."),2, 0, 1, 50, Qt::AlignLeft);
297 layout_prx->addWidget(new QLabel(" "), 3, 0);
298
299 tab_prx->setLayout(layout_prx);
300
301 connect(_proxyHostLineEdit, SIGNAL(textChanged(const QString &)),
302 this, SLOT(bnsText(const QString &)));
303 if (_proxyHostLineEdit->text().isEmpty()) {
304 _proxyPortLineEdit->setStyleSheet("background-color: lightGray");
305 _proxyPortLineEdit->setEnabled(false);
306 }
307
308 // General Tab
309 // -----------
310 QWidget* tab_gen = new QWidget();
311 tabs->addTab(tab_gen, "General");
312
313 QGridLayout* layout_gen = new QGridLayout;
314
315 layout_gen->setColumnMinimumWidth(0,9*ww);
316 _logFileLineEdit->setMaximumWidth(40*ww);
317
318 layout_gen->addWidget(new QLabel("Logfile (full path) "), 0, 0);
319 layout_gen->addWidget(_logFileLineEdit, 0, 1);
320 layout_gen->addWidget(new QLabel("Append files"), 1, 0);
321 layout_gen->addWidget(_fileAppendCheckBox, 1, 1);
322 layout_gen->addWidget(new QLabel("Auto start"), 2, 0);
323 layout_gen->addWidget(_autoStartCheckBox, 2, 1);
324 layout_gen->addWidget(new QLabel("General settings for logfile and file handling."), 3, 0, 1, 50, Qt::AlignLeft);
325
326 tab_gen->setLayout(layout_gen);
327
328 // RINEX Ephemeris Tab
329 // -------------------
330 QWidget* tab_eph = new QWidget();
331 tabs->addTab(tab_eph, "RINEX Ephemeris");
332
333 QGridLayout* layout_eph = new QGridLayout;
334
335 layout_eph->setColumnMinimumWidth(0, 9*ww);
336 _ephPortLineEdit->setMaximumWidth(9*ww);
337
338 layout_eph->addWidget(new QLabel("Host"), 0, 0);
339 layout_eph->addWidget(_ephHostLineEdit, 0, 1, 1, 10);
340 layout_eph->addWidget(new QLabel("Port"), 1, 0);
341 layout_eph->addWidget(_ephPortLineEdit, 1, 1);
342 layout_eph->addWidget(new QLabel("Save (full path)"), 2, 0);
343 layout_eph->addWidget(_ephEchoLineEdit, 2, 1, 1, 26);
344 layout_eph->addWidget(new QLabel("Read broadcast ephemeris in RINEX Version 3 Navigation format."), 3, 0, 1, 50, Qt::AlignLeft);
345
346 tab_eph->setLayout(layout_eph);
347
348 // Clocks & Orbits Tab
349 // -------------------
350 QWidget* tab_co = new QWidget();
351 tabs->addTab(tab_co,"Clocks && Orbits");
352
353 QGridLayout* layout_co = new QGridLayout;
354
355 layout_co->setColumnMinimumWidth(0, 9*ww);
356 _clkPortLineEdit->setMaximumWidth(9*ww);
357
358 layout_co->addWidget(new QLabel("Listening port"), 0, 0);
359 layout_co->addWidget(_clkPortLineEdit, 0, 1);
360 layout_co->addWidget(new QLabel("Save (full path) "), 1, 0);
361 layout_co->addWidget(_inpEchoLineEdit, 1, 1);
362 layout_co->addWidget(new QLabel("Read clocks and orbits in SP3 format."), 2, 0, 1, 50, Qt::AlignLeft);
363 layout_co->addWidget(new QLabel(""), 3, 0);
364
365 tab_co->setLayout(layout_co);
366
367 // Ephemeris Corrections I Tab
368 // ---------------------------
369 QWidget* tab_cas1 = new QWidget();
370 tabs->addTab(tab_cas1, "Ephemeris Corrections I");
371
372 QGridLayout* layout_cas1 = new QGridLayout;
373
374 layout_cas1->setColumnMinimumWidth(0, 9*ww);
375 _outPort_1_LineEdit->setMaximumWidth(9*ww);
376 _password_1_LineEdit->setMaximumWidth(9*ww);
377 _mountpoint_1_LineEdit->setMaximumWidth(12*ww);
378 _refSys_1_ComboBox->setMaximumWidth(12*ww);
379
380 layout_cas1->addWidget(new QLabel("Host"), 0, 0);
381 layout_cas1->addWidget(_outHost_1_LineEdit, 0, 1, 1, 3);
382 layout_cas1->addWidget(new QLabel(" Port"), 0, 4, Qt::AlignRight);
383 layout_cas1->addWidget(_outPort_1_LineEdit, 0, 5);
384 layout_cas1->addWidget(new QLabel("Mountpoint"), 1, 0);
385 layout_cas1->addWidget(_mountpoint_1_LineEdit, 1, 1);
386 layout_cas1->addWidget(new QLabel("Password"), 1, 2, Qt::AlignRight);
387 layout_cas1->addWidget(_password_1_LineEdit, 1, 3);
388 layout_cas1->addWidget(new QLabel(" "), 1, 4);
389 layout_cas1->addWidget(new QLabel(" "), 1, 5);
390 layout_cas1->addWidget(new QLabel("System"), 2, 0);
391 layout_cas1->addWidget(_refSys_1_ComboBox, 2, 1);
392 layout_cas1->addWidget(new QLabel(" Save (full path)"), 2, 2, Qt::AlignRight);
393 layout_cas1->addWidget(_outFile_1_LineEdit, 2, 3, 1, 30);
394 layout_cas1->addWidget(new QLabel("Broadcast clocks"), 3, 0);
395 layout_cas1->addWidget(_beClocks1CheckBox, 3, 1);
396 layout_cas1->addWidget(new QLabel("Produce broadcast ephemeris corrections, upload to caster, reference system, local storage."), 4, 0, 1, 50);
397
398 tab_cas1->setLayout(layout_cas1);
399
400 connect(_outHost_1_LineEdit, SIGNAL(textChanged(const QString &)),
401 this, SLOT(bnsText(const QString &)));
402 if (_outHost_1_LineEdit->text().isEmpty()) {
403 _outPort_1_LineEdit->setStyleSheet("background-color: lightGray");
404 _mountpoint_1_LineEdit->setStyleSheet("background-color: lightGray");
405 _password_1_LineEdit->setStyleSheet("background-color: lightGray");
406 _outFile_1_LineEdit->setStyleSheet("background-color: lightGray");
407 _refSys_1_ComboBox->setStyleSheet("background-color: lightGray");
408 palette.setColor(_beClocks1CheckBox->backgroundRole(), lightGray);
409 _beClocks1CheckBox->setPalette(palette);
410 _outPort_1_LineEdit->setEnabled(false);
411 _mountpoint_1_LineEdit->setEnabled(false);
412 _password_1_LineEdit->setEnabled(false);
413 _outFile_1_LineEdit->setEnabled(false);
414 _refSys_1_ComboBox->setEnabled(false);
415 _beClocks1CheckBox->setEnabled(false);
416 }
417
418 // Ephemeris Corrections II Tab
419 // ----------------------------
420 QWidget* tab_cas2 = new QWidget();
421 tabs->addTab(tab_cas2, "Ephemeris Corrections II");
422
423 QGridLayout* layout_cas2 = new QGridLayout;
424
425 layout_cas2->setColumnMinimumWidth(0, 9*ww);
426 _outPort_2_LineEdit->setMaximumWidth(9*ww);
427 _password_2_LineEdit->setMaximumWidth(9*ww);
428 _mountpoint_2_LineEdit->setMaximumWidth(12*ww);
429 _refSys_2_ComboBox->setMaximumWidth(12*ww);
430
431 layout_cas2->addWidget(new QLabel("Host"), 0, 0);
432 layout_cas2->addWidget(_outHost_2_LineEdit, 0, 1, 1, 3);
433 layout_cas2->addWidget(new QLabel(" Port"), 0, 4, Qt::AlignRight);
434 layout_cas2->addWidget(_outPort_2_LineEdit, 0, 5);
435 layout_cas2->addWidget(new QLabel("Mountpoint"), 1, 0);
436 layout_cas2->addWidget(_mountpoint_2_LineEdit, 1, 1);
437 layout_cas2->addWidget(new QLabel("Password"), 1, 2, Qt::AlignRight);
438 layout_cas2->addWidget(_password_2_LineEdit, 1, 3);
439 layout_cas2->addWidget(new QLabel(" "), 1, 4);
440 layout_cas2->addWidget(new QLabel(" "), 1, 5);
441 layout_cas2->addWidget(new QLabel("System"), 2, 0);
442 layout_cas2->addWidget(_refSys_2_ComboBox, 2, 1);
443 layout_cas2->addWidget(new QLabel(" Save (full path)"), 2, 2, Qt::AlignRight);
444 layout_cas2->addWidget(_outFile_2_LineEdit, 2, 3, 1, 30);
445 layout_cas2->addWidget(new QLabel("Broadcast clocks"), 3, 0);
446 layout_cas2->addWidget(_beClocks2CheckBox, 3, 1);
447 layout_cas2->addWidget(new QLabel("Produce broadcast ephemeris corrections, upload to caster, reference system, local storage."), 4, 0, 1, 50);
448
449 tab_cas2->setLayout(layout_cas2);
450
451 connect(_outHost_2_LineEdit, SIGNAL(textChanged(const QString &)),
452 this, SLOT(bnsText(const QString &)));
453 if (_outHost_2_LineEdit->text().isEmpty()) {
454 _outPort_2_LineEdit->setStyleSheet("background-color: lightGray");
455 _mountpoint_2_LineEdit->setStyleSheet("background-color: lightGray");
456 _password_2_LineEdit->setStyleSheet("background-color: lightGray");
457 _outFile_2_LineEdit->setStyleSheet("background-color: lightGray");
458 _refSys_2_ComboBox->setStyleSheet("background-color: lightGray");
459 palette.setColor(_beClocks2CheckBox->backgroundRole(), lightGray);
460 _beClocks2CheckBox->setPalette(palette);
461 _outPort_2_LineEdit->setEnabled(false);
462 _mountpoint_2_LineEdit->setEnabled(false);
463 _password_2_LineEdit->setEnabled(false);
464 _outFile_2_LineEdit->setEnabled(false);
465 _refSys_2_ComboBox->setEnabled(false);
466 _beClocks2CheckBox->setEnabled(false);
467 }
468
469 // RINEX Clocks Tab
470 // ----------------
471 QWidget* tab_rin = new QWidget();
472 tabs->addTab(tab_rin, "RINEX Clocks ");
473
474 QGridLayout* layout_rin = new QGridLayout;
475
476 layout_rin->setColumnMinimumWidth(0, 9*ww);
477 _rnxIntrComboBox->setMaximumWidth(9*ww);
478
479 layout_rin->addWidget(new QLabel("Directory"), 0, 0);
480 layout_rin->addWidget(_rnxPathLineEdit, 0, 1, 1, 27);
481 layout_rin->addWidget(new QLabel("Interval"), 1, 0);
482 layout_rin->addWidget(_rnxIntrComboBox, 1, 1);
483 layout_rin->addWidget(new QLabel("Sampling"), 2, 0);
484 layout_rin->addWidget(_rnxSamplSpinBox, 2, 1);
485 layout_rin->addWidget(new QLabel("Save clock corrections in Clock RINEX file format."), 3, 0, 1, 50, Qt::AlignLeft);
486 layout_rin->addWidget(new QLabel(" "), 3, 0);
487
488 tab_rin->setLayout(layout_rin);
489
490 connect(_rnxPathLineEdit, SIGNAL(textChanged(const QString &)),
491 this, SLOT(bnsText(const QString &)));
492 if (_rnxPathLineEdit->text().isEmpty()) {
493 _rnxIntrComboBox->setStyleSheet("background-color: lightGray");
494 _rnxSamplSpinBox->setStyleSheet("background-color: lightGray");
495 _rnxIntrComboBox->setEnabled(false);
496 _rnxSamplSpinBox->setEnabled(false);
497 }
498
499 // SP3 Orbits Tab
500 // --------------
501 QWidget* tab_sp3 = new QWidget();
502 tabs->addTab(tab_sp3, "SP3 Orbits");
503
504 QGridLayout* layout_sp3 = new QGridLayout;
505
506 layout_sp3->setColumnMinimumWidth(0, 9*ww);
507 _sp3IntrComboBox->setMaximumWidth(9*ww);
508
509 layout_sp3->addWidget(new QLabel("Directory"), 0, 0);
510 layout_sp3->addWidget(_sp3PathLineEdit, 0, 1, 1, 27);
511 layout_sp3->addWidget(new QLabel("Interval"), 1, 0);
512 layout_sp3->addWidget(_sp3IntrComboBox, 1, 1);
513 layout_sp3->addWidget(new QLabel("Sampling"), 2, 0);
514 layout_sp3->addWidget(_sp3SamplSpinBox, 2, 1);
515 layout_sp3->addWidget(new QLabel("Save orbit corrections in SP3 file format."), 3, 0, 1, 50, Qt::AlignLeft);
516 layout_sp3->addWidget(new QLabel(" "), 3, 0);
517
518 tab_sp3->setLayout(layout_sp3);
519
520 connect(_sp3PathLineEdit, SIGNAL(textChanged(const QString &)),
521 this, SLOT(bnsText(const QString &)));
522 if (_sp3PathLineEdit->text().isEmpty()) {
523 _sp3IntrComboBox->setStyleSheet("background-color: lightGray");
524 _sp3SamplSpinBox->setStyleSheet("background-color: lightGray");
525 _sp3IntrComboBox->setEnabled(false);
526 _sp3SamplSpinBox->setEnabled(false);
527 }
528
529 tabs->setCurrentIndex(settings.value("startTab").toInt());
530
531 // Log
532 // ---
533 _log = new QTextBrowser();
534 _log->setReadOnly(true);
535 _log->setWhatsThis(tr("Records of BNS's activities are shown in the Log section."));
536
537 // Status
538 // ------
539 _status = new QGroupBox(tr("Status"));
540 QGridLayout* layout_status = new QGridLayout;
541
542 _statusLbl[0] = new QLabel("0 byte(s)"); _statusCnt[0] = 0;
543 _statusLbl[1] = new QLabel("0 byte(s)"); _statusCnt[1] = 0;
544 _statusLbl[2] = new QLabel("0 byte(s)"); _statusCnt[2] = 0;
545 _statusLbl[7] = new QLabel("RINEX Ephemeris:");
546 _statusLbl[4] = new QLabel("Clocks & Orbits:");
547 _statusLbl[5] = new QLabel("Ephemeris Corrections I:");
548 _statusLbl[6] = new QLabel("Ephemeris Corrections II:");
549 _statusLbl[3] = new QLabel("0 byte(s)"); _statusCnt[3] = 0;
550
551 _statusLbl[0]->setWhatsThis(tr("Status of incoming broadcast ephemeris."));
552 _statusLbl[1]->setWhatsThis(tr("Status of incoming stream of clocks and orbits."));
553 _statusLbl[2]->setWhatsThis(tr("Status of outgoing stream to NTRIP broadcaster."));
554 _statusLbl[7]->setWhatsThis(tr("Status of incoming broadcast ephemeris."));
555 _statusLbl[4]->setWhatsThis(tr("Status of incoming stream of clocks and orbits I."));
556 _statusLbl[5]->setWhatsThis(tr("Status of outgoing stream to NTRIP broadcaster I."));
557 _statusLbl[6]->setWhatsThis(tr("Status of outgoing stream to NTRIP broadcaster II."));
558 _statusLbl[3]->setWhatsThis(tr("Status of outgoing stream to NTRIP broadcaster II."));
559
560 layout_status->addWidget(_statusLbl[7], 0, 0);
561 layout_status->addWidget(_statusLbl[0], 0, 1);
562 layout_status->addWidget(_statusLbl[4], 1, 0);
563 layout_status->addWidget(_statusLbl[1], 1, 1);
564 layout_status->addWidget(_statusLbl[5], 0, 2);
565 layout_status->addWidget(_statusLbl[2], 0, 3);
566 layout_status->addWidget(_statusLbl[6], 1, 2);
567 layout_status->addWidget(_statusLbl[3], 1, 3);
568 _status->setLayout(layout_status);
569
570 // Main Layout
571 // -----------
572 QVBoxLayout* mainLayout = new QVBoxLayout;
573 mainLayout->addWidget(tabs);
574 mainLayout->addWidget(_log);
575 mainLayout->addWidget(_status);
576
577 _canvas->setLayout(mainLayout);
578
579 // Auto start
580 // ----------
581 if ( Qt::CheckState(settings.value("autoStart").toInt()) == Qt::Checked) {
582 slotStart();
583 }
584
585}
586
587// Destructor
588////////////////////////////////////////////////////////////////////////////
589bnsWindow::~bnsWindow() {
590}
591
592// Close Application gracefully
593////////////////////////////////////////////////////////////////////////////
594void bnsWindow::closeEvent(QCloseEvent* event) {
595
596int iRet = QMessageBox::question(this, "Close", "Save Options?",
597 QMessageBox::Yes, QMessageBox::No,
598 QMessageBox::Cancel);
599
600 if (iRet == QMessageBox::Cancel) {
601 event->ignore();
602 return;
603 }
604 else if (iRet == QMessageBox::Yes) {
605 slotSaveOptions();
606 }
607
608 QMainWindow::closeEvent(event);
609}
610
611// About Message
612////////////////////////////////////////////////////////////////////////////
613void bnsWindow::slotAbout() {
614 new bnsAboutDlg(0);
615}
616
617// Flowchart
618////////////////////////////////////////////////////////////////////////////
619void bnsWindow::slotFlowchart() {
620 new bnsFlowchartDlg(0);
621}
622
623// Help Window
624////////////////////////////////////////////////////////////////////////////
625void bnsWindow::slotHelp() {
626 QUrl url;
627 url.setPath(":bnshelp.html");
628 new bnsHlpDlg(0, url);
629}
630
631// Select Fonts
632////////////////////////////////////////////////////////////////////////////
633void bnsWindow::slotFontSel() {
634 bool ok;
635 QFont newFont = QFontDialog::getFont(&ok, this->font(), this);
636 if (ok) {
637 bnsSettings settings;
638 settings.setValue("font", newFont.toString());
639 QApplication::setFont(newFont);
640 int ww = QFontMetrics(newFont).width('w');
641 setMinimumSize(77*ww, 65*ww);
642 }
643}
644
645// Whats This Help
646////////////////////////////////////////////////////////////////////////////
647void bnsWindow::slotWhatsThis() {
648QWhatsThis::enterWhatsThisMode();
649}
650
651// Create Menus
652////////////////////////////////////////////////////////////////////////////
653void bnsWindow::CreateMenu() {
654 _menuFile = menuBar()->addMenu(tr("&File"));
655 _menuFile->addAction(_actFontSel);
656 _menuFile->addSeparator();
657 _menuFile->addAction(_actSaveOpt);
658 _menuFile->addSeparator();
659 _menuFile->addAction(_actQuit);
660
661 _menuHlp = menuBar()->addMenu(tr("&Help"));
662 _menuHlp->addAction(_actHelp);
663 _menuHlp->addAction(_actFlowchart);
664 _menuHlp->addAction(_actAbout);
665}
666
667// Tool (Command) Bar
668////////////////////////////////////////////////////////////////////////////
669void bnsWindow::AddToolbar() {
670 QToolBar* toolBar = new QToolBar;
671 addToolBar(Qt::BottomToolBarArea, toolBar);
672 toolBar->setMovable(false);
673 toolBar->addAction(_actStart);
674 toolBar->addAction(_actStop);
675 toolBar->addWidget(new QLabel(" "));
676 toolBar->addAction(_actWhatsThis);
677}
678
679// Save Options
680////////////////////////////////////////////////////////////////////////////
681void bnsWindow::slotSaveOptions() {
682 bnsSettings settings;
683 settings.setValue("proxyHost", _proxyHostLineEdit->text());
684 settings.setValue("proxyPort", _proxyPortLineEdit->text());
685 settings.setValue("logFile", _logFileLineEdit->text());
686 settings.setValue("fileAppend", _fileAppendCheckBox->checkState());
687 settings.setValue("autoStart", _autoStartCheckBox->checkState());
688 settings.setValue("refSys_1", _refSys_1_ComboBox->currentText());
689 settings.setValue("refSys_2", _refSys_2_ComboBox->currentText());
690 settings.setValue("inpEcho", _inpEchoLineEdit->text());
691 settings.setValue("ephHost", _ephHostLineEdit->text());
692 settings.setValue("ephPort", _ephPortLineEdit->text());
693 settings.setValue("ephEcho", _ephEchoLineEdit->text());
694 settings.setValue("clkPort", _clkPortLineEdit->text());
695 settings.setValue("outHost1", _outHost_1_LineEdit->text());
696 settings.setValue("outPort1", _outPort_1_LineEdit->text());
697 settings.setValue("outHost2", _outHost_2_LineEdit->text());
698 settings.setValue("outPort2", _outPort_2_LineEdit->text());
699 settings.setValue("mountpoint_1",_mountpoint_1_LineEdit->text());
700 settings.setValue("mountpoint_2",_mountpoint_2_LineEdit->text());
701 settings.setValue("outFile_1", _outFile_1_LineEdit->text());
702 settings.setValue("outFile_2", _outFile_2_LineEdit->text());
703 settings.setValue("password1", _password_1_LineEdit->text());
704 settings.setValue("password2", _password_2_LineEdit->text());
705 settings.setValue("rnxPath", _rnxPathLineEdit->text());
706 settings.setValue("rnxIntr", _rnxIntrComboBox->currentText());
707 settings.setValue("rnxSampl", _rnxSamplSpinBox->value());
708 settings.setValue("sp3Path", _sp3PathLineEdit->text());
709 settings.setValue("sp3Intr", _sp3IntrComboBox->currentText());
710 settings.setValue("sp3Sampl", _sp3SamplSpinBox->value());
711 settings.setValue("startTab", tabs->currentIndex());
712 settings.setValue("beClocks1", _beClocks1CheckBox->checkState());
713 settings.setValue("beClocks2", _beClocks2CheckBox->checkState());
714}
715
716// Display Program Messages
717////////////////////////////////////////////////////////////////////////////
718void bnsWindow::slotMessage(const QByteArray msg) {
719
720 const int maxBufferSize = 10000;
721
722 QString txt = _log->toPlainText() + "\n" +
723 QDateTime::currentDateTime().toUTC().toString("yy-MM-dd hh:mm:ss ") + msg;
724 _log->clear();
725 _log->append(txt.right(maxBufferSize));
726}
727
728// Delete bns
729////////////////////////////////////////////////////////////////////////////
730void bnsWindow::deleteBns() {
731 _actStart->setEnabled(true);
732 _actStop->setEnabled(false);
733 _bns->terminate();
734 _bns->wait(100);
735 delete _bns;
736 _bns = 0;
737}
738
739// Error in bns
740////////////////////////////////////////////////////////////////////////////
741void bnsWindow::slotError(const QByteArray msg) {
742 slotMessage(msg);
743 deleteBns();
744}
745
746// Stop
747////////////////////////////////////////////////////////////////////////////
748void bnsWindow::slotStop() {
749 int iRet = QMessageBox::question(this, "Stop", "Do you want to stop?",
750 QMessageBox::Yes, QMessageBox::No,
751 QMessageBox::NoButton);
752 if (iRet == QMessageBox::Yes) {
753 deleteBns();
754 }
755}
756
757// Start
758////////////////////////////////////////////////////////////////////////////
759void bnsWindow::slotStart() {
760 slotSaveOptions();
761
762 _actStart->setEnabled(false);
763 _actStop->setEnabled(true);
764
765 _bns = new t_bns(0);
766
767 connect(_bns, SIGNAL(newMessage(QByteArray)),
768 this, SLOT(slotMessage(const QByteArray)));
769
770 connect(_bns, SIGNAL(error(QByteArray)),
771 this, SLOT(slotError(const QByteArray)));
772
773 connect(_bns, SIGNAL(newEphBytes(int)), this, SLOT(slotEphBytes(int)));
774 connect(_bns, SIGNAL(newClkBytes(int)), this, SLOT(slotClkBytes(int)));
775 connect(_bns, SIGNAL(newOutBytes1(int)), this, SLOT(slotOutBytes1(int)));
776 connect(_bns, SIGNAL(newOutBytes2(int)), this, SLOT(slotOutBytes2(int)));
777
778 _bns->start();
779}
780
781// Input and output bytes statistics
782////////////////////////////////////////////////////////////////////////////
783void bnsWindow::slotEphBytes(int nBytes) {
784 updateStatus(0, nBytes);
785}
786void bnsWindow::slotClkBytes(int nBytes) {
787 updateStatus(1, nBytes);
788}
789void bnsWindow::slotOutBytes1(int nBytes) {
790 updateStatus(2, nBytes);
791}
792void bnsWindow::slotOutBytes2(int nBytes) {
793 updateStatus(3, nBytes);
794}
795
796void bnsWindow::updateStatus(int ii, int nBytes) {
797 QMutexLocker locker(&_mutex);
798
799 _statusCnt[ii] += nBytes;
800
801 if (_statusCnt[ii] < 1e3) {
802 _statusLbl[ii]->setText(QString("%1 byte(s)").arg((int)_statusCnt[ii]));
803 }
804 else if (_statusCnt[ii] < 1e6) {
805 _statusLbl[ii]->setText(QString("%1 kb").arg(_statusCnt[ii]/1.e3, 5));
806 }
807 else {
808 _statusLbl[ii]->setText(QString("%1 Mb").arg(_statusCnt[ii]/1.e6, 5));
809 }
810}
811
812// Bns Text
813////////////////////////////////////////////////////////////////////////////
814void bnsWindow::bnsText(const QString &text){
815
816 bool isEmpty = text.isEmpty();
817
818 QPalette palette;
819 QColor lightGray(230, 230, 230);
820 QColor white(255, 255, 255);
821
822 // Enable/disable Proxy Options
823 // -----
824 if (tabs->currentIndex() == 0) {
825 if (!isEmpty) {
826 _proxyPortLineEdit->setStyleSheet("background-color: white");
827 _proxyPortLineEdit->setEnabled(true);
828 } else {
829 _proxyPortLineEdit->setStyleSheet("background-color: lightGray");
830 _proxyPortLineEdit->setEnabled(false);
831 }
832 }
833
834 // Enable/disable Ephemeris Corrections I Options
835 // -----------------------------------------------
836 if (tabs->currentIndex() == 4) {
837 if (!isEmpty) {
838 _outPort_1_LineEdit->setStyleSheet("background-color: white");
839 _mountpoint_1_LineEdit->setStyleSheet("background-color: white");
840 _password_1_LineEdit->setStyleSheet("background-color: white");
841 _outFile_1_LineEdit->setStyleSheet("background-color: white");
842 _refSys_1_ComboBox->setStyleSheet("background-color: white");
843 palette.setColor(_beClocks1CheckBox->backgroundRole(), white);
844 _beClocks1CheckBox->setPalette(palette);
845 _outPort_1_LineEdit->setEnabled(true);
846 _mountpoint_1_LineEdit->setEnabled(true);
847 _password_1_LineEdit->setEnabled(true);
848 _outFile_1_LineEdit->setEnabled(true);
849 _refSys_1_ComboBox->setEnabled(true);
850 _beClocks1CheckBox->setEnabled(true);
851 } else {
852 _outPort_1_LineEdit->setStyleSheet("background-color: lightGray");
853 _mountpoint_1_LineEdit->setStyleSheet("background-color: lightGray");
854 _password_1_LineEdit->setStyleSheet("background-color: lightGray");
855 _outFile_1_LineEdit->setStyleSheet("background-color: lightGray");
856 _refSys_1_ComboBox->setStyleSheet("background-color: lightGray");
857 palette.setColor(_beClocks1CheckBox->backgroundRole(), lightGray);
858 _beClocks1CheckBox->setPalette(palette);
859 _outPort_1_LineEdit->setEnabled(false);
860 _mountpoint_1_LineEdit->setEnabled(false);
861 _password_1_LineEdit->setEnabled(false);
862 _outFile_1_LineEdit->setEnabled(false);
863 _refSys_1_ComboBox->setEnabled(false);
864 _beClocks1CheckBox->setEnabled(false);
865 }
866 }
867
868 // Enable/disable Ephemeris Corrections II Options
869 // -----------------------------------------------
870 if (tabs->currentIndex() == 5) {
871 if (!isEmpty) {
872 _outPort_2_LineEdit->setStyleSheet("background-color: white");
873 _mountpoint_2_LineEdit->setStyleSheet("background-color: white");
874 _password_2_LineEdit->setStyleSheet("background-color: white");
875 _outFile_2_LineEdit->setStyleSheet("background-color: white");
876 _refSys_2_ComboBox->setStyleSheet("background-color: white");
877 palette.setColor(_beClocks2CheckBox->backgroundRole(), white);
878 _beClocks2CheckBox->setPalette(palette);
879 _outPort_2_LineEdit->setEnabled(true);
880 _mountpoint_2_LineEdit->setEnabled(true);
881 _password_2_LineEdit->setEnabled(true);
882 _outFile_2_LineEdit->setEnabled(true);
883 _refSys_2_ComboBox->setEnabled(true);
884 _beClocks2CheckBox->setEnabled(true);
885 } else {
886 _outPort_2_LineEdit->setStyleSheet("background-color: lightGray");
887 _mountpoint_2_LineEdit->setStyleSheet("background-color: lightGray");
888 _password_2_LineEdit->setStyleSheet("background-color: lightGray");
889 _outFile_2_LineEdit->setStyleSheet("background-color: lightGray");
890 _refSys_2_ComboBox->setStyleSheet("background-color: lightGray");
891 palette.setColor(_beClocks2CheckBox->backgroundRole(), lightGray);
892 _beClocks2CheckBox->setPalette(palette);
893 _outPort_2_LineEdit->setEnabled(false);
894 _mountpoint_2_LineEdit->setEnabled(false);
895 _password_2_LineEdit->setEnabled(false);
896 _outFile_2_LineEdit->setEnabled(false);
897 _refSys_2_ComboBox->setEnabled(false);
898 _beClocks2CheckBox->setEnabled(false);
899 }
900 }
901
902 // Enable/disable RINEX Clocks Options
903 // -----------------------------------
904 if (tabs->currentIndex() == 6) {
905 if (!isEmpty) {
906 _rnxIntrComboBox->setStyleSheet("background-color: white");
907 _rnxSamplSpinBox->setStyleSheet("background-color: white");
908 _rnxIntrComboBox->setEnabled(true);
909 _rnxSamplSpinBox->setEnabled(true);
910 } else {
911 _rnxIntrComboBox->setStyleSheet("background-color: lightGray");
912 _rnxSamplSpinBox->setStyleSheet("background-color: lightGray");
913 _rnxIntrComboBox->setEnabled(false);
914 _rnxSamplSpinBox->setEnabled(false);
915 }
916 }
917
918 // Enable/disable SP3 Orbits Options
919 // ---------------------------------
920 if (tabs->currentIndex() == 7) {
921 if (!isEmpty) {
922 _sp3IntrComboBox->setStyleSheet("background-color: white");
923 _sp3SamplSpinBox->setStyleSheet("background-color: white");
924 _sp3IntrComboBox->setEnabled(true);
925 _sp3SamplSpinBox->setEnabled(true);
926 } else {
927 _sp3IntrComboBox->setStyleSheet("background-color: lightGray");
928 _sp3SamplSpinBox->setStyleSheet("background-color: lightGray");
929 _sp3IntrComboBox->setEnabled(false);
930 _sp3SamplSpinBox->setEnabled(false);
931 }
932 }
933
934}
Note: See TracBrowser for help on using the repository browser.