General Purpose Geodetic Library
NsBrowseNotUsedObsDialog.h
Go to the documentation of this file.
1 /*
2  *
3  * This file is a part of nuSolve. nuSolve is a part of CALC/SOLVE system
4  * and is designed to perform data analyis of a geodetic VLBI session.
5  * Copyright (C) 2010-2020 Sergei Bolotin.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef NS_BROWSE_NOT_USED_OBS_DIALOG_H
23 #define NS_BROWSE_NOT_USED_OBS_DIALOG_H
24 
25 
26 #ifdef HAVE_CONFIG_H
27 # include <config.h>
28 #endif
29 
30 
31 #include <QtCore/QList>
32 #include <QtCore/QString>
33 
34 
35 
36 #if QT_VERSION >= 0x050000
37 # include <QtWidgets/QDialog>
38 # include <QtWidgets/QTreeWidgetItem>
39 #else
40 # include <QtGui/QDialog>
41 # include <QtGui/QTreeWidgetItem>
42 #endif
43 
44 
45 class QTreeWidget;
46 
47 
48 class SgSolutionReporter;
49 
50 
51 
52 /*=====================================================================================================*/
54 {
55 public:
56  //
57  // constructors/destructors:
58  //
62  reasons_("") {mediaIdx_ = -1;};
63 
64  NsNotUsedObsInfo(int mediaIdx, const QString& stn_1Name, const QString& stn_2Name,
65  const QString& srcName, const QString& strEpoch, const QString& strQFs, const QString& reasons)
66  : stn_1Name_(stn_1Name), stn_2Name_(stn_2Name), srcName_(srcName), strEpoch_(strEpoch),
67  strQFs_(strQFs), reasons_(reasons)
68  {mediaIdx_ = mediaIdx;};
69 
73  {mediaIdx_ = i.getMediaIdx();};
74 
78  virtual ~NsNotUsedObsInfo() {};
79 
83  setReasons(i.getReasons()); return *this;};
84 
85  //
86  // Interfaces:
87  //
88  inline int getMediaIdx() const {return mediaIdx_;};
89  inline const QString& getStn_1Name() const {return stn_1Name_;};
90  inline const QString& getStn_2Name() const {return stn_2Name_;};
91  inline const QString& getSrcName() const {return srcName_;};
92  inline const QString& getStrEpoch() const {return strEpoch_;};
93  inline const QString& getStrQFs() const {return strQFs_;};
94  inline const QString& getReasons() const {return reasons_;};
95  //
96  inline void setMediaIdx(int idx) {mediaIdx_ = idx;};
97  inline void setStn_1Name(const QString& str) {stn_1Name_ = str;};
98  inline void setStn_2Name(const QString& str) {stn_2Name_= str;};
99  inline void setSrcName(const QString& str) {srcName_= str;};
100  inline void setStrEpoch(const QString& str) {strEpoch_= str;};
101  inline void setStrQFs(const QString& str) {strQFs_= str;};
102  inline void setReasons(const QString& str) {reasons_= str;};
103 
104  //
105  // Functions:
106  //
107  inline QString className() const {return "NsNotUsedObsInfo";};
108 
109  //
110  // Friends:
111  //
112 
113  //
114  // I/O:
115  //
116  //
117 private:
119  QString stn_1Name_;
120  QString stn_2Name_;
121  QString srcName_;
122  QString strEpoch_;
123  QString strQFs_;
124  QString reasons_;
125 };
126 /*=====================================================================================================*/
127 
128 
129 
130 
131 /*=====================================================================================================*/
133 {
134 public:
135  //
136  // constructors/destructors:
137  //
141  {mediaIdx_ = -1; residual_ = 0.0; stdDev_ = 0.0; normResid_ = 0.0;};
142 
143  NsDeselectedObsInfo(int mediaIdx, const QString& stn_1Name, const QString& stn_2Name,
144  const QString& srcName, const QString& strEpoch, const QString& strQFs, double residual,
145  double stdDev, double normResid)
146  : stn_1Name_(stn_1Name), stn_2Name_(stn_2Name), srcName_(srcName), strEpoch_(strEpoch),
147  strQFs_(strQFs)
148  {mediaIdx_=mediaIdx; residual_=residual; stdDev_=stdDev; normResid_=normResid;};
149 
154  stdDev_ = i.getStdDev(); normResid_ = i.getNormResid();};
155 
159  virtual ~NsDeselectedObsInfo() {};
160 
165  return *this;};
166 
167  //
168  // Interfaces:
169  //
170  inline int getMediaIdx() const {return mediaIdx_;};
171  inline const QString& getStn_1Name() const {return stn_1Name_;};
172  inline const QString& getStn_2Name() const {return stn_2Name_;};
173  inline const QString& getSrcName() const {return srcName_;};
174  inline const QString& getStrEpoch() const {return strEpoch_;};
175  inline const QString& getStrQFs() const {return strQFs_;};
176  inline double getResidual() const {return residual_;};
177  inline double getStdDev() const {return stdDev_;};
178  inline double getNormResid() const {return normResid_;};
179  //
180  inline void setMediaIdx(int idx) {mediaIdx_ = idx;};
181  inline void setStn_1Name(const QString& str) {stn_1Name_ = str;};
182  inline void setStn_2Name(const QString& str) {stn_2Name_= str;};
183  inline void setSrcName(const QString& str) {srcName_= str;};
184  inline void setStrEpoch(const QString& str) {strEpoch_= str;};
185  inline void setStrQFs(const QString& str) {strQFs_= str;};
186  inline void setResidual(double d) {residual_=d;};
187  inline void setStdDev(double d) {stdDev_=d;};
188  inline void setNormResid(double d) {normResid_=d;};
189 
190  //
191  // Functions:
192  //
193  inline QString className() const {return "NsDeselectedObsInfo";};
194 
195  //
196  // Friends:
197  //
198 
199  //
200  // I/O:
201  //
202  //
203 private:
205  QString stn_1Name_;
206  QString stn_2Name_;
207  QString srcName_;
208  QString strEpoch_;
209  QString strQFs_;
210  double residual_;
211  double stdDev_;
212  double normResid_;
213 };
214 /*=====================================================================================================*/
215 
216 
217 
218 
219 
220 /*=====================================================================================================*/
222 {
223 public:
224  NsQTreeWidgetItem(QTreeWidget *parent, int type = Type) : QTreeWidgetItem(parent, type) {};
225  virtual ~NsQTreeWidgetItem() {};
226 
227  virtual bool operator<(const QTreeWidgetItem &other) const;
228 };
229 /*=====================================================================================================*/
230 
231 
232 
233 
234 
235 
236 /*=====================================================================================================*/
238 {
239  Q_OBJECT
240 public:
241 
242  //
243  // constructors/destructors:
244  //
247  NsBrowseNotUsedObsDialog(const QList<NsNotUsedObsInfo*>& nonUsableObservations,
248  const QList<NsDeselectedObsInfo*>& deselectedObservations, SgSolutionReporter *reporter,
249  QWidget *parent=0, Qt::WindowFlags flags=0);
250 
254  virtual ~NsBrowseNotUsedObsDialog();
255 
256 
257 
258  //
259  // Interfaces:
260  //
261 
262 
263 
264  //
265  // Functions:
266  //
267  inline QString className() const {return "NsBrowseNotUsedObsDialog";};
268 
269 
270  //
271  // Friends:
272  //
273 
274 
275 
276  //
277  // I/O:
278  //
279  //
280 
281 private slots:
282  void accept();
283  void reject();
284  void export2file();
285 
286 private:
292 
293 
294 
295 protected:
296  virtual void closeEvent(QCloseEvent *) {deleteLater();};
297 };
298 /*=====================================================================================================*/
299 
300 
301 
302 
303 
304 
305 
306 
307 
308 /*=====================================================================================================*/
309 #endif // NS_BROWSE_NOT_USED_OBS_DIALOG_H
QList< NsDeselectedObsInfo * > deselectedObservations_
QList< NsNotUsedObsInfo * > nonUsableObservations_
virtual void closeEvent(QCloseEvent *)
NsBrowseNotUsedObsDialog(const QList< NsNotUsedObsInfo * > &nonUsableObservations, const QList< NsDeselectedObsInfo * > &deselectedObservations, SgSolutionReporter *reporter, QWidget *parent=0, Qt::WindowFlags flags=0)
const QString & getStrEpoch() const
const QString & getStn_1Name() const
NsDeselectedObsInfo(int mediaIdx, const QString &stn_1Name, const QString &stn_2Name, const QString &srcName, const QString &strEpoch, const QString &strQFs, double residual, double stdDev, double normResid)
void setSrcName(const QString &str)
const QString & getSrcName() const
const QString & getStn_2Name() const
NsDeselectedObsInfo & operator=(const NsDeselectedObsInfo &i)
void setStn_2Name(const QString &str)
const QString & getStrQFs() const
NsDeselectedObsInfo(const NsDeselectedObsInfo &i)
void setStn_1Name(const QString &str)
void setStrQFs(const QString &str)
void setStrEpoch(const QString &str)
const QString & getSrcName() const
const QString & getStn_1Name() const
void setReasons(const QString &str)
const QString & getStrQFs() const
const QString & getStrEpoch() const
void setStn_1Name(const QString &str)
const QString & getStn_2Name() const
NsNotUsedObsInfo & operator=(const NsNotUsedObsInfo &i)
NsNotUsedObsInfo(const NsNotUsedObsInfo &i)
NsNotUsedObsInfo(int mediaIdx, const QString &stn_1Name, const QString &stn_2Name, const QString &srcName, const QString &strEpoch, const QString &strQFs, const QString &reasons)
void setStrQFs(const QString &str)
void setSrcName(const QString &str)
const QString & getReasons() const
void setStn_2Name(const QString &str)
void setStrEpoch(const QString &str)
NsQTreeWidgetItem(QTreeWidget *parent, int type=Type)
virtual bool operator<(const QTreeWidgetItem &other) const