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: reqcDlg
|
---|
30 | *
|
---|
31 | * Purpose: Displays the teqc-like editing options
|
---|
32 | *
|
---|
33 | * Author: L. Mervart
|
---|
34 | *
|
---|
35 | * Created: 28-Mar-2012
|
---|
36 | *
|
---|
37 | * Changes:
|
---|
38 | *
|
---|
39 | * -----------------------------------------------------------------------*/
|
---|
40 |
|
---|
41 | #include <iostream>
|
---|
42 |
|
---|
43 | #include <QCloseEvent>
|
---|
44 | #include <QComboBox>
|
---|
45 | #include <QDateTimeEdit>
|
---|
46 | #include <QGridLayout>
|
---|
47 | #include <QLabel>
|
---|
48 | #include <QLineEdit>
|
---|
49 | #include <QMessageBox>
|
---|
50 | #include <QPushButton>
|
---|
51 | #include <QSpinBox>
|
---|
52 | #include <QWhatsThis>
|
---|
53 |
|
---|
54 | #include "reqcdlg.h"
|
---|
55 | #include "bncsettings.h"
|
---|
56 |
|
---|
57 | using namespace std;
|
---|
58 |
|
---|
59 |
|
---|
60 | // Constructor
|
---|
61 | ////////////////////////////////////////////////////////////////////////////
|
---|
62 | reqcDlg::reqcDlg(QWidget* parent) : QDialog(parent) {
|
---|
63 |
|
---|
64 | setWindowTitle(tr("RINEX Editing Options"));
|
---|
65 |
|
---|
66 | int ww = QFontMetrics(font()).width('w');
|
---|
67 |
|
---|
68 | const QString timeFmtString = "yyyy-MM-dd hh:mm:ss";
|
---|
69 |
|
---|
70 | _reqcRnxVersion = new QComboBox(this);
|
---|
71 | _reqcSampling = new QSpinBox(this);
|
---|
72 | _reqcStartDateTime = new QDateTimeEdit(this);
|
---|
73 | _reqcStartDateTime->setDisplayFormat(timeFmtString);
|
---|
74 | _reqcEndDateTime = new QDateTimeEdit(this);
|
---|
75 | _reqcEndDateTime->setDisplayFormat(timeFmtString);
|
---|
76 | _reqcRunBy = new QLineEdit(this);
|
---|
77 | _reqcUseObsTypes = new QLineEdit(this);
|
---|
78 | _reqcComment = new QLineEdit(this);
|
---|
79 | _reqcOldMarkerName = new QLineEdit(this);
|
---|
80 | _reqcNewMarkerName = new QLineEdit(this);
|
---|
81 | _reqcOldAntennaName = new QLineEdit(this);
|
---|
82 | _reqcNewAntennaName = new QLineEdit(this);
|
---|
83 | _reqcOldAntennaNumber = new QLineEdit(this);
|
---|
84 | _reqcNewAntennaNumber = new QLineEdit(this);
|
---|
85 | _reqcOldAntennadN = new QLineEdit(this);
|
---|
86 | _reqcNewAntennadN = new QLineEdit(this);
|
---|
87 | _reqcOldAntennadE = new QLineEdit(this);
|
---|
88 | _reqcNewAntennadE = new QLineEdit(this);
|
---|
89 | _reqcOldAntennadU = new QLineEdit(this);
|
---|
90 | _reqcNewAntennadU = new QLineEdit(this);
|
---|
91 | _reqcOldReceiverName = new QLineEdit(this);
|
---|
92 | _reqcNewReceiverName = new QLineEdit(this);
|
---|
93 | _reqcOldReceiverNumber = new QLineEdit(this);
|
---|
94 | _reqcNewReceiverNumber = new QLineEdit(this);
|
---|
95 |
|
---|
96 |
|
---|
97 | _reqcRnxVersion->setEditable(false);
|
---|
98 | _reqcRnxVersion->addItems(QString("2,3").split(","));
|
---|
99 | _reqcRnxVersion->setMaximumWidth(7*ww);
|
---|
100 |
|
---|
101 | _reqcSampling->setMinimum(0);
|
---|
102 | _reqcSampling->setMaximum(60);
|
---|
103 | _reqcSampling->setSingleStep(5);
|
---|
104 | _reqcSampling->setSuffix(" sec");
|
---|
105 | _reqcSampling->setMaximumWidth(7*ww);
|
---|
106 |
|
---|
107 | // Read Options
|
---|
108 | // ------------
|
---|
109 | bncSettings settings;
|
---|
110 |
|
---|
111 | int kk = _reqcRnxVersion->findText(settings.value("reqcRnxVersion").toString());
|
---|
112 | if (kk != -1) {
|
---|
113 | _reqcRnxVersion->setCurrentIndex(kk);
|
---|
114 | }
|
---|
115 | _reqcSampling->setValue(settings.value("reqcSampling").toInt());
|
---|
116 | if (settings.value("reqcStartDateTime").toString().isEmpty()) {
|
---|
117 | _reqcStartDateTime->setDateTime(QDateTime::fromString("1967-11-02T00:00:00", Qt::ISODate));
|
---|
118 | }
|
---|
119 | else {
|
---|
120 | _reqcStartDateTime->setDateTime(settings.value("reqcStartDateTime").toDateTime());
|
---|
121 | }
|
---|
122 | if (settings.value("reqcEndDateTime").toString().isEmpty()) {
|
---|
123 | _reqcEndDateTime->setDateTime(QDateTime::fromString("2099-01-01T00:00:00", Qt::ISODate));
|
---|
124 | }
|
---|
125 | else {
|
---|
126 | _reqcEndDateTime->setDateTime(settings.value("reqcEndDateTime").toDateTime());
|
---|
127 | }
|
---|
128 | _reqcRunBy->setText(settings.value("reqcRunBy").toString());
|
---|
129 | _reqcUseObsTypes->setText(settings.value("reqcUseObsTypes").toString());
|
---|
130 | _reqcComment->setText(settings.value("reqcComment").toString());
|
---|
131 | _reqcOldMarkerName->setText(settings.value("reqcOldMarkerName").toString());
|
---|
132 | _reqcNewMarkerName->setText(settings.value("reqcNewMarkerName").toString());
|
---|
133 | _reqcOldAntennaName->setText(settings.value("reqcOldAntennaName").toString());
|
---|
134 | _reqcNewAntennaName->setText(settings.value("reqcNewAntennaName").toString());
|
---|
135 | _reqcOldAntennaNumber->setText(settings.value("reqcOldAntennaNumber").toString());
|
---|
136 | _reqcNewAntennaNumber->setText(settings.value("reqcNewAntennaNumber").toString());
|
---|
137 | _reqcOldAntennadN->setText(settings.value("reqcOldAntennadN").toString());
|
---|
138 | _reqcNewAntennadN->setText(settings.value("reqcNewAntennadN").toString());
|
---|
139 | _reqcOldAntennadE->setText(settings.value("reqcOldAntennadE").toString());
|
---|
140 | _reqcNewAntennadE->setText(settings.value("reqcNewAntennadE").toString());
|
---|
141 | _reqcOldAntennadU->setText(settings.value("reqcOldAntennadU").toString());
|
---|
142 | _reqcNewAntennadU->setText(settings.value("reqcNewAntennadU").toString());
|
---|
143 | _reqcOldReceiverName->setText(settings.value("reqcOldReceiverName").toString());
|
---|
144 | _reqcNewReceiverName->setText(settings.value("reqcNewReceiverName").toString());
|
---|
145 | _reqcOldReceiverNumber->setText(settings.value("reqcOldReceiverNumber").toString());
|
---|
146 | _reqcNewReceiverNumber->setText(settings.value("reqcNewReceiverNumber").toString());
|
---|
147 |
|
---|
148 |
|
---|
149 | QString hlp = settings.value("reqcV2Priority").toString();
|
---|
150 | if (hlp.isEmpty()) {
|
---|
151 | hlp = "G:12&PWCSLXYN_ G:5&IQX_ R:12&PC_ R:3&IQX_ E:16&BCX_ E:578&IQX_ J:1&SLXCZ_ J:26&SLX_ J:5&IQX_ C:IQX_ I:ABCX_ S:1&C_ S:5&IQX_";
|
---|
152 | }
|
---|
153 | _reqcV2Priority = new QLineEdit(hlp);
|
---|
154 |
|
---|
155 | // Dialog Layout
|
---|
156 | // -------------
|
---|
157 | QGridLayout* grid = new QGridLayout;
|
---|
158 |
|
---|
159 | int ir = 0;
|
---|
160 | grid->addWidget(new QLabel("RINEX Version"), ir, 1);
|
---|
161 | grid->addWidget(_reqcRnxVersion, ir, 2);
|
---|
162 | grid->addWidget(new QLabel("Sampling"), ir, 3, Qt::AlignRight);
|
---|
163 | grid->addWidget(_reqcSampling, ir, 4);
|
---|
164 | ++ir;
|
---|
165 | grid->addWidget(new QLabel("Version 2 signal priority"), ir, 1);
|
---|
166 | grid->addWidget(_reqcV2Priority, ir, 2, 1, 4);
|
---|
167 | ++ir;
|
---|
168 | grid->addWidget(new QLabel("Start"), ir, 1);
|
---|
169 | grid->addWidget(_reqcStartDateTime, ir, 2);
|
---|
170 | grid->addWidget(new QLabel("End"), ir, 3, Qt::AlignRight);
|
---|
171 | grid->addWidget(_reqcEndDateTime, ir, 4);
|
---|
172 | ++ir;
|
---|
173 | grid->addWidget(new QLabel("Run By"), ir, 0);
|
---|
174 | grid->addWidget(_reqcRunBy, ir, 1);
|
---|
175 | ++ir;
|
---|
176 | grid->addWidget(new QLabel("Use Obs. Types"), ir, 0);
|
---|
177 | grid->addWidget(_reqcUseObsTypes, ir, 1, 1, 4);
|
---|
178 | ++ir;
|
---|
179 | grid->addWidget(new QLabel("Comment(s)"), ir, 0);
|
---|
180 | grid->addWidget(_reqcComment, ir, 1, 1, 4);
|
---|
181 | ++ir;
|
---|
182 | grid->addWidget(new QLabel("Old"), ir, 1, 1, 2, Qt::AlignCenter);
|
---|
183 | grid->addWidget(new QLabel("New"), ir, 3, 1, 2, Qt::AlignCenter);
|
---|
184 | ++ir;
|
---|
185 | grid->addWidget(new QLabel("Marker Name"), ir, 0);
|
---|
186 | grid->addWidget(_reqcOldMarkerName, ir, 1, 1, 2);
|
---|
187 | grid->addWidget(_reqcNewMarkerName, ir, 3, 1, 2);
|
---|
188 | ++ir;
|
---|
189 | grid->addWidget(new QLabel("Antenna Name"), ir, 0);
|
---|
190 | grid->addWidget(_reqcOldAntennaName, ir, 1, 1, 2);
|
---|
191 | grid->addWidget(_reqcNewAntennaName, ir, 3, 1, 2);
|
---|
192 | ++ir;
|
---|
193 | grid->addWidget(new QLabel("Antenna Number"), ir, 0);
|
---|
194 | grid->addWidget(_reqcOldAntennaNumber, ir, 1, 1, 2);
|
---|
195 | grid->addWidget(_reqcNewAntennaNumber, ir, 3, 1, 2);
|
---|
196 | ++ir;
|
---|
197 | grid->addWidget(new QLabel("Antenna ecc. dN"), ir, 0);
|
---|
198 | grid->addWidget(_reqcOldAntennadN, ir, 1, 1, 2);
|
---|
199 | grid->addWidget(_reqcNewAntennadN, ir, 3, 1, 2);
|
---|
200 | ++ir;
|
---|
201 | grid->addWidget(new QLabel("Antenna ecc. dE"), ir, 0);
|
---|
202 | grid->addWidget(_reqcOldAntennadE, ir, 1, 1, 2);
|
---|
203 | grid->addWidget(_reqcNewAntennadE, ir, 3, 1, 2);
|
---|
204 | ++ir;
|
---|
205 | grid->addWidget(new QLabel("Antenna ecc. dU"), ir, 0);
|
---|
206 | grid->addWidget(_reqcOldAntennadU, ir, 1, 1, 2);
|
---|
207 | grid->addWidget(_reqcNewAntennadU, ir, 3, 1, 2);
|
---|
208 | ++ir;
|
---|
209 | grid->addWidget(new QLabel("Receiver Name"), ir, 0);
|
---|
210 | grid->addWidget(_reqcOldReceiverName, ir, 1, 1, 2);
|
---|
211 | grid->addWidget(_reqcNewReceiverName, ir, 3, 1, 2);
|
---|
212 | ++ir;
|
---|
213 | grid->addWidget(new QLabel("Receiver Number"), ir, 0);
|
---|
214 | grid->addWidget(_reqcOldReceiverNumber, ir, 1, 1, 2);
|
---|
215 | grid->addWidget(_reqcNewReceiverNumber, ir, 3, 1, 2);
|
---|
216 |
|
---|
217 |
|
---|
218 | slotReqcTextChanged();
|
---|
219 | connect(_reqcRnxVersion, SIGNAL(currentIndexChanged(const QString &)),
|
---|
220 | this, SLOT(slotReqcTextChanged()));
|
---|
221 |
|
---|
222 | _buttonWhatsThis = new QPushButton(tr("Help=Shift+F1"), this);
|
---|
223 | connect(_buttonWhatsThis, SIGNAL(clicked()), this, SLOT(slotWhatsThis()));
|
---|
224 |
|
---|
225 | _buttonOK = new QPushButton(tr("OK / Save"), this);
|
---|
226 | connect(_buttonOK, SIGNAL(clicked()), this, SLOT(slotOK()));
|
---|
227 |
|
---|
228 | _buttonCancel = new QPushButton(tr("Cancel"), this);
|
---|
229 | connect(_buttonCancel, SIGNAL(clicked()), this, SLOT(close()));
|
---|
230 |
|
---|
231 | QHBoxLayout* buttonLayout = new QHBoxLayout;
|
---|
232 | buttonLayout->addWidget(_buttonWhatsThis);
|
---|
233 | buttonLayout->addStretch(1);
|
---|
234 | buttonLayout->addWidget(_buttonOK);
|
---|
235 | buttonLayout->addWidget(_buttonCancel);
|
---|
236 |
|
---|
237 | QVBoxLayout* mainLayout = new QVBoxLayout(this);
|
---|
238 | mainLayout->addLayout(grid);
|
---|
239 | mainLayout->addLayout(buttonLayout);
|
---|
240 |
|
---|
241 | // WhatsThis, RINEX Editing & QC
|
---|
242 | // -----------------------------
|
---|
243 | _reqcRnxVersion->setWhatsThis(tr("<p>Select version number of emerging new RINEX file.</p><p>Note the following:</p><p>When converting <u>RINEX Version 2 to Version 3 </u>Observation files, the tracking mode or channel information (signal attribute, see RINEX Version 3 documentation) in the (last out of the three characters) observation code is left blank if unknown.</p><p>When converting <u>RINEX Version 3 to Version 2</u>, the mapping of observations follows a 'Signal priority list' with signal attributes as defined in RINEX Version 3. <i>[key: reqcRnxVersion]</i></p>"));
|
---|
244 | _reqcSampling->setWhatsThis(tr("<p>Select sampling rate of emerging new RINEX Observation file.</p><p>'0 sec' means that observations from all epochs in the RINEX input file will become part of the RINEX output file. <i>[key: reqcSampling]</i></p>"));
|
---|
245 | _reqcV2Priority->setWhatsThis(tr("<p>Specify a priority list of characters defining signal attributes as defined in RINEX Version 3. Priorities will be used to map observations with RINEX Version 3 attributes from incoming streams to Version 2. The underscore character '_' stands for undefined attributes. A question mark '?' can be used as wildcard which represents any one character.</p><p>Signal priorities can be specified as equal for all systems, as system specific or as system and freq. specific. For example: </li><ul><li>'CWPX_?' (General signal priorities valid for all GNSS) </li><li>'C:IQX I:ABCX' (System specific signal priorities for BDS and IRNSS) </li><li>'G:12&PWCSLXYN G:5&IQX R:12&PC R:3&IQX' (System and frequency specific signal priorities) </li></ul>Default is the following priority list 'G:12&PWCSLXYN_ G:5&IQX_ R:12&PC_ R:3&IQX_ E:16&BCX_ E:578&IQX_ J:1&SLXCZ_ J:26&SLX_ J:5&IQX_ C:IQX_ I:ABCX_ S:1&C_ S:5&IQX_'. <i>[key: reqcV2Priority]</i></p>"));
|
---|
246 | _reqcStartDateTime->setWhatsThis(tr("<p>Specify begin of emerging new RINEX Observation file. <i>[key: reqcStartDateTime]</i></p>"));
|
---|
247 | _reqcEndDateTime->setWhatsThis(tr("<p>Specify end of emerging new RINEX Observation file. <i>[key: reqcEndDateTime]</i></p>"));
|
---|
248 | _reqcRunBy->setWhatsThis(tr("<p>Specify a 'RUN BY' string to be included in the emerging new RINEX file header.</p><p>Default is an empty option field, meaning the operator's user ID is used as 'RUN BY' string. <i>[key: reqcRunBy]</i></p>"));
|
---|
249 | _reqcComment->setWhatsThis(tr("<p>Specifying a comment line text to be added to the emerging new RINEX file header is an option. Any introduction of newline specification '\\n' in this enforces the beginning of a further comment line. Comment line(s) will be added to the header after the 'PGM / RUN BY / DATE' record.</p><p>Default is an empty option field meaning that no additional comment line is added to the RINEX header. <i>[key: reqcComment]</i></p>"));
|
---|
250 | _reqcUseObsTypes->setWhatsThis(tr("<p>This option lets you limit the RINEX output to specific observation types. Examples:</p><p><ul><li>G:C1C G:L1C R:C1C R:C1P S:C1C C:C1I C:L1I E:C1X E:L1X<br>(Valid for output of RINEX Version 3; output contains GPS C1C and L1C, GLONASS C1C and C1P, SBAS C1C, BeiDou C1C, C1I andL1I, Galileo C1X and L1X.)</li><li>C1 L2 L5<br>(Valid for output of RINEX Version 2 with mapping of Version 3 signals to Version 2 according to 'Version 2 Signal Priority'; output contains C1, L2 and L5 observations from any GNSS system.)</li></ul></p><p>Default is an empty option field, meaning that the RINEX output file contains all observations made available through RINEX input file. <i>[key: reqcUseObsTypes]</i></p>"));
|
---|
251 | _reqcOldMarkerName->setWhatsThis(tr("<p>Enter old Marker Name in RINEX Observation file.</p><p>Default is an empty option field. <i>[key: reqcOldMarkerName]</i></p>"));
|
---|
252 | _reqcNewMarkerName->setWhatsThis(tr("<p>Enter new Marker Name in RINEX Observation file.</p><p>If option 'Old Marker Name' is either left blank or its content is specified as given in the RINEX input file, then the marker name in the RINEX output file will be specified by 'New Marker Name'</p><p>Default is an empty option field, meaning that the content of the Marker Name data field in the RINEX file will not be changed. <i>[key: reqcNewMarkerName]</i></p>"));
|
---|
253 | _reqcOldAntennaName->setWhatsThis(tr("<p>Enter old Antenna Name in RINEX Observation file.</p><p>Default is an empty option field. <i>[key: reqcOldAntennaName]</i></p>"));
|
---|
254 | _reqcNewAntennaName->setWhatsThis(tr("<p>Enter new Antenna Name in RINEX Observation file.</p><p>If option 'Old Antenna Name' is either left blank or its content is specified as given in the RINEX input file, then the antenna name in the RINEX output file will be specified by 'New Antenna Name'</p><p>Default is an empty option field, meaning that the content of the Antenna Name data field in the RINEX file will not be changed. <i>[key: reqcNewAntennaName]</i></p>"));
|
---|
255 | _reqcOldAntennaNumber->setWhatsThis(tr("<p>Enter old Antenna Number in RINEX Observation file.</p><p>Default is an empty option field. <i>[key: reqcOldAntennaNumber]</i></p>"));
|
---|
256 | _reqcNewAntennaNumber->setWhatsThis(tr("<p>Enter new Antenna Number in RINEX Observation file.</p><p>If option 'Old Antenna Number' is either left blank or its content is specified as given in the RINEX input file, then the antenna number in the RINEX output file will be specified by 'New Antenna Number'</p><p>Default is an empty option field, meaning that the content of the Antenna Number data field in the RINEX file will not be changed. <i>[key: reqcNewAntennaNumber]</i></p>"));
|
---|
257 | _reqcOldAntennadN->setWhatsThis(tr("<p>Enter old North Antenna Eccentricity in RINEX Observation file.</p><p>Default is an empty option field. <i>[key: reqcOldAntennadN]</i></p>"));
|
---|
258 | _reqcNewAntennadN->setWhatsThis(tr("<p>Enter new North Antenna Eccentricity in RINEX Observation file.</p><p>If option 'Old Antenna North Eccentricity' is either left blank or its content is specified as given in the RINEX input file, then the north antenna eccentricity in the RINEX output file will be specified by 'New North Antenna Eccentricity'</p><p>Default is an empty option field, meaning that the content of the North Antenna Eccentricity data field in the RINEX file will not be changed. <i>[key: reqcNewAntennadN]</i></p>"));
|
---|
259 | _reqcOldAntennadE->setWhatsThis(tr("<p>Enter old East Antenna Eccentricity in RINEX Observation file.</p><p>Default is an empty option field. <i>[key: reqcOldAntennadE]</i></p>"));
|
---|
260 | _reqcNewAntennadE->setWhatsThis(tr("<p>Enter new East Antenna Eccentricity in RINEX Observation file.</p><p>If option 'Old Antenna East Eccentricity' is either left blank or its content is specified as given in the RINEX input file, then the east antenna eccentricity in the RINEX output file will be specified by 'New East Antenna Eccentricity'</p><p>Default is an empty option field, meaning that the content of the East Antenna Eccentricity data field in the RINEX file will not be changed. <i>[key: reqcNewAntennadE]</i></p>"));
|
---|
261 | _reqcOldAntennadU->setWhatsThis(tr("<p>Enter old Up Antenna Eccentricity in RINEX Observation file.</p><p>Default is an empty option field. <i>[key: reqcOldAntennadU]</i></p>"));
|
---|
262 | _reqcNewAntennadU->setWhatsThis(tr("<p>Enter new Up Antenna Eccentricity in RINEX Observation file.</p><p>If option 'Old Antenna Up Eccentricity' is either left blank or its content is specified as given in the RINEX input file, then the up antenna eccentricity in the RINEX output file will be specified by 'New Up Antenna Eccentricity'</p><p>Default is an empty option field, meaning that the content of the Up Antenna Eccentricity data field in the RINEX file will not be changed. <i>[key: reqcNewAntennadU]</i></p>"));
|
---|
263 | _reqcOldReceiverName->setWhatsThis(tr("<p>Enter old Receiver Name in RINEX Observation file.<p>Default is an empty option field. <i>[key: reqcOldReceiverName]</i></p>"));
|
---|
264 | _reqcNewReceiverName->setWhatsThis(tr("<p>Enter new Receiver Name in RINEX Observation file.</p><p>If option 'Old Receiver Name' is either left blank or its content is specified as given in the RINEX input file, then the receiver name in the RINEX output file will be specified by 'New Receiver Name'</p><p>Default is an empty option field, meaning that the content of the Receiver Name data field in the RINEX file will not be changed. <i>[key: reqcNewReceiverName]</i></p>"));
|
---|
265 | _reqcOldReceiverNumber->setWhatsThis(tr("<p>Enter old Receiver Number in RINEX Observation file.<p>Default is an empty option field. <i>[key: reqcOldReceiverNumber]</i></p>"));
|
---|
266 | _reqcNewReceiverNumber->setWhatsThis(tr("<p>Enter new Receiver Number in RINEX Observation file.</p><p>If option 'Old Receiver Number' is either left blank or its content is specified as given in the RINEX input file, then the receiver number in the RINEX output file will be specified by 'New Receiver Number'</p><p>Default is an empty option field, meaning that the content of the Receiver Number data field in the RINEX file will not be changed. <i>[key: reqcNewReceiverNumber]</i></p>"));
|
---|
267 | }
|
---|
268 |
|
---|
269 | // Destructor
|
---|
270 | ////////////////////////////////////////////////////////////////////////////
|
---|
271 | reqcDlg::~reqcDlg() {
|
---|
272 | delete _buttonOK;
|
---|
273 | delete _buttonCancel;
|
---|
274 | delete _buttonWhatsThis;
|
---|
275 | }
|
---|
276 |
|
---|
277 | // Accept the Options
|
---|
278 | ////////////////////////////////////////////////////////////////////////////
|
---|
279 | void reqcDlg::slotOK() {
|
---|
280 | saveOptions();
|
---|
281 | done(0);
|
---|
282 | }
|
---|
283 |
|
---|
284 | // Whats This Help
|
---|
285 | ////////////////////////////////////////////////////////////////////////////
|
---|
286 | void reqcDlg::slotWhatsThis() {
|
---|
287 | QWhatsThis::enterWhatsThisMode();
|
---|
288 | }
|
---|
289 |
|
---|
290 | // Close Dialog gracefully
|
---|
291 | ////////////////////////////////////////////////////////////////////////////
|
---|
292 | void reqcDlg::closeEvent(QCloseEvent* event) {
|
---|
293 |
|
---|
294 | int iRet = QMessageBox::question(this, "Close", "Save Options?",
|
---|
295 | QMessageBox::Yes, QMessageBox::No,
|
---|
296 | QMessageBox::Cancel);
|
---|
297 |
|
---|
298 | if (iRet == QMessageBox::Cancel) {
|
---|
299 | event->ignore();
|
---|
300 | return;
|
---|
301 | }
|
---|
302 | else if (iRet == QMessageBox::Yes) {
|
---|
303 | saveOptions();
|
---|
304 | }
|
---|
305 |
|
---|
306 | QDialog::closeEvent(event);
|
---|
307 | }
|
---|
308 |
|
---|
309 | // Save Selected Options
|
---|
310 | ////////////////////////////////////////////////////////////////////////////
|
---|
311 | void reqcDlg::saveOptions() {
|
---|
312 |
|
---|
313 | bncSettings settings;
|
---|
314 |
|
---|
315 | settings.setValue("reqcRnxVersion" , _reqcRnxVersion->currentText());
|
---|
316 | settings.setValue("reqcSampling" , _reqcSampling->value());
|
---|
317 | settings.setValue("reqcV2Priority" , _reqcV2Priority->text());
|
---|
318 | settings.setValue("reqcStartDateTime" , _reqcStartDateTime->dateTime().toString(Qt::ISODate));
|
---|
319 | settings.setValue("reqcEndDateTime" , _reqcEndDateTime->dateTime().toString(Qt::ISODate));
|
---|
320 | settings.setValue("reqcRunBy" , _reqcRunBy->text());
|
---|
321 | settings.setValue("reqcUseObsTypes" , _reqcUseObsTypes->text());
|
---|
322 | settings.setValue("reqcComment" , _reqcComment->text());
|
---|
323 | settings.setValue("reqcOldMarkerName" , _reqcOldMarkerName->text());
|
---|
324 | settings.setValue("reqcNewMarkerName" , _reqcNewMarkerName->text());
|
---|
325 | settings.setValue("reqcOldAntennaName" , _reqcOldAntennaName->text());
|
---|
326 | settings.setValue("reqcNewAntennaName" , _reqcNewAntennaName->text());
|
---|
327 | settings.setValue("reqcOldAntennaNumber" , _reqcOldAntennaNumber->text());
|
---|
328 | settings.setValue("reqcNewAntennaNumber" , _reqcNewAntennaNumber->text());
|
---|
329 | settings.setValue("reqcOldAntennadN" , _reqcOldAntennadN->text());
|
---|
330 | settings.setValue("reqcNewAntennadN" , _reqcNewAntennadN->text());
|
---|
331 | settings.setValue("reqcOldAntennadE" , _reqcOldAntennadE->text());
|
---|
332 | settings.setValue("reqcNewAntennadE" , _reqcNewAntennadE->text());
|
---|
333 | settings.setValue("reqcOldAntennadU" , _reqcOldAntennadU->text());
|
---|
334 | settings.setValue("reqcNewAntennadU" , _reqcNewAntennadU->text());
|
---|
335 | settings.setValue("reqcNewAntennaNumber" , _reqcNewAntennaNumber->text());
|
---|
336 | settings.setValue("reqcOldReceiverName" , _reqcOldReceiverName->text());
|
---|
337 | settings.setValue("reqcNewReceiverName" , _reqcNewReceiverName->text());
|
---|
338 | settings.setValue("reqcOldReceiverNumber", _reqcOldReceiverNumber->text());
|
---|
339 | settings.setValue("reqcNewReceiverNumber", _reqcNewReceiverNumber->text());
|
---|
340 | }
|
---|
341 |
|
---|
342 | // Reqc Text Changed
|
---|
343 | ////////////////////////////////////////////////////////////////////////////
|
---|
344 | void reqcDlg::slotReqcTextChanged(){
|
---|
345 |
|
---|
346 | const static QPalette paletteWhite(QColor(255, 255, 255));
|
---|
347 | const static QPalette paletteGray(QColor(230, 230, 230));
|
---|
348 |
|
---|
349 | if (sender() == 0 || sender() == _reqcRnxVersion) {
|
---|
350 | if (_reqcRnxVersion->currentText() == "2") {
|
---|
351 | _reqcV2Priority->setPalette(paletteWhite);
|
---|
352 | _reqcV2Priority->setEnabled(true);
|
---|
353 | }
|
---|
354 | else {
|
---|
355 | _reqcV2Priority->setPalette(paletteGray);
|
---|
356 | _reqcV2Priority->setEnabled(false);
|
---|
357 | }
|
---|
358 | }
|
---|
359 | }
|
---|
360 |
|
---|