1 | // Part of BNC, a utility for retrieving decoding and
|
---|
2 | // converting GNSS data streams from NTRIP broadcasters.
|
---|
3 | //
|
---|
4 | // Copyright (C) 2007
|
---|
5 | // German Federal Agency for Cartography and Geodesy (BKG)
|
---|
6 | // http://www.bkg.bund.de
|
---|
7 | // Czech Technical University Prague, Department of Geodesy
|
---|
8 | // http://www.fsv.cvut.cz
|
---|
9 | //
|
---|
10 | // Email: euref-ip@bkg.bund.de
|
---|
11 | //
|
---|
12 | // This program is free software; you can redistribute it and/or
|
---|
13 | // modify it under the terms of the GNU General Public License
|
---|
14 | // as published by the Free Software Foundation, version 2.
|
---|
15 | //
|
---|
16 | // This program is distributed in the hope that it will be useful,
|
---|
17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
19 | // GNU General Public License for more details.
|
---|
20 | //
|
---|
21 | // You should have received a copy of the GNU General Public License
|
---|
22 | // along with this program; if not, write to the Free Software
|
---|
23 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
---|
24 |
|
---|
25 | /* -------------------------------------------------------------------------
|
---|
26 | * BKG NTRIP Client
|
---|
27 | * -------------------------------------------------------------------------
|
---|
28 | *
|
---|
29 | * Class: t_pppWidgets
|
---|
30 | *
|
---|
31 | * Purpose: This class stores widgets for PPP options
|
---|
32 | *
|
---|
33 | * Author: L. Mervart
|
---|
34 | *
|
---|
35 | * Created: 29-Jul-2014
|
---|
36 | *
|
---|
37 | * Changes:
|
---|
38 | *
|
---|
39 | * -----------------------------------------------------------------------*/
|
---|
40 |
|
---|
41 | #include <iostream>
|
---|
42 |
|
---|
43 | #include "PPP/pppwidgets.h"
|
---|
44 | #include "qtfilechooser.h"
|
---|
45 | #include "bncsettings.h"
|
---|
46 |
|
---|
47 | using namespace std;
|
---|
48 |
|
---|
49 | // Constructor
|
---|
50 | ////////////////////////////////////////////////////////////////////////////
|
---|
51 | t_pppWidgets::t_pppWidgets() {
|
---|
52 | _dataSource = new QComboBox(); _dataSource -> setObjectName("PPP/dataSource");
|
---|
53 | _rinexObs = new qtFileChooser(); _rinexObs -> setObjectName("PPP/rinexObs");
|
---|
54 | _rinexNav = new qtFileChooser(); _rinexNav -> setObjectName("PPP/rinexNav");
|
---|
55 | _corrHostPort = new QLineEdit(); _corrHostPort-> setObjectName("PPP/corrHostPort");
|
---|
56 | _corrFile = new qtFileChooser(); _corrFile -> setObjectName("PPP/corrFile");
|
---|
57 | _crdFile = new qtFileChooser(); _crdFile -> setObjectName("PPP/crdFile");
|
---|
58 | _antexFile = new qtFileChooser(); _antexFile -> setObjectName("PPP/antexFile");
|
---|
59 | _logFile = new QLineEdit(); _logFile -> setObjectName("PPP/logFile");
|
---|
60 | _nmeaFile = new QLineEdit(); _nmeaFile -> setObjectName("PPP/nmeaFile");
|
---|
61 | _nmeaPort = new QLineEdit(); _nmeaPort -> setObjectName("PPP/nmeaPort");
|
---|
62 | _staTable = new QTableWidget(); _staTable -> setObjectName("PPP/staTable");
|
---|
63 | _lcGPS = new QComboBox(); _lcGPS -> setObjectName("PPP/lcGPS");
|
---|
64 | _lcGLONASS = new QComboBox(); _lcGLONASS -> setObjectName("PPP/lcGLONASS");
|
---|
65 | _lcGalileo = new QComboBox(); _lcGalileo -> setObjectName("PPP/lcGalileo");
|
---|
66 | _sigmaC1 = new QLineEdit(); _sigmaC1 -> setObjectName("PPP/sigmaC1");
|
---|
67 | _sigmaL1 = new QLineEdit(); _sigmaL1 -> setObjectName("PPP/sigmaL1");
|
---|
68 | _corrWaitTime = new QSpinBox(); _corrWaitTime-> setObjectName("PPP/corrWaitTime");
|
---|
69 |
|
---|
70 | _dataSource->setEditable(false);
|
---|
71 | _dataSource->addItems(QString("Real-Time Streams,RINEX Files").split(","));
|
---|
72 |
|
---|
73 | _lcGPS->setEditable(false);
|
---|
74 | _lcGPS->addItems(QString("P3,L3,P3&L3").split(","));
|
---|
75 |
|
---|
76 | _lcGLONASS->setEditable(false);
|
---|
77 | _lcGLONASS->addItems(QString("P3,L3,P3&L3").split(","));
|
---|
78 |
|
---|
79 | _lcGalileo->setEditable(false);
|
---|
80 | _lcGalileo->addItems(QString("P3,L3,P3&L3").split(","));
|
---|
81 |
|
---|
82 | readOptions();
|
---|
83 | }
|
---|
84 |
|
---|
85 | //
|
---|
86 | ////////////////////////////////////////////////////////////////////////////
|
---|
87 | void t_pppWidgets::readOptions() {
|
---|
88 |
|
---|
89 | bncSettings settings;
|
---|
90 |
|
---|
91 | int ii = _dataSource->findText(settings.value(_dataSource->objectName()).toString());
|
---|
92 | if (ii != -1) {
|
---|
93 | _dataSource->setCurrentIndex(ii);
|
---|
94 | }
|
---|
95 | ii = _lcGPS->findText(settings.value(_lcGPS->objectName()).toString());
|
---|
96 | if (ii != -1) {
|
---|
97 | _lcGPS->setCurrentIndex(ii);
|
---|
98 | }
|
---|
99 | ii = _lcGLONASS->findText(settings.value(_lcGLONASS->objectName()).toString());
|
---|
100 | if (ii != -1) {
|
---|
101 | _lcGLONASS->setCurrentIndex(ii);
|
---|
102 | }
|
---|
103 | ii = _lcGalileo->findText(settings.value(_lcGalileo->objectName()).toString());
|
---|
104 | if (ii != -1) {
|
---|
105 | _lcGalileo->setCurrentIndex(ii);
|
---|
106 | }
|
---|
107 |
|
---|
108 | _rinexObs ->setFileName(settings.value(_rinexObs ->objectName()).toString());
|
---|
109 | _rinexNav ->setFileName(settings.value(_rinexNav ->objectName()).toString());
|
---|
110 | _corrFile ->setFileName(settings.value(_corrFile ->objectName()).toString());
|
---|
111 | _crdFile ->setFileName(settings.value(_crdFile ->objectName()).toString());
|
---|
112 | _antexFile->setFileName(settings.value(_antexFile->objectName()).toString());
|
---|
113 |
|
---|
114 | _corrHostPort->setText(settings.value(_corrHostPort->objectName()).toString());
|
---|
115 | _logFile ->setText(settings.value(_logFile ->objectName()).toString());
|
---|
116 | _nmeaFile ->setText(settings.value(_nmeaFile ->objectName()).toString());
|
---|
117 | _nmeaPort ->setText(settings.value(_nmeaPort ->objectName()).toString());
|
---|
118 | _sigmaC1 ->setText(settings.value(_sigmaC1 ->objectName()).toString());
|
---|
119 | _sigmaL1 ->setText(settings.value(_sigmaL1 ->objectName()).toString());
|
---|
120 |
|
---|
121 | _corrWaitTime->setValue(settings.value(_corrWaitTime->objectName()).toInt());
|
---|
122 | }
|
---|
123 |
|
---|
124 | //
|
---|
125 | ////////////////////////////////////////////////////////////////////////////
|
---|
126 | void t_pppWidgets::saveOptions() {
|
---|
127 |
|
---|
128 | bncSettings settings;
|
---|
129 |
|
---|
130 | settings.setValue(_dataSource ->objectName(), _dataSource ->currentText());
|
---|
131 | settings.setValue(_rinexObs ->objectName(), _rinexObs ->fileName());
|
---|
132 | settings.setValue(_rinexNav ->objectName(), _rinexNav ->fileName());
|
---|
133 | settings.setValue(_corrHostPort->objectName(), _corrHostPort->text());
|
---|
134 | settings.setValue(_corrFile ->objectName(), _corrFile ->fileName());
|
---|
135 | settings.setValue(_crdFile ->objectName(), _crdFile ->fileName());
|
---|
136 | settings.setValue(_antexFile ->objectName(), _antexFile ->fileName());
|
---|
137 | settings.setValue(_logFile ->objectName(), _logFile ->text());
|
---|
138 | settings.setValue(_nmeaFile ->objectName(), _nmeaFile ->text());
|
---|
139 | settings.setValue(_nmeaPort ->objectName(), _nmeaPort ->text());
|
---|
140 | settings.setValue(_lcGPS ->objectName(), _lcGPS ->currentText());
|
---|
141 | settings.setValue(_lcGLONASS ->objectName(), _lcGLONASS ->currentText());
|
---|
142 | settings.setValue(_lcGalileo ->objectName(), _lcGalileo ->currentText());
|
---|
143 | settings.setValue(_sigmaC1 ->objectName(), _sigmaC1 ->text());
|
---|
144 | settings.setValue(_sigmaL1 ->objectName(), _sigmaL1 ->text());
|
---|
145 | settings.setValue(_corrWaitTime->objectName(), _corrWaitTime->value());
|
---|
146 |
|
---|
147 | }
|
---|