General Purpose Geodetic Library
VpStartupWizard.h
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 #ifndef VP_STARTUP_WIZARD_H
24 #define VP_STARTUP_WIZARD_H
25 
26 
27 #ifdef HAVE_CONFIG_H
28 # include <config.h>
29 #endif
30 
31 
32 #include <QtCore/QtGlobal>
33 
34 #if QT_VERSION >= 0x050000
35 # include <QtWidgets/QLabel>
36 # include <QtWidgets/QVBoxLayout>
37 # include <QtWidgets/QWizard>
38 # include <QtWidgets/QWizardPage>
39 #else
40 # include <QtGui/QLabel>
41 # include <QtGui/QVBoxLayout>
42 # include <QtGui/QWizard>
43 # include <QtGui/QWizardPage>
44 #endif
45 
46 
47 
48 
49 
50 
51 class QButtonGroup;
52 class QCheckBox;
53 class QLineEdit;
54 class QRadioButton;
55 class QSpinBox;
56 class QSettings;
57 class QTreeWidget;
58 class QTreeWidgetItem;
59 
60 
61 
62 
63 /*=====================================================================================================*/
64 class VpWizardPage : public QWizardPage
65 {
66 public:
67  inline VpWizardPage(QWidget* parent=0) : QWizardPage(parent) {};
68  inline void registerField(const QString& name, QWidget* widget, const char* property=0,
69  const char* changedSignal=0)
70  {QWizardPage::registerField(name, widget, property, changedSignal);};
71 };
72 /*=====================================================================================================*/
73 
74 
75 
76 
77 /*=====================================================================================================*/
78 class VpStartupWizard : public QWizard
79 {
80  Q_OBJECT
81 public:
82 
83  //
84  // constructors/destructors:
85  //
88  VpStartupWizard(bool isFirstRun, bool isForcedRun, bool isSystemWideRun,
89  QSettings *settings, QWidget *parent=0);
90 
94  virtual ~VpStartupWizard();
95 
96 
97 
98  //
99  // Interfaces:
100  //
101  static int serialNumber();
102 
103  //
104  // Functions:
105  //
106  inline QString className() const {return "VpStartupWizard";};
107 
109 
111 
113 
115 
117 
119 
121 
123  //
124  // Friends:
125  //
126 
127 
128 
129  //
130  // I/O:
131  //
132  //
133 
134 private slots:
135  void accept();
136  void editDefaultCableSign();
137  void deleteDefaultCableSign();
138  void insertDefaultCableSign();
139  void editRinexData();
140  void deleteRinexData();
141  void insertRinexData();
142 
143 
144 private:
145  // other variables:
149 
150  // user identities:
151  QLineEdit *leUserName_;
152  QLineEdit *leUserEmail_;
153  QLineEdit *leUserInitials_;
154  QLineEdit *leAcFullName_;
155  QLineEdit *leAcAbbrevName_;
156  QLineEdit *leAcAbbName_;
157  QLineEdit *leHomeDirName_;
158  QLineEdit *leVgosDbDirName_;
159  QLineEdit *leSessionDirName_;
161  QCheckBox *cbUseLocalLocale_;
162  QLineEdit *leAuxLogsDirName_;
163  QCheckBox *cbMakeAuxLog_;
164  // for logger:
165  QCheckBox *cbLogStoreInFile_;
166  QCheckBox *cbLogTimeLabel_;
167  QLineEdit *eLogFileName_;
168  QSpinBox *sLogCapacity_;
169  QButtonGroup *bgLogLevels_;
170  //
171  // default cable cal signs:
173  // RINEX file name and pressure offset:
175 
176  static const int serialNumber_;
177  QSettings *settings_;
178 
179 protected:
180 };
181 /*=====================================================================================================*/
182 
183 
184 
185 
186 
187 
188 /*=====================================================================================================*/
190 {
191  Q_OBJECT
192 public:
193  VpDefaultCableCalSignEditor(QMap<QString, int>* signByStation, const QString& stnName, int cblSign,
194  QTreeWidget *twDefaultCableSigns, QTreeWidgetItem *wtItem, QWidget* =0, Qt::WindowFlags=0);
196  inline QString className() const {return "VpDefaultCableCalSignEditor";};
197 
198  inline void setIsModified(bool is) {isModified_ = is;};
199 
200  private
201  slots:
202  void accept();
203  void reject() {QDialog::reject(); deleteLater();};
204 
205 protected:
206  QMap<QString, int> *signByStation_;
207  QString stnName_;
208  int cblSign_;
209  //
213  // widgets:
214  QLineEdit *leStationName_;
215  QLineEdit *leSign_;
216  // functions:
217  void acquireData();
218 };
219 /*=====================================================================================================*/
220 
221 
222 
223 
224 
225 
226 
227 /*=====================================================================================================*/
229 {
230  Q_OBJECT
231 public:
232  VpRinexDataEditor(QMap<QString, QString>* fnameByStn, QMap<QString, double>* pressOffsetByStn,
233  const QString& stnName, const QString rinexFname,
234  double pressureOffset, QTreeWidget *twRinexData, QTreeWidgetItem *wtItem,
235  QWidget* =0, Qt::WindowFlags=0);
237  twRinexData_=NULL; wtItem_=NULL;};
238  inline QString className() const {return "VpRinexDataEditor";};
239 
240  inline void setIsModified(bool is) {isModified_ = is;};
241 
242  private
243  slots:
244  void accept();
245  void reject() {QDialog::reject(); deleteLater();};
246 
247 protected:
248  QMap<QString, QString> *rinexFileNameByStn_;
249  QMap<QString, double> *rinexPressureOffsetByStn_;
250  QString stnName_;
251  QString rinexFileName_;
253 //
257  // widgets:
258  QLineEdit *leStationKey_;
259  QLineEdit *leRinexFileName_;
261  // functions:
262  void acquireData();
263 };
264 /*=====================================================================================================*/
265 
266 
267 
268 
269 
270 
271 
272 
273 /*=====================================================================================================*/
274 #endif // VP_STARTUP_WIZARD_H
QMap< QString, int > * signByStation_
VpDefaultCableCalSignEditor(QMap< QString, int > *signByStation, const QString &stnName, int cblSign, QTreeWidget *twDefaultCableSigns, QTreeWidgetItem *wtItem, QWidget *=0, Qt::WindowFlags=0)
void setIsModified(bool is)
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()
VpWizardPage(QWidget *parent=0)
void registerField(const QString &name, QWidget *widget, const char *property=0, const char *changedSignal=0)