General Purpose Geodetic Library
SgGuiVlbiStationList.h
Go to the documentation of this file.
1 /*
2  *
3  * This file is a part of Space Geodetic Library. The library is used by
4  * nuSolve, a part of CALC/SOLVE system, and designed to make analysis of
5  * geodetic VLBI observations.
6  * Copyright (C) 2010-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 
24 #ifndef SG_GUI_VLBI_STATION_LIST_H
25 #define SG_GUI_VLBI_STATION_LIST_H
26 
27 
28 #ifdef HAVE_CONFIG_H
29 # include <config.h>
30 #endif
31 
32 
33 
34 #include <SgVlbiStationInfo.h>
35 #include <SgGuiQTreeWidgetExt.h>
36 
37 
38 
39 #if QT_VERSION >= 0x050000
40 # include <QtWidgets/QCheckBox>
41 # include <QtWidgets/QDialog>
42 # include <QtWidgets/QHeaderView>
43 # include <QtWidgets/QPlainTextEdit>
44 # include <QtWidgets/QSpinBox>
45 # include <QtWidgets/QTreeWidgetItem>
46 #else
47 # include <QtGui/QCheckBox>
48 # include <QtGui/QDialog>
49 # include <QtGui/QHeaderView>
50 # include <QtGui/QPlainTextEdit>
51 # include <QtGui/QSpinBox>
52 # include <QtGui/QTreeWidgetItem>
53 #endif
54 
55 #include <QtGui/QFontMetrics>
56 
57 
58 
59 
60 
61 
62 
63 
64 
65 
66 
67 /*=====================================================================================================*/
69 {
70 public:
71  SgGuiVlbiStationItem(QTreeWidget *parent, int type = Type) : QTreeWidgetItem(parent, type)
72  {stInfo_=NULL;};
73  virtual ~SgGuiVlbiStationItem() {stInfo_=NULL;};
74  void setStInfo(SgVlbiStationInfo* info) {stInfo_ = info;};
76  virtual bool operator<(const QTreeWidgetItem &other) const;
77 
78 private:
80 };
81 /*=====================================================================================================*/
82 
83 
84 
85 
86 
87 
88 /*=====================================================================================================*/
90 {
91  Q_OBJECT
92 public:
93  SgGuiVlbiStationList(SgObjectBrowseMode, const QString&, QMap<QString, SgVlbiStationInfo*>*,
94  const SgMJD& t=tZero, QWidget* =0, Qt::WindowFlags=0);
96  const SgMJD& getT0() const {return t0_;};
97  void setT0(const SgMJD& t) {t0_=t;};
98  virtual inline QString className() const {return "SgGuiVlbiStationList";};
99 
100 signals:
101  void refClockStationSelected(const QString&);
102  void refClockStationDeselected(const QString&);
103 
104 private
105 slots:
106  void toggleEntryMoveEnable(QTreeWidgetItem*, int, Qt::MouseButton, Qt::KeyboardModifiers);
108  void updateContent();
109  void modifyStationInfo(bool);
110 
111 protected:
112  QString ownerName_;
115  QMap<QString, SgVlbiStationInfo*>
118  double scl4delay_;
119  double scl4rate_;
121 };
122 /*=====================================================================================================*/
123 
124 
125 
126 
127 
128 
129 // Aux objects (options and clock breaks editing):
130 //
131 /*=====================================================================================================*/
133 {
134 public:
135  SgGuiVlbiClockBreakItem(QTreeWidget *parent, int type = Type) : QTreeWidgetItem(parent, type)
136  {clockBreak_=NULL;};
138  void setClockBreak(SgParameterBreak* clockBreak) {clockBreak_ = clockBreak;};
140 
141 private:
143 };
144 /*=====================================================================================================*/
145 
146 
147 
148 
149 
150 
151 /*=====================================================================================================*/
153 {
154  Q_OBJECT
155 public:
157  const SgMJD&, QWidget* =0, Qt::WindowFlags=0);
159  inline QString className() const {return "SgGuiVlbiStnInfoEditor";};
160 
161  signals:
162  void contentModified(bool);
163 
164  private
165  slots:
166  void accept();
167  void reject() {QDialog::reject(); isModified_=false; deleteLater();};
168  void editClockBreakRecord();
169  void deleteClockBreakRecord();
170  void insertClockBreakRecord();
172  void updateModifyStatus(bool);
173  void updateLClocksMode(bool);
174  void updateLZenithMode(bool);
176  void editLocalClocks();
177  void editLocalZenith();
178 
179 protected:
185  // widgets:
186  QCheckBox *cbAttributes_[7];
191  QSpinBox *sbOrder_;
192  QCheckBox *cbUseLocalClocks_;
193  QCheckBox *cbUseLocalZenith_;
194  //
195  // functions:
196  void acquireData();
197 };
198 /*=====================================================================================================*/
199 
200 
201 
202 
203 
204 
205 /*=====================================================================================================*/
206 class QLineEdit;
208 {
209  Q_OBJECT
210 public:
211 // SgGuiVlbiStnClockBreakEditor(SgGuiVlbiClockBreakItem*, QWidget* =0, Qt::WindowFlags=0);
213  QWidget* =0, Qt::WindowFlags=0);
215  inline QString className() const {return "SgGuiVlbiStnClockBreakEditor";};
216 
217  inline void setIsModified(bool is) {isModified_ = is;};
218 
219  signals:
220  void clockBreakModified(bool);
222 
223  private
224  slots:
225  void accept();
226  void reject();
227 
228 protected:
235  // widgets:
236  QLineEdit *leYr_;
237  QLineEdit *leMn_;
238  QLineEdit *leDy_;
239  QLineEdit *leHr_;
240  QLineEdit *leMi_;
241  QLineEdit *leSc_;
242  QLineEdit *leA0_;
243  QLineEdit *leA1_;
244  QLineEdit *leA2_;
245  QLineEdit *leS0_;
246  QLineEdit *leS1_;
247  QLineEdit *leS2_;
248  QCheckBox *cbIsDynamic_;
249  // functions:
250  void acquireData();
251 };
252 /*=====================================================================================================*/
253 
254 
255 /*=====================================================================================================*/
256 #endif // SG_GUI_VLBI_STATION_LIST_H
const SgMJD tZero(1957, 10, 4)
SgObjectBrowseMode
Definition: SgObjectInfo.h:46
SgGuiVlbiClockBreakItem(QTreeWidget *parent, int type=Type)
SgParameterBreak * clockBreak_
SgParameterBreak * getClockBreak()
void setClockBreak(SgParameterBreak *clockBreak)
void setStInfo(SgVlbiStationInfo *info)
virtual bool operator<(const QTreeWidgetItem &other) const
SgGuiVlbiStationItem(QTreeWidget *parent, int type=Type)
SgVlbiStationInfo * stInfo_
SgVlbiStationInfo * getStInfo()
void refClockStationSelected(const QString &)
void entryDoubleClicked(QTreeWidgetItem *, int)
QMap< QString, SgVlbiStationInfo * > * stationsByName_
void setT0(const SgMJD &t)
virtual QString className() const
void refClockStationDeselected(const QString &)
SgGuiQTreeWidgetExt * tweStations_
SgObjectBrowseMode browseMode_
SgGuiVlbiStationList(SgObjectBrowseMode, const QString &, QMap< QString, SgVlbiStationInfo * > *, const SgMJD &t=tZero, QWidget *=0, Qt::WindowFlags=0)
const SgMJD & getT0() const
void toggleEntryMoveEnable(QTreeWidgetItem *, int, Qt::MouseButton, Qt::KeyboardModifiers)
SgGuiVlbiStnClockBreakEditor(SgBreakModel *, SgObjectBrowseMode, SgGuiVlbiClockBreakItem *, QWidget *=0, Qt::WindowFlags=0)
void clockBreakCreated(SgParameterBreak *)
SgGuiVlbiClockBreakItem * cbItem_
SgVlbiStationInfo * stationInfo_
void editClockBreakRecordItem(QTreeWidgetItem *, int)
SgGuiVlbiStnInfoEditor(SgVlbiStationInfo *, SgObjectBrowseMode, const QString &, const SgMJD &, QWidget *=0, Qt::WindowFlags=0)
SgObjectBrowseMode browseMode_
void addNewClockBreak(SgParameterBreak *)
Definition: SgMJD.h:59