General Purpose Geodetic Library
VpStartupWizard.cpp
Go to the documentation of this file.
1 /*
2  * This file is a part of vgosDbProcLogs. vgosDbProcLogs is a part of
3  * CALC/SOLVE system and is designed to extract data, meteo parameters
4  * and cable calibrations, from stations log files and store them in
5  * the vgosDb format.
6  * Copyright (C) 2015-2020 Sergei Bolotin.
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #include "vgosDbProcLogs.h"
24 #include "VpStartupWizard.h"
25 
26 #include <iostream>
27 #include <stdlib.h>
28 #include <unistd.h>
29 #include <sys/types.h>
30 #include <pwd.h>
31 
32 #include <QtCore/QDir>
33 #include <QtCore/QSettings>
34 
35 
36 
37 #if QT_VERSION >= 0x050000
38 # include <QtWidgets/QBoxLayout>
39 # include <QtWidgets/QButtonGroup>
40 # include <QtWidgets/QCheckBox>
41 # include <QtWidgets/QFrame>
42 # include <QtWidgets/QGroupBox>
43 # include <QtWidgets/QGridLayout>
44 # include <QtWidgets/QHeaderView>
45 # include <QtWidgets/QLabel>
46 # include <QtWidgets/QLineEdit>
47 # include <QtWidgets/QMessageBox>
48 # include <QtWidgets/QPushButton>
49 # include <QtWidgets/QRadioButton>
50 # include <QtWidgets/QSpinBox>
51 # include <QtWidgets/QTreeWidget>
52 # include <QtWidgets/QVBoxLayout>
53 #else
54 # include <QtGui/QBoxLayout>
55 # include <QtGui/QButtonGroup>
56 # include <QtGui/QCheckBox>
57 # include <QtGui/QFrame>
58 # include <QtGui/QGroupBox>
59 # include <QtGui/QGridLayout>
60 # include <QtGui/QHeaderView>
61 # include <QtGui/QLabel>
62 # include <QtGui/QLineEdit>
63 # include <QtGui/QMessageBox>
64 # include <QtGui/QPushButton>
65 # include <QtGui/QRadioButton>
66 # include <QtGui/QSpinBox>
67 # include <QtGui/QTreeWidget>
68 # include <QtGui/QVBoxLayout>
69 #endif
70 
71 
72 #include <QtGui/QPixmap>
73 
74 
75 #include <SgLogger.h>
76 
77 
78 
79 
80 
81 //
82 const int VpStartupWizard::serialNumber_ = 20150527; // 2015/05/27
83 //
84 /*=======================================================================================================
85 *
86 * METHODS:
87 *
88 *======================================================================================================*/
90 {
92 };
93 
94 
95 
96 //
97 VpStartupWizard::VpStartupWizard(bool isFirstRun, bool isForcedRun, bool isSystemWideRun,
98  QSettings *settings, QWidget *parent)
99  : QWizard(parent)
100 {
101  isFirstRun_ = isFirstRun;
102  isForcedRun_ = isForcedRun;
103  isSystemWideRun_ = isSystemWideRun;
104  settings_ = settings;
105  addPage(createIntroPage());
106  addPage(createPageHomeDir());
107  //
108  addPage(createPageDefaultCableSigns());
109  addPage(createPageRinexData());
110  //
111  if (!isSystemWideRun_)
112  addPage(createPageOne());
113  addPage(createPageTwo());
114  addPage(createPageThree());
115  addPage(createConclusionPage());
116 
117  setWizardStyle(ModernStyle);
118 
119  setPixmap(QWizard::LogoPixmap, QPixmap(":/images/NVI_logo.png"));
120  setPixmap(QWizard::WatermarkPixmap, QPixmap(":/images/pattern_1.png"));
121 
122  setWindowTitle(vgosDbProcLogsVersion.getSoftwareName() + " Startup Wizard" +
123  QString(isSystemWideRun?" (system-wide settings)":""));
124 };
125 
126 
127 
128 //
130 {
131 };
132 
133 
134 
135 //
137 {
138  VpWizardPage *w=new VpWizardPage();
139  QString str;
140 
141  // title:
142  // w->setTitle("<p><font size=+1 face=\"Times\">Wellcome to <b>&nu;Solve</b>!</font></p>");
143  w->setTitle("<p><font size=+1 face=\"Times\">Welcome to vgosDbProcLogs</font></p>");
144 
145  // subTitle:
146  str = "The Startup Wizard will ask you few questions about software configuration.";
147  if (isFirstRun_)
148  w->setSubTitle("<font face=\"Times\"><p>Thank you for installing vgosDbProcLogs version " +
149  vgosDbProcLogsVersion.toString() + ".</p><p>" + str + "</p></font>");
150  else if (!isForcedRun_)
151  w->setSubTitle( "<font face=\"Times\"><p>Congratulation! You just have upgraded SgLib and "
152  "vgosDbProcLogs software to the versions " + libraryVersion.toString() + " and " +
153  vgosDbProcLogsVersion.toString() + ".</p><p>" + str + "</p></font>");
154  else
155  w->setSubTitle( "<font face=\"Times\"><p>It is Startup Wizard. "
156  "You are using SgLib version " +
158  ") and vgosDbProcLogs version " + vgosDbProcLogsVersion.toString() + " (" +
159  vgosDbProcLogsVersion.getCodeName() + ").</p><p>" + str + "</p></font>");
160 
161  w->setButtonText(QWizard::NextButton, "Agree");
162 
163  QVBoxLayout *layout = new QVBoxLayout;
164  w->setLayout(layout);
165 
166  // first label:
167  str =
168  "<h3>vgosDbProcLogs</h3>"
169  "<p>vgosDbProcLogs is software that extracts meteo parameters and cable calibrations from"
170  "log files and stores them in vgosDb format."
171 
172  "<p>Copyright (C) 2015-2020 Sergei Bolotin.</p>"
173 
174  "<p>This program is free software: you can redistribute it and/or modify "
175  "it under the terms of the GNU General Public License as published by "
176  "the Free Software Foundation, either version 3 of the License, or "
177  "(at your option) any later version.</p>"
178 
179  "<p>This program is distributed in the hope that it will be useful, "
180  "but WITHOUT ANY WARRANTY; without even the implied warranty of "
181  "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "
182  "GNU General Public License for more details.</p>"
183 
184  "<p>You should have received a copy of the GNU General Public License "
185  "along with this program. If not, see http://www.gnu.org/licenses.</p>"
186 
187  "<p>Please, read carefully the license agreement and if you agree, press \"Agree\" button.</p>"
188  ""
189  "";
190  QLabel *label=new QLabel("<font face=\"Times\">" + str + "</font>");
191  label->setWordWrap(true);
192  layout->addWidget(label);
193  layout->addStretch(1);
194 
195  if (isFirstRun_)
196  {
197 // if (!isFirstRun_)
198 // cb->setChecked(true);
199  };
200 
201  QCheckBox *cb=new QCheckBox("I have read and accept the conditions.", w);
202  w->registerField("warrantyAccepted*", cb);
203  layout->addWidget(cb);
204  layout->addSpacing(40);
205  return w;
206 };
207 
208 
209 
210 //
212 {
213  VpWizardPage *w=new VpWizardPage();
214  QString path2Home;
215  bool have2ForceUser(false);
216 
217  QString str;
218  QLabel *label;
219  QVBoxLayout *layout=new QVBoxLayout;
220  QGroupBox *gBox;
221  QGridLayout *gridLayout;
222  w->setLayout(layout);
223 
224 
225  w->setTitle("<p><font size=+1 face=\"Times\">Essential directories of vgosDbProcLogs</font></p>");
226  w->setSubTitle("<font face=\"Times\"><p>The working directory of the software.</p></font>");
227  w->setPixmap(QWizard::WatermarkPixmap, QPixmap(":/images/pattern_2.png"));
228 
229  if (isSystemWideRun_)
230  str =
231  "<h3>Default Directories</h3>"
232  "<p>Please, provide paths to data on your system.</p>"
233  "<p>Users will be able to overwrite default settings.</p>"
234  "";
235  else
236  str =
237  "<h3>vgosDbProcLogs Home Directory</h3>"
238  "<p>Please, specify the software's home directory.</p>"
239  "<p>All paths that are not absolute will be counted form this directory. The software home "
240  "directory have to be writable for a user and should be different from user's home directory.</p>"
241  "";
242  label = new QLabel("<font face=\"Times\">" + str + "</font>");
243  label->setWordWrap(true);
244  layout->addWidget(label);
245  layout->addSpacing(20);
246 
247  if (!isSystemWideRun_)
248  {
249  path2Home = setup.getPath2Home();
250  if (isFirstRun_ || setup.getPath2Home()=="")
251  path2Home = QDir::homePath() + "/" + vgosDbProcLogsVersion.getSoftwareName();
252  if (path2Home == QDir::homePath()) // cannot be user's home
253  have2ForceUser = true;
254 
255  gBox = new QGroupBox("vgosDbProcLogs home directory", w);
256  gridLayout = new QGridLayout(gBox);
257  label = new QLabel("Path to the software home directory:", gBox);
258  label->setMinimumSize(label->sizeHint());
259  leHomeDirName_ = new QLineEdit(gBox);
260  leHomeDirName_->setText(path2Home);
261  leHomeDirName_->setMinimumSize(leHomeDirName_->sizeHint());
262  gridLayout->addWidget(label, 0, 0);
263  gridLayout->addWidget(leHomeDirName_, 0, 1);
264 
265  if (have2ForceUser)
266  w->registerField("path2Home*", leHomeDirName_);
267  layout->addWidget(gBox);
268  layout->addSpacing(20);
269  };
270 
271 
272  gBox = new QGroupBox("Essential directories", w);
273  gridLayout = new QGridLayout(gBox);
274 
275  label = new QLabel("Path to session files:", gBox);
276  label->setMinimumSize(label->sizeHint());
277  leSessionDirName_ = new QLineEdit(gBox);
278  leSessionDirName_->setText(setup.getPath2SessionFiles());
279  leSessionDirName_->setMinimumSize(leSessionDirName_->sizeHint());
280  gridLayout->addWidget(label, 0, 0);
281  gridLayout->addWidget(leSessionDirName_, 0, 1);
282 
283  label = new QLabel("Path to vgosDb files:", gBox);
284  label->setMinimumSize(label->sizeHint());
285  leVgosDbDirName_ = new QLineEdit(gBox);
287  leVgosDbDirName_->setMinimumSize(leVgosDbDirName_->sizeHint());
288  gridLayout->addWidget(label, 1, 0);
289  gridLayout->addWidget(leVgosDbDirName_, 1, 1);
290 
291  label = new QLabel("Path to Master files:", gBox);
292  label->setMinimumSize(label->sizeHint());
293  leMasterFilesDirName_ = new QLineEdit(gBox);
295  leMasterFilesDirName_->setMinimumSize(leMasterFilesDirName_->sizeHint());
296  gridLayout->addWidget(label, 2, 0);
297  gridLayout->addWidget(leMasterFilesDirName_, 2, 1);
298 
299  layout->addWidget(gBox);
300 
301 
302  // general options:
303  gBox = new QGroupBox("General options", w);
304  QVBoxLayout *aLayout=new QVBoxLayout(gBox);
305  cbUseLocalLocale_ = new QCheckBox("Do not alternate locale set up", gBox);
306  cbUseLocalLocale_->setMinimumSize(cbUseLocalLocale_->sizeHint());
307  cbUseLocalLocale_->setChecked(setup.getUseLocalLocale());
308  aLayout -> addWidget(cbUseLocalLocale_);
309 
310  layout->addWidget(gBox);
311 
312 
313  return w;
314 };
315 
316 
317 
318 //
320 {
321  VpWizardPage *w=new VpWizardPage();
322  QString userName(""), userLoginName(""), userEMail(""), userInitials("");
323  QString hostName(""), domainName("");
324  bool isDUN(false);
325  SgIdentities ids;
326  if (!isFirstRun_ &&
329  isDUN = true;
330 
331  if (isFirstRun_ || isDUN)
332  {
333  // guess user login name:
334  uid_t uid=geteuid();
335  struct passwd *pw=getpwuid(uid);
336  if (!pw)
337  perror("getpwuid: ");
338  else
339  {
340  char buff[256];
341  userLoginName = pw->pw_name;
342  userName = pw->pw_gecos;
343  if (userName.contains(","))
344  userName = userName.left(userName.indexOf(","));
345 
346  // guess host name:
347  if (gethostname(buff, sizeof(buff))==-1)
348  {
349  perror("gethostname: ");
350  userEMail = userName + "@localhost";
351  }
352  else
353  {
354  hostName = buff;
355  // If hostname contains at least one dot, assume this is F.Q.D.N. host name
356  // and do not ask about the domain name:
357  //
358  if (!hostName.contains("."))
359  {
360  // guess domain name:
361  if (getdomainname(buff, sizeof(buff))==-1)
362  perror("getdomainname: ");
363  else
364  {
365  domainName = buff;
366  if (!domainName.contains("(none)") && domainName.simplified().size()>0)
367  hostName += "." + domainName;
368  };
369  };
370  userEMail = userLoginName + "@" + hostName;
371  };
372  if (userName.contains(" "))
373  {
374  userInitials = userName.mid(0, 1) + userName.mid(userName.indexOf(" ") + 1, 1);
375  }
376  else if (userName.size()>=2)
377  userInitials = userName.left(2);
378  else
379  userInitials = "??";
380  };
381  }
382  else
383  {
384  userName = setup.identities().getUserName();
385  userEMail = setup.identities().getUserEmailAddress();
386  userInitials = setup.identities().getUserDefaultInitials();
387  };
388 
389  w->setTitle("<p><font size=+1 face=\"Times\">User identities</font></p>");
390  w->setSubTitle("<font face=\"Times\"><p>Please, specify your name and e-mail address.</p></font>");
391  w->setPixmap(QWizard::WatermarkPixmap, QPixmap(":/images/pattern_3.png"));
392 
393  QString str;
394  QLabel *label;
395  QVBoxLayout *layout=new QVBoxLayout;
396  w->setLayout(layout);
397  // layout->addStretch(1);
398 
399  str =
400  "<h3>User Identities</h3>"
401  "<p>Describe yourself, your name, e-mail, etc.</p>"
402  "<p>[Plus something else, more polite...]</p>"
403  "";
404  label = new QLabel("<font face=\"Times\">" + str + "</font>");
405  label->setWordWrap(true);
406  layout->addWidget(label);
407  layout->addSpacing(20);
408 
409  QGroupBox *gBox=new QGroupBox("User Identities", w);
410  QGridLayout *gridLayout=new QGridLayout(gBox);
411 
412  label = new QLabel("User Name:", gBox);
413  label->setMinimumSize(label->sizeHint());
414  leUserName_ = new QLineEdit(gBox);
415  leUserName_->setText(userName);
416  leUserName_->setMinimumSize(leUserName_->sizeHint());
417  gridLayout->addWidget(label, 0, 0);
418  gridLayout->addWidget(leUserName_, 0, 1);
419  //
420  label = new QLabel("E-mail address:", gBox);
421  label->setMinimumSize(label->sizeHint());
422  leUserEmail_ = new QLineEdit(gBox);
423  leUserEmail_->setText(userEMail);
424  leUserEmail_->setMinimumSize(leUserEmail_->sizeHint());
425  gridLayout->addWidget(label, 1, 0);
426  gridLayout->addWidget(leUserEmail_, 1, 1);
427  //
428  label = new QLabel("User's default initials:", gBox);
429  label->setMinimumSize(label->sizeHint());
430  leUserInitials_ = new QLineEdit(gBox);
431  leUserInitials_->setText(userInitials);
432  leUserInitials_->setMinimumSize(leUserInitials_->sizeHint());
433  gridLayout->addWidget(label, 2, 0);
434  gridLayout->addWidget(leUserInitials_, 2, 1);
435 
436  layout->addWidget(gBox);
437  return w;
438 };
439 
440 
441 
442 //
444 {
445  VpWizardPage *w=new VpWizardPage();
446  QString acFullName, acAbbrevName, acAbbName;
447  SgIdentities ids;
448  bool have2ForceUser(false);
449 
450  acFullName = setup.identities().getAcFullName();
451  acAbbrevName = setup.identities().getAcAbbrevName();
452  acAbbName = setup.identities().getAcAbbName();
453 
455  {
456  acFullName = "";
457  acAbbrevName = "";
458  acAbbName = "";
459  have2ForceUser = true;
460  };
461 
462  w->setTitle("<p><font size=+1 face=\"Times\">Analysis Center identities</font></p>");
463  w->setSubTitle("<font face=\"Times\"><p>Please, describe organization where you work.</p></font>");
464  w->setPixmap(QWizard::WatermarkPixmap, QPixmap(":/images/pattern_4.png"));
465 
466  QString str;
467  QLabel *label;
468  QVBoxLayout *layout=new QVBoxLayout;
469  w->setLayout(layout);
470  // layout->addStretch(1);
471 
472  str =
473  "<h3>Analysis Center</h3>"
474  "<p>Please, specify the analysis center.</p>"
475  "<p>[Plus something else, more polite...]</p>"
476  "";
477  label = new QLabel("<font face=\"Times\">" + str + "</font>");
478  label->setWordWrap(true);
479  layout->addWidget(label);
480  layout->addSpacing(20);
481 
482  QGroupBox *gBox=new QGroupBox("Analysis Center", w);
483  QGridLayout *gridLayout=new QGridLayout(gBox);
484  // int l;
485  label = new QLabel("Full Name:", gBox);
486  label->setMinimumSize(label->sizeHint());
487  leAcFullName_ = new QLineEdit(gBox);
488  leAcFullName_->setText(acFullName);
489  leAcFullName_->setMinimumSize(leAcFullName_->sizeHint());
490  // AC names could be long:
491  // leAcFullName_->setMinimumWidth(leAcFullName_->fontMetrics().width(acFullName) + 20);
492  gridLayout->addWidget(label, 0, 0);
493  gridLayout->addWidget(leAcFullName_, 0, 1);
494  //
495  label = new QLabel("Abbreviation:", gBox);
496  label->setMinimumSize(label->sizeHint());
497  leAcAbbrevName_ = new QLineEdit(gBox);
498  leAcAbbrevName_->setText(acAbbrevName);
499  leAcAbbrevName_->setMinimumSize(leAcAbbrevName_->sizeHint());
500  gridLayout->addWidget(label, 1, 0);
501  gridLayout->addWidget(leAcAbbrevName_, 1, 1);
502  //
503  label = new QLabel("Abbrev.:", gBox);
504  label->setMinimumSize(label->sizeHint());
505  leAcAbbName_ = new QLineEdit(gBox);
506  leAcAbbName_->setText(acAbbName);
507  leAcAbbName_->setMinimumSize(leAcAbbName_->sizeHint());
508  gridLayout->addWidget(label, 2, 0);
509  gridLayout->addWidget(leAcAbbName_, 2, 1);
510 
511  if (have2ForceUser)
512  {
513  w->registerField("acFullName*", leAcFullName_);
514  w->registerField("acAbbrevName*", leAcAbbrevName_);
515 // w->registerField("acAbbName*", leAcAbbName_);
516  };
517 
518  layout->addWidget(gBox);
519  return w;
520 };
521 
522 
523 
524 //
526 {
527  VpWizardPage *w=new VpWizardPage();
528  const QString logLevelNames[4] = {"Error", "Warning", "Info", "Debug"};
529  int logLevel(settings_->value("Logger/LogLevel", 2).toInt());
530 
531  w->setTitle("<p><font size=+1 face=\"Times\">Logger </font></p>");
532  w->setSubTitle("<font face=\"Times\"><p>Set up configuration of the logging subsystem.</p></font>");
533  w->setPixmap(QWizard::WatermarkPixmap, QPixmap(":/images/pattern_5.png"));
534 
535  QString str;
536  QLabel *label;
537  QVBoxLayout *layout=new QVBoxLayout;
538  w->setLayout(layout);
539 
540  str =
541  "<h3>Logger</h3>"
542  "<p>Change parameters of the logging subsystem.</p>"
543  "";
544  label = new QLabel("<font face=\"Times\">" + str + "</font>");
545  label->setWordWrap(true);
546  layout->addWidget(label);
547  layout->addSpacing(20);
548 
549 
550  QGroupBox *gBox;
551  QGridLayout *gridLayout;
552 
553  gBox = new QGroupBox("Main log options", w);
554  gridLayout = new QGridLayout(gBox);
555 
556  eLogFileName_ = new QLineEdit(gBox);
557  eLogFileName_->setText(logger->getFileName());
558  label = new QLabel("Log file name:", gBox);
559  label->setMinimumSize(label->sizeHint());
560  eLogFileName_->setMinimumSize(eLogFileName_->sizeHint());
561 
562  gridLayout->addWidget(label, 0, 0);
563  gridLayout->addWidget(eLogFileName_, 0, 1);
564 
565  sLogCapacity_ = new QSpinBox(gBox);
566  sLogCapacity_ -> setSuffix(" lines");
567  label = new QLabel("Log capacity:", gBox);
568  label->setMinimumSize(label->sizeHint());
569  sLogCapacity_->setMinimumSize(sLogCapacity_->sizeHint());
570  sLogCapacity_->setMaximum(100000);
571  sLogCapacity_->setMinimum(100);
572  sLogCapacity_->setSingleStep(100);
573  sLogCapacity_->setValue(logger->getCapacity());
574  gridLayout->addWidget(label, 1, 0);
575  gridLayout->addWidget(sLogCapacity_, 1, 1);
576 
577  gridLayout->setColumnStretch( 2, 1);
578 
579  cbLogStoreInFile_ = new QCheckBox("Save log to the file", gBox);
580  cbLogTimeLabel_ = new QCheckBox("Put time stamps", gBox);
581  cbLogStoreInFile_->setMinimumSize(cbLogStoreInFile_->sizeHint());
582  cbLogTimeLabel_->setMinimumSize(cbLogTimeLabel_->sizeHint());
583  cbLogStoreInFile_->setChecked(logger->getIsStoreInFile());
584  cbLogTimeLabel_->setChecked(logger->getIsNeedTimeMark());
585  gridLayout->addWidget(cbLogStoreInFile_, 0, 3);
586  gridLayout->addWidget(cbLogTimeLabel_ , 1, 3);
587 
588  gridLayout->activate();
589  layout->addWidget(gBox);
590 
591 
592  gBox = new QGroupBox("Main log levels", w);
593  bgLogLevels_ = new QButtonGroup(gBox);
594  QVBoxLayout *aLayout=new QVBoxLayout(gBox);
595  QRadioButton *rbLogLevel[4];
596  for (int i=0; i<4; i++)
597  {
598  rbLogLevel[i] = new QRadioButton(logLevelNames[i], gBox);
599  rbLogLevel[i]-> setMinimumSize(rbLogLevel[i]->sizeHint());
600  bgLogLevels_->addButton(rbLogLevel[i], i);
601  aLayout->addWidget(rbLogLevel[i]);
602  };
603  rbLogLevel[logLevel]->setChecked(true);
604  layout->addWidget(gBox);
605 
606  // ----
607  //
608  gBox = new QGroupBox("Aux log options", w);
609  gridLayout = new QGridLayout(gBox);
610 
611  leAuxLogsDirName_ = new QLineEdit(gBox);
613  label = new QLabel("Path to logs for each session:", gBox);
614  label->setMinimumSize(label->sizeHint());
615  leAuxLogsDirName_->setMinimumSize(leAuxLogsDirName_->sizeHint());
616  gridLayout->addWidget(label, 0, 0);
617  gridLayout->addWidget(leAuxLogsDirName_, 0, 1);
618 
619  cbMakeAuxLog_ = new QCheckBox("Save log file for each session", gBox);
620  cbMakeAuxLog_->setMinimumSize(cbMakeAuxLog_->sizeHint());
622  gridLayout->addWidget(cbMakeAuxLog_, 1, 0, 1, 2);
623 
624  layout->addWidget(gBox);
625 
626  return w;
627 };
628 
629 
630 
631 //
633 {
634  VpWizardPage *w=new VpWizardPage();
635 
636  w->setTitle("<p><font size=+1 face=\"Times\">Default cable calibration sign</font></p>");
637  w->setSubTitle("<font face=\"Times\"><p>Set up the default cable calibraiton sign for a "
638  "station. These values are used if no <em>cablelong</em> measurements were made during "
639  "a session.</p></font>");
640  w->setPixmap(QWizard::WatermarkPixmap, QPixmap(":/images/pattern_6.png"));
641 
642  QString str;
643  QLabel *label;
644  QVBoxLayout *mainLayout=new QVBoxLayout;
645  w->setLayout(mainLayout);
646 
647  str =
648  "<h3>Default cable calibration sign set up</h3>"
649  "<p>Set up a cable calibration sign, this sign will be used if a station did not make "
650  "<em>cablelong</em> measurement during observations.</p>"
651  "";
652  label = new QLabel("<font face=\"Times\">" + str + "</font>");
653  label->setWordWrap(true);
654  mainLayout->addWidget(label);
655  mainLayout->addSpacing(20);
656 
657  QGroupBox *gBox=new QGroupBox("List of stations",
658  this);
659  QBoxLayout *layout=new QVBoxLayout(gBox);
660 
661  QStringList headerLabels;
662  headerLabels << "Station" << "Default sign";
663  twDefaultCableSigns_ = new QTreeWidget(gBox);
664  twDefaultCableSigns_->setColumnCount(2);
665  twDefaultCableSigns_->setHeaderLabels(headerLabels);
666  //
667  for (QMap<QString, int>::const_iterator it=setup.getDefaultCableSignByStn().begin();
668  it!=setup.getDefaultCableSignByStn().end(); ++it)
669  {
670  QString stnName=it.key();
672  item->setText( 0, stnName);
673  item->setData( 0, Qt::TextAlignmentRole, Qt::AlignLeft);
674  item->setText( 1, it.value()==1?"+":(it.value()==-1?"-":"?"));
675  item->setData( 1, Qt::TextAlignmentRole, Qt::AlignCenter);
676  };
677  twDefaultCableSigns_->header()->resizeSections(QHeaderView::ResizeToContents);
678 
679 #if QT_VERSION >= 0x050000
680  twDefaultCableSigns_->header()->setSectionResizeMode(QHeaderView::Interactive);
681 #else
682  twDefaultCableSigns_->header()->setResizeMode(QHeaderView::Interactive);
683 #endif
684 
685  //twDefaultCableSigns_->header()->setStretchLastSection(false);
686  twDefaultCableSigns_->setSortingEnabled(true);
687  twDefaultCableSigns_->setUniformRowHeights(true);
688  twDefaultCableSigns_->sortByColumn(0, Qt::AscendingOrder);
689  twDefaultCableSigns_->setFocus();
690  twDefaultCableSigns_->setItemsExpandable(false);
691  twDefaultCableSigns_->setAllColumnsShowFocus(true);
692  twDefaultCableSigns_->setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
693  twDefaultCableSigns_->setMinimumSize(twDefaultCableSigns_->sizeHint());
694  layout->addWidget(twDefaultCableSigns_);
695 
696  QPushButton *bAdd =new QPushButton("Add", this);
697  QPushButton *bEdit =new QPushButton("Edit", this);
698  QPushButton *bDelete=new QPushButton("Delete", this);
699  QSize btnSize;
700  bDelete->setMinimumSize((btnSize=bDelete->sizeHint()));
701  bAdd->setMinimumSize(btnSize);
702  bEdit->setMinimumSize(btnSize);
703 
704  QBoxLayout *subLayout=new QHBoxLayout();
705  layout->addLayout(subLayout);
706  subLayout->addStretch(1);
707  subLayout->addSpacing(3*btnSize.width());
708  subLayout->addWidget(bAdd);
709  subLayout->addWidget(bEdit);
710  subLayout->addWidget(bDelete);
711 
712  mainLayout->addWidget(gBox);
713 
714  connect(bAdd, SIGNAL(clicked()), SLOT(insertDefaultCableSign()));
715  connect(bEdit, SIGNAL(clicked()), SLOT(editDefaultCableSign()));
716  connect(bDelete, SIGNAL(clicked()), SLOT(deleteDefaultCableSign()));
717  return w;
718 }
719 
720 
721 
722 //
724 {
725  VpWizardPage *w=new VpWizardPage();
726 
727  w->setTitle("<p><font size=+1 face=\"Times\">RINEX files</font></p>");
728  w->setSubTitle("<font face=\"Times\"><p>Set up input of meteorological parameters from "
729  "a nearby GPS station. These data are available in RINEX format from IGS sites.</p></font>");
730  w->setPixmap(QWizard::WatermarkPixmap, QPixmap(":/images/pattern_1.png"));
731 
732  QString str;
733  QLabel *label;
734  QVBoxLayout *mainLayout=new QVBoxLayout;
735  w->setLayout(mainLayout);
736 
737  str =
738  "<h3>Meteorological data in RINEX format</h3>"
739  "<p>Some VLBI stations do not provide meteo data in their FS log files, however there is a nearby "
740  "GPS station with meteo sensors. The software is capable to read such data in RINEX format. Set up "
741  "GPS station name and (if necessary) pressure offset.</p>"
742  "";
743  label = new QLabel("<font face=\"Times\">" + str + "</font>");
744  label->setWordWrap(true);
745  mainLayout->addWidget(label);
746  mainLayout->addSpacing(20);
747 
748  QGroupBox *gBox=new QGroupBox("List of stations", this);
749  QBoxLayout *layout=new QVBoxLayout(gBox);
750 
751  QStringList headerLabels;
752  headerLabels << "Station" << "GPS station" << "Pressure offset (mbar)";
753  twRinexData_ = new QTreeWidget(gBox);
754  twRinexData_->setColumnCount(headerLabels.size());
755  twRinexData_->setHeaderLabels(headerLabels);
756  //
757  for (QMap<QString, QString>::const_iterator it=setup.getRinexFileNameByStn().begin();
758  it!=setup.getRinexFileNameByStn().end(); ++it)
759  {
760  QString stnName=it.key();
761  QString gpsName=it.value();
762  double dP=0.0;
763 
764  if (setup.getRinexPressureOffsetByStn().contains(stnName))
765  dP = setup.getRinexPressureOffsetByStn().value(stnName);
766 
768  item->setText( 0, stnName);
769  item->setData( 0, Qt::TextAlignmentRole, Qt::AlignLeft);
770 
771  item->setText( 1, gpsName);
772  item->setData( 1, Qt::TextAlignmentRole, Qt::AlignRight);
773 
774  item->setText( 2, QString("").sprintf("%.2f", dP));
775  item->setData( 2, Qt::TextAlignmentRole, Qt::AlignRight);
776  };
777  twRinexData_->header()->resizeSections(QHeaderView::ResizeToContents);
778 #if QT_VERSION >= 0x050000
779  twRinexData_->header()->setSectionResizeMode(QHeaderView::Interactive);
780 #else
781  twRinexData_->header()->setResizeMode(QHeaderView::Interactive);
782 #endif
783  twRinexData_->header()->setStretchLastSection(false);
784  twRinexData_->setSortingEnabled(true);
785  twRinexData_->setUniformRowHeights(true);
786  twRinexData_->sortByColumn(0, Qt::AscendingOrder);
787  twRinexData_->setFocus();
788  twRinexData_->setItemsExpandable(false);
789  twRinexData_->setAllColumnsShowFocus(true);
790  twRinexData_->setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
791  twRinexData_->setMinimumSize(twRinexData_->sizeHint());
792  layout->addWidget(twRinexData_);
793 
794  QPushButton *bAdd =new QPushButton("Add", this);
795  QPushButton *bEdit =new QPushButton("Edit", this);
796  QPushButton *bDelete=new QPushButton("Delete", this);
797  QSize btnSize;
798  bDelete->setMinimumSize((btnSize=bDelete->sizeHint()));
799  bAdd->setMinimumSize(btnSize);
800  bEdit->setMinimumSize(btnSize);
801 
802  QBoxLayout *subLayout=new QHBoxLayout();
803  layout->addLayout(subLayout);
804  subLayout->addStretch(1);
805  subLayout->addSpacing(3*btnSize.width());
806  subLayout->addWidget(bAdd);
807  subLayout->addWidget(bEdit);
808  subLayout->addWidget(bDelete);
809 
810  mainLayout->addWidget(gBox);
811 
812  connect(bAdd, SIGNAL(clicked()), SLOT(insertRinexData()));
813  connect(bEdit, SIGNAL(clicked()), SLOT(editRinexData()));
814  connect(bDelete, SIGNAL(clicked()), SLOT(deleteRinexData()));
815  return w;
816 }
817 
818 
819 
820 //
822 {
823  VpWizardPage *w=new VpWizardPage();
824  QString str;
825 
826  w->setTitle("<p><font size=+1 face=\"Times\">Ready to run</font></p>");
827  w->setSubTitle("<font face=\"Times\"><p>We are done.</p></font>");
828  w->setPixmap(QWizard::WatermarkPixmap, QPixmap(":/images/pattern_2.png"));
829 
830  QVBoxLayout *layout = new QVBoxLayout;
831  w->setLayout(layout);
832 
833  // first label:
834  str =
835  "<h3>vgosDbProcLogs is ready to run</h3>"
836  "<p>Good luck.</p>"
837  "";
838  QLabel *label = new QLabel("<font face=\"Times\">" + str + "</font>");
839  label->setWordWrap(true);
840  layout->addWidget(label);
841 
842  return w;
843 };
844 
845 
846 
847 //
849 {
850  if (!isSystemWideRun_)
851  {
856  };
861  setup.setPath2SessionFiles(leSessionDirName_->text());
863 
866  setup.setUseLocalLocale(cbUseLocalLocale_->isChecked());
867 
868  //
869  logger->setFileName(eLogFileName_->text());
870  logger->setCapacity(sLogCapacity_->value());
873 
874  int logLevel=bgLogLevels_->checkedId();
875  if (logLevel != -1)
876  {
877  settings_->setValue("Logger/LogLevel", logLevel);
878  logger->setLogFacility(SgLogger::ERR, logLevel>=0?0xFFFFFFFF:0);
879  logger->setLogFacility(SgLogger::WRN, logLevel>=1?0xFFFFFFFF:0);
880  logger->setLogFacility(SgLogger::INF, logLevel>=2?0xFFFFFFFF:0);
881  logger->setLogFacility(SgLogger::DBG, logLevel==3?0xFFFFFFFF:0);
882  };
883  //
884  // check home dir:
885  if (!isSystemWideRun_)
886  {
887  QDir dir;
888  if (!dir.exists(setup.getPath2Home()))
889  {
890  if (!dir.mkpath(setup.getPath2Home()))
891  QMessageBox::warning(this, "Warning", "Cannot create Home directory " +
892  setup.getPath2Home());
893  else
895  ": the directory " + setup.getPath2Home() + " has been created");
896  };
897  };
898  //
899  QWizard::accept();
900 };
901 
902 
903 
904 //
906 {
907  if (twDefaultCableSigns_->selectedItems().size())
908  {
909  QTreeWidgetItem *twItem=twDefaultCableSigns_->selectedItems().at(0);
910  QString stnName=twItem->text(0);
911  int sgn=setup.defaultCableSignByStn().value(stnName);
912  VpDefaultCableCalSignEditor*dcEditor=new VpDefaultCableCalSignEditor(&setup.defaultCableSignByStn(),
913  stnName, sgn, twDefaultCableSigns_, twDefaultCableSigns_->selectedItems().at(0), this);
914  dcEditor->show();
915  };
916 };
917 
918 
919 
920 //
922 {
923  if (twDefaultCableSigns_->selectedItems().size())
924  {
925  QTreeWidgetItem *twItem=twDefaultCableSigns_->selectedItems().at(0);
926  QString stnName=twItem->text(0);
927 
928  if (QMessageBox::warning(this, "Delete?",
929  "Are you sure to delete the station \"" + stnName +
930  "\" from the list of default cable cal signs?\n",
931  QMessageBox::No | QMessageBox::Yes, QMessageBox::No)==QMessageBox::Yes)
932  {
933  delete twItem;
934  setup.defaultCableSignByStn().remove(stnName);
935  };
936  };
937 };
938 
939 
940 
941 //
943 {
944  VpDefaultCableCalSignEditor *dcEditor=new VpDefaultCableCalSignEditor(&setup.defaultCableSignByStn(),
945  QString(""), 1, twDefaultCableSigns_, NULL, this);
946  dcEditor->show();
947 };
948 
949 
950 
951 //
953 {
954  if (twRinexData_->selectedItems().size())
955  {
956  QTreeWidgetItem *twItem=twRinexData_->selectedItems().at(0);
957  QString stnName=twItem->text(0);
958  QString gpsStn=setup.rinexFileNameByStn().value(stnName);
959  double dP=0.0;
960  if (setup.rinexPressureOffsetByStn().contains(stnName))
961  dP = setup.rinexPressureOffsetByStn().value(stnName);
962  VpRinexDataEditor*rdEditor=new VpRinexDataEditor(&setup.rinexFileNameByStn(),
963  &setup.rinexPressureOffsetByStn(), stnName, gpsStn, dP,
964  twRinexData_, twRinexData_->selectedItems().at(0), this);
965 
966  rdEditor->show();
967  };
968 };
969 
970 
971 
972 //
974 {
975  if (twRinexData_->selectedItems().size())
976  {
977  QTreeWidgetItem *twItem=twRinexData_->selectedItems().at(0);
978  QString stnName=twItem->text(0);
979 
980  if (QMessageBox::warning(this, "Delete?",
981  "Are you sure to remove RINEX file setup for the station \"" + stnName + "\"?\n",
982  QMessageBox::No | QMessageBox::Yes, QMessageBox::No)==QMessageBox::Yes)
983  {
984  delete twItem;
985  setup.rinexFileNameByStn().remove(stnName);
986  if (setup.rinexPressureOffsetByStn().contains(stnName))
987  setup.rinexPressureOffsetByStn().remove(stnName);
988  };
989  };
990 };
991 
992 
993 
994 //
996 {
997  VpRinexDataEditor*rdEditor=new VpRinexDataEditor(&setup.rinexFileNameByStn(),
998  &setup.rinexPressureOffsetByStn(), QString(""), QString(""), 0.0,
999  twRinexData_, NULL, this);
1000 
1001  rdEditor->show();
1002 };
1003 /*=====================================================================================================*/
1004 
1005 
1006 
1007 
1008 /*=======================================================================================================
1009 *
1010 * VpDefaultCableCalSignEditor METHODS:
1011 *
1012 *======================================================================================================*/
1014  const QString& stnName, int cblSign,
1015  QTreeWidget *twDefaultCableSigns, QTreeWidgetItem *wtItem, QWidget *parent, Qt::WindowFlags flags)
1016  : QDialog(parent, flags)
1017 {
1018  isModified_ = false;
1019  signByStation_ = signByStation;
1020  stnName_ = stnName;
1021  cblSign_ = cblSign;
1022  twDefaultCableSigns_ = twDefaultCableSigns;
1023  wtItem_ = wtItem;
1024 
1025  setWindowTitle("Deafault Cable Calibration Sign Editor");
1026 
1027  QLabel *label;
1028  QGroupBox *gbox;
1029  QBoxLayout *layout, *subLayout;
1030  QGridLayout *grid;
1031 
1032  QString str;
1033 
1034  gbox = new QGroupBox("Default Cable Cal Sign", this);
1035  grid = new QGridLayout(gbox);
1036 
1037  label= new QLabel("Station key:", gbox);
1038  label->setMinimumSize(label->sizeHint());
1039  grid ->addWidget(label, 0, 0, Qt::AlignLeft | Qt::AlignVCenter);
1040 
1041  label= new QLabel("Sign:", gbox);
1042  label->setMinimumSize(label->sizeHint());
1043  grid ->addWidget(label, 1, 0, Qt::AlignLeft | Qt::AlignVCenter);
1044 
1045  //
1046  leStationName_ = new QLineEdit(stnName_, gbox);
1047  leStationName_->setFixedWidth(leStationName_->fontMetrics().width("QQQQQQQQQQ") + 10);
1048  grid ->addWidget(leStationName_, 0, 1);
1049 
1050  leSign_ = new QLineEdit(str.sprintf("%+1d", cblSign_), gbox);
1051  leSign_->setFixedWidth(leSign_->fontMetrics().width("QQQQQQQQQQ") + 10);
1052  grid ->addWidget(leSign_, 1, 1);
1053 
1054 
1055  //---
1056  layout = new QVBoxLayout(this);
1057  layout -> addWidget(gbox);
1058 
1059 
1060  subLayout = new QHBoxLayout();
1061  layout->addLayout(subLayout);
1062  subLayout->addStretch(1);
1063 
1064  QPushButton *bOk=new QPushButton("OK", this);
1065  QPushButton *bCancel=new QPushButton("Cancel", this);
1066  bOk->setDefault(true);
1067  QSize btnSize;
1068 
1069  bCancel->setMinimumSize((btnSize=bCancel->sizeHint()));
1070  bOk->setMinimumSize(btnSize);
1071  subLayout->addWidget(bOk);
1072  subLayout->addWidget(bCancel);
1073  connect(bOk, SIGNAL(clicked()), SLOT(accept()));
1074  connect(bCancel, SIGNAL(clicked()), SLOT(reject()));
1075 };
1076 
1077 
1078 
1079 //
1081 {
1082  acquireData();
1083  QDialog::accept();
1084  if (isModified_)
1085  {
1086  if (!wtItem_)
1087  {
1088  if (!signByStation_->contains(stnName_))
1089  {
1090  signByStation_->insert(stnName_, cblSign_);
1091 
1093  wtItem_->setText( 0, stnName_);
1094  wtItem_->setData( 0, Qt::TextAlignmentRole, Qt::AlignLeft);
1095  wtItem_->setText( 1, cblSign_==1?"+":(cblSign_==-1?"-":"?"));
1096  wtItem_->setData( 1, Qt::TextAlignmentRole, Qt::AlignCenter);
1097  }
1098  else
1100  "::accept(): cannot insert \"" + stnName_ + "\" in the map, the record already exists");
1101  }
1102  else
1103  {
1104  if (signByStation_->contains(stnName_))
1105  {
1106  (*signByStation_)[stnName_] = cblSign_;
1107  wtItem_->setText( 1, cblSign_==1?"+":(cblSign_==-1?"-":"?"));
1108  }
1109  else
1111  "::accept(): cannot find \"" + stnName_ + "\" in the map");
1112  };
1113  };
1114  deleteLater();
1115 };
1116 
1117 
1118 
1119 //
1121 {
1122  QString stn(""), str("");
1123  int sgn;
1124 
1125  stn = leStationName_->text().leftJustified(8, ' ');
1126  str = leSign_->text();
1127  sgn = cblSign_;
1128  if (str.size()>0)
1129  {
1130  if (str.at(0) == '+')
1131  sgn = 1;
1132  else if (str.at(0) == '-')
1133  sgn =-1;
1134  else
1135  sgn = str.toInt()>0?1:-1;
1136  };
1137 
1138  if (stn != stnName_)
1139  {
1140  stnName_ = stn;
1141  isModified_ = true;
1142  };
1143  if (sgn != cblSign_)
1144  {
1145  cblSign_ = sgn;
1146  isModified_ = true;
1147  };
1148 };
1149 /*=====================================================================================================*/
1150 
1151 
1152 
1153 
1154 
1155 
1156 /*=======================================================================================================
1157 *
1158 * VpRinexDataEditor METHODS:
1159 *
1160 *======================================================================================================*/
1161 VpRinexDataEditor::VpRinexDataEditor(QMap<QString, QString>* fnameByStn,
1162  QMap<QString, double>* pressOffsetByStn, const QString& stnName, const QString rinexFname,
1163  double pressureOffset, QTreeWidget *twRinexData, QTreeWidgetItem *wtItem,
1164  QWidget* parent, Qt::WindowFlags flags)
1165  : QDialog(parent, flags)
1166 {
1167  isModified_ = false;
1168  rinexFileNameByStn_ = fnameByStn;
1169  rinexPressureOffsetByStn_ = pressOffsetByStn;
1170  stnName_ = stnName;
1171  rinexFileName_ = rinexFname;
1172  pressureOffset_ = pressureOffset;
1173  //
1174  twRinexData_ = twRinexData;
1175  wtItem_ = wtItem;
1176  //
1177 
1178  setWindowTitle("RINEX Files Editor");
1179 
1180  QLabel *label;
1181  QGroupBox *gbox;
1182  QBoxLayout *layout, *subLayout;
1183  QGridLayout *grid;
1184 
1185  QString str;
1186 
1187  gbox = new QGroupBox("Import a RINEX file:", this);
1188  grid = new QGridLayout(gbox);
1189 
1190  label= new QLabel("Station key:", gbox);
1191  label->setMinimumSize(label->sizeHint());
1192  grid->addWidget(label, 0, 0, Qt::AlignLeft | Qt::AlignVCenter);
1193 
1194  label= new QLabel("GPS station:", gbox);
1195  label->setMinimumSize(label->sizeHint());
1196  grid->addWidget(label, 1, 0, Qt::AlignLeft | Qt::AlignVCenter);
1197 
1198  label= new QLabel("Pressure offset:", gbox);
1199  label->setMinimumSize(label->sizeHint());
1200  grid->addWidget(label, 2, 0, Qt::AlignLeft | Qt::AlignVCenter);
1201 
1202 
1203  //
1204  leStationKey_ = new QLineEdit(stnName_, gbox);
1205  leStationKey_->setFixedWidth(leStationKey_->fontMetrics().width("QQQQQQQQQQ") + 10);
1206  grid->addWidget(leStationKey_, 0, 1);
1207 
1208  leRinexFileName_ = new QLineEdit(rinexFileName_, gbox);
1209  leRinexFileName_->setFixedWidth(leRinexFileName_->fontMetrics().width("QQQQQQQQQQ") + 10);
1210  grid->addWidget(leRinexFileName_, 1, 1);
1211 
1212  leRinexPressureOffset_ = new QLineEdit(str.sprintf("%.2f", pressureOffset_), gbox);
1213  leRinexPressureOffset_->setFixedWidth(leRinexPressureOffset_->fontMetrics().width("QQQQQQ") + 10);
1214  grid->addWidget(leRinexPressureOffset_, 2, 1);
1215 
1216 
1217  //---
1218  layout = new QVBoxLayout(this);
1219  layout -> addWidget(gbox);
1220 
1221 
1222  subLayout = new QHBoxLayout();
1223  layout->addLayout(subLayout);
1224  subLayout->addStretch(1);
1225 
1226  QPushButton *bOk=new QPushButton("OK", this);
1227  QPushButton *bCancel=new QPushButton("Cancel", this);
1228  bOk->setDefault(true);
1229  QSize btnSize;
1230 
1231  bCancel->setMinimumSize((btnSize=bCancel->sizeHint()));
1232  bOk->setMinimumSize(btnSize);
1233  subLayout->addWidget(bOk);
1234  subLayout->addWidget(bCancel);
1235  connect(bOk, SIGNAL(clicked()), SLOT(accept()));
1236  connect(bCancel, SIGNAL(clicked()), SLOT(reject()));
1237 };
1238 
1239 
1240 
1241 //
1243 {
1244  acquireData();
1245  QDialog::accept();
1246  if (isModified_)
1247  {
1248  if (!wtItem_)
1249  {
1250  if (!rinexFileNameByStn_->contains(stnName_))
1251  {
1253  if (pressureOffset_ != 0.0)
1255 
1257  wtItem_->setText( 0, stnName_);
1258  wtItem_->setData( 0, Qt::TextAlignmentRole, Qt::AlignLeft);
1259  wtItem_->setText( 1, rinexFileName_);
1260  wtItem_->setData( 1, Qt::TextAlignmentRole, Qt::AlignRight);
1261  wtItem_->setText( 2, QString("").sprintf("%.2f", pressureOffset_));
1262  wtItem_->setData( 2, Qt::TextAlignmentRole, Qt::AlignRight);
1263  }
1264  else
1266  "::accept(): cannot insert \"" + stnName_ + "\" in the map, the record already exists");
1267  }
1268  else
1269  {
1270  if (rinexFileNameByStn_->contains(stnName_))
1271  {
1272  (*rinexFileNameByStn_)[stnName_] = rinexFileName_;
1273  wtItem_->setText( 1, rinexFileName_);
1274  if (pressureOffset_ != 0.0)
1275  (*rinexPressureOffsetByStn_)[stnName_] = pressureOffset_;
1276  else
1278  }
1279  else
1281  "::accept(): cannot find \"" + stnName_ + "\" in the map");
1282  };
1283  };
1284  deleteLater();
1285 };
1286 
1287 
1288 
1289 //
1291 {
1292  QString stn(""), gps("");
1293  double dP=0.0;
1294 
1295  stn = leStationKey_->text().leftJustified(8, ' ');
1296  gps = leRinexFileName_->text(); // as is
1297  dP = leRinexPressureOffset_->text().toDouble();
1298 
1299  if (stn != stnName_)
1300  {
1301  stnName_ = stn;
1302  isModified_ = true;
1303  };
1304  if (gps != rinexFileName_)
1305  {
1306  rinexFileName_ = gps;
1307  isModified_ = true;
1308  };
1309  if (dP != pressureOffset_)
1310  {
1311  pressureOffset_ = dP;
1312  isModified_ = true;
1313  };
1314 };
1315 /*=====================================================================================================*/
1316 
1317 
1318 
1319 /*=====================================================================================================*/
SgLogger * logger
Definition: SgLogger.cpp:231
SgVersion libraryVersion("SgLib", 0, 7, 5, "Tuscarora (rc1)", SgMJD(2022, 2, 18, 17, 34))
const QString & getPath2AuxLogs() const
Definition: NsSetup.h:510
const QString & getPath2MasterFiles() const
Definition: NsSetup.h:446
bool getHave2SavePerSessionLog() const
Definition: NsSetup.h:518
void setHave2SavePerSessionLog(bool)
Definition: NsSetup.h:816
const QString & getPath2Home() const
Definition: NsSetup.h:406
void setPath2Home(const QString &)
Definition: NsSetup.h:704
SgIdentities & identities()
Definition: NsSetup.h:566
void setPath2VgosDbFiles(const QString &)
Definition: NsSetup.h:728
const QString & getPath2VgosDbFiles() const
Definition: NsSetup.h:430
void setPath2MasterFiles(const QString &)
Definition: NsSetup.h:744
void setPath2AuxLogs(const QString &)
Definition: NsSetup.h:808
const QString & getAcAbbrevName() const
Definition: SgIdentities.h:247
const QString & getAcAbbName() const
Definition: SgIdentities.h:255
void setAcAbbrevName(const QString &)
Definition: SgIdentities.h:367
void setAcFullName(const QString &)
Definition: SgIdentities.h:359
const QString & getUserEmailAddress() const
Definition: SgIdentities.h:223
void setAcAbbName(const QString &)
Definition: SgIdentities.h:375
const QString & getUserDefaultInitials() const
Definition: SgIdentities.h:231
const QString & getAcFullName() const
Definition: SgIdentities.h:239
void setUserDefaultInitials(const QString &)
Definition: SgIdentities.h:351
void setUserEmailAddress(const QString &)
Definition: SgIdentities.h:343
void setUserName(const QString &)
Definition: SgIdentities.h:335
const QString & getUserName() const
Definition: SgIdentities.h:215
virtual void write(LogLevel, quint32, const QString &, bool=false)
Definition: SgLogger.cpp:88
bool getIsStoreInFile() const
Definition: SgLogger.h:137
void setIsStoreInFile(bool isStoreInFile)
Definition: SgLogger.h:127
void setLogFacility(LogLevel lvl, quint32 f)
Definition: SgLogger.h:131
void setFileName(const QString &fileName)
Definition: SgLogger.h:125
void setIsNeedTimeMark(bool isNeedTimeMark)
Definition: SgLogger.h:129
void setCapacity(int capacity)
Definition: SgLogger.h:126
bool getIsNeedTimeMark() const
Definition: SgLogger.h:139
const QString & getFileName() const
Definition: SgLogger.h:135
int getCapacity() const
Definition: SgLogger.h:136
const QString & getSoftwareName() const
Definition: SgVersion.h:254
const QString & getCodeName() const
Definition: SgVersion.h:286
QString toString() const
Definition: SgVersion.h:356
QMap< QString, int > * signByStation_
VpDefaultCableCalSignEditor(QMap< QString, int > *signByStation, const QString &stnName, int cblSign, QTreeWidget *twDefaultCableSigns, QTreeWidgetItem *wtItem, QWidget *=0, Qt::WindowFlags=0)
QString className() const
QLineEdit * leStationKey_
QLineEdit * leRinexPressureOffset_
QTreeWidget * twRinexData_
VpRinexDataEditor(QMap< QString, QString > *fnameByStn, QMap< QString, double > *pressOffsetByStn, const QString &stnName, const QString rinexFname, double pressureOffset, QTreeWidget *twRinexData, QTreeWidgetItem *wtItem, QWidget *=0, Qt::WindowFlags=0)
QMap< QString, double > * rinexPressureOffsetByStn_
QMap< QString, QString > * rinexFileNameByStn_
QLineEdit * leRinexFileName_
QTreeWidgetItem * wtItem_
VpWizardPage * createPageHomeDir()
QLineEdit * leUserEmail_
QTreeWidget * twDefaultCableSigns_
QLineEdit * leSessionDirName_
VpWizardPage * createIntroPage()
QLineEdit * leAuxLogsDirName_
QCheckBox * cbMakeAuxLog_
QSpinBox * sLogCapacity_
QTreeWidget * twRinexData_
QCheckBox * cbLogTimeLabel_
QCheckBox * cbLogStoreInFile_
QLineEdit * leAcFullName_
QLineEdit * leAcAbbName_
QLineEdit * leHomeDirName_
QLineEdit * leAcAbbrevName_
QLineEdit * leUserInitials_
VpWizardPage * createPageRinexData()
QLineEdit * eLogFileName_
QLineEdit * leUserName_
VpWizardPage * createPageOne()
VpWizardPage * createPageThree()
VpWizardPage * createConclusionPage()
VpWizardPage * createPageTwo()
QString className() const
VpWizardPage * createPageDefaultCableSigns()
QCheckBox * cbUseLocalLocale_
static int serialNumber()
VpStartupWizard(bool isFirstRun, bool isForcedRun, bool isSystemWideRun, QSettings *settings, QWidget *parent=0)
QLineEdit * leMasterFilesDirName_
static const int serialNumber_
QButtonGroup * bgLogLevels_
QSettings * settings_
QLineEdit * leVgosDbDirName_
virtual ~VpStartupWizard()
void registerField(const QString &name, QWidget *widget, const char *property=0, const char *changedSignal=0)
NsSetup setup
Definition: nuSolve.cpp:61
SgVersion vgosDbProcLogsVersion