General Purpose Geodetic Library
SgGuiVlbiSourceList.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 #ifndef SG_GUI_VLBI_SOURCE_LIST_H
24 #define SG_GUI_VLBI_SOURCE_LIST_H
25 
26 
27 #ifdef HAVE_CONFIG_H
28 # include <config.h>
29 #endif
30 
31 
32 
33 #include <SgVlbiSourceInfo.h>
34 
35 #if QT_VERSION >= 0x050000
36 # include <QtWidgets/QCheckBox>
37 # include <QtWidgets/QDialog>
38 # include <QtWidgets/QHeaderView>
39 # include <QtWidgets/QPlainTextEdit>
40 # include <QtWidgets/QTreeWidgetItem>
41 #else
42 # include <QtGui/QCheckBox>
43 # include <QtGui/QDialog>
44 # include <QtGui/QHeaderView>
45 # include <QtGui/QPlainTextEdit>
46 # include <QtGui/QTreeWidgetItem>
47 #endif
48 
49 #include <SgGuiQTreeWidgetExt.h>
50 
51 
52 
53 
54 
55 
56 
57 
58 
59 
60 /*=====================================================================================================*/
62 {
63 public:
64  SgGuiVlbiSourceItem(QTreeWidget *parent, int type = Type) : QTreeWidgetItem(parent, type)
65  {srInfo_=NULL;};
66  virtual ~SgGuiVlbiSourceItem() {srInfo_=NULL;};
67  void setSrInfo(SgVlbiSourceInfo* info) {srInfo_ = info;};
69  virtual bool operator<(const QTreeWidgetItem &other) const;
70 
71 private:
73 };
74 /*=====================================================================================================*/
75 
76 
77 
78 /*=====================================================================================================*/
80 {
81  Q_OBJECT
82 public:
83 
84  SgGuiVlbiSourceList(SgObjectBrowseMode, const QString&, QMap<QString, SgVlbiSourceInfo*>*,
85  QWidget* =0, Qt::WindowFlags=0);
87 
88  private
89  slots:
90  void toggleEntryMoveEnable(QTreeWidgetItem*, int, Qt::MouseButton, Qt::KeyboardModifiers);
92  void updateContent();
93  void modifySourceInfo(bool);
94 
95 protected:
96  QString ownerName_;
99  QMap<QString, SgVlbiSourceInfo*>
102  double scl4delay_;
103  double scl4rate_;
104  virtual inline QString className() const {return "SgGuiVlbiSourceList";};
105 };
106 /*=====================================================================================================*/
107 
108 
109 
110 
111 /*=====================================================================================================*/
113 {
114  Q_OBJECT
115 public:
116  SgGuiVlbiSrcInfoEditor(SgVlbiSourceInfo*, const QString&, QWidget* =0, Qt::WindowFlags=0);
118  inline QString className() const {return "SgGuiVlbiSrcInfoEditor";};
119 
120  signals:
121  void contentModified(bool);
122 
123  private
124  slots:
125  void toggleEntryMoveEnable(QTreeWidgetItem*, int, Qt::MouseButton, Qt::KeyboardModifiers);
126  void accept();
127  void reject() {QDialog::reject(); isModified_=false; deleteLater();};
128  void editSsmPoint();
129  void deleteSsmPoint();
130  void insertSsmPoint();
131  void editSrcStModel(QTreeWidgetItem*, int);
132  void updateModifyStatus(bool);
134 
135 protected:
138  // widgets:
139  QCheckBox *cbAttributes_[7];
141  //
142  // functions:
143  void acquireData();
144 };
145 /*=====================================================================================================*/
146 
147 
148 
149 
150 
151 /*=====================================================================================================*/
152 // Aux objects (options and SS model parameter editing):
153 //
154 /*=====================================================================================================*/
156 {
157 public:
158  inline SgGuiVlbiSrcStrModelItem(QTreeWidget *parent, int type = Type) : QTreeWidgetItem(parent, type)
159  {point_=NULL; modelIdx_=0;};
162  inline int getModelIdx() {return modelIdx_;};
164  inline void setModelIdx(int idx) {modelIdx_ = idx;};
165 private:
169 };
170 /*=====================================================================================================*/
171 
172 
173 
174 
175 
176 
177 /*=====================================================================================================*/
178 class QLineEdit;
180 {
181  Q_OBJECT
182 public:
184  QWidget* =0, Qt::WindowFlags=0);
185  inline ~SgGuiVlbiSrcStrModelEditor() {src_=NULL; twItem_=NULL;};
186  inline QString className() const {return "SgGuiVlbiSrcStrModelEditor";};
187 
188  inline void setIsModified(bool is) {isModified_ = is;};
189 
190  signals:
191  void ssmPointModified(bool);
193 
194  private
195  slots:
196  void accept();
197  void reject();
198 
199 protected:
206  // widgets:
207  QLineEdit *leX_;
208  QLineEdit *leY_;
209  QLineEdit *leK_;
210  QLineEdit *leB_;
211  QCheckBox *cbEstPosition_;
212  QCheckBox *cbEstK_;
213  QCheckBox *cbEstB_;
214  // functions:
215  void acquireData();
216 };
217 
218 
219 
220 
221 
222 /*=====================================================================================================*/
223 #endif // SG_GUI_VLBI_SOURCE_LIST_H
SgObjectBrowseMode
Definition: SgObjectInfo.h:46
SgVlbiSourceInfo * srInfo_
SgVlbiSourceInfo * getSrInfo()
void setSrInfo(SgVlbiSourceInfo *info)
virtual bool operator<(const QTreeWidgetItem &other) const
SgGuiVlbiSourceItem(QTreeWidget *parent, int type=Type)
void entryDoubleClicked(QTreeWidgetItem *, int)
void toggleEntryMoveEnable(QTreeWidgetItem *, int, Qt::MouseButton, Qt::KeyboardModifiers)
SgObjectBrowseMode browseMode_
SgGuiQTreeWidgetExt * tweSources_
SgGuiVlbiSourceList(SgObjectBrowseMode, const QString &, QMap< QString, SgVlbiSourceInfo * > *, QWidget *=0, Qt::WindowFlags=0)
QMap< QString, SgVlbiSourceInfo * > * sourcesByName_
virtual QString className() const
void addNewSsmPoint(SgVlbiSourceInfo::StructModelMp *)
SgGuiVlbiSrcInfoEditor(SgVlbiSourceInfo *, const QString &, QWidget *=0, Qt::WindowFlags=0)
void editSrcStModel(QTreeWidgetItem *, int)
void toggleEntryMoveEnable(QTreeWidgetItem *, int, Qt::MouseButton, Qt::KeyboardModifiers)
SgVlbiSourceInfo * sourceInfo_
SgGuiQTreeWidgetExt * twSrcStModels_
SgGuiVlbiSrcStrModelEditor(SgVlbiSourceInfo *, SgGuiVlbiSrcStrModelItem *, QWidget *=0, Qt::WindowFlags=0)
SgVlbiSourceInfo::StructModelMp * ssmPoint_
void ssmPointCreated(SgVlbiSourceInfo::StructModelMp *)
SgGuiVlbiSrcStrModelItem * twItem_
SgVlbiSourceInfo::StructModelMp * getPoint()
void setPoint(SgVlbiSourceInfo::StructModelMp *p)
SgVlbiSourceInfo::StructModelMp * point_
SgGuiVlbiSrcStrModelItem(QTreeWidget *parent, int type=Type)