27 #if QT_VERSION >= 0x050000
28 # include <QtWidgets/QBoxLayout>
29 # include <QtWidgets/QButtonGroup>
30 # include <QtWidgets/QGroupBox>
31 # include <QtWidgets/QLabel>
32 # include <QtWidgets/QLineEdit>
33 # include <QtWidgets/QMessageBox>
34 # include <QtWidgets/QPushButton>
35 # include <QtWidgets/QRadioButton>
37 # include <QtGui/QBoxLayout>
38 # include <QtGui/QGroupBox>
39 # include <QtGui/QLabel>
40 # include <QtGui/QLineEdit>
41 # include <QtGui/QMessageBox>
42 # include <QtGui/QPushButton>
102 int column=treeWidget()->sortColumn();
105 dL = text(column).toDouble(&isOk);
108 dR = other.text(column).toDouble(&isOk);
125 QMap<QString, SgVlbiStationInfo*>* map,
const SgMJD& t0,
QWidget* parent, Qt::WindowFlags f)
136 QBoxLayout *layout =
new QVBoxLayout(
this);
137 QStringList headerLabels;
187 QMap<QString, SgVlbiStationInfo*>::const_iterator i =
stationsByName_->constBegin();
195 item->setData(
SCI_NUMBER, Qt::TextAlignmentRole, Qt::AlignRight);
196 item->setToolTip(
SCI_NUMBER,
"Index of a station");
199 item->setData(
SCI_NAME, Qt::TextAlignmentRole, Qt::AlignLeft);
202 item->setData(
SCI_TOT_OBS, Qt::TextAlignmentRole, Qt::AlignRight);
205 item->setData(
SCI_PRC_OBS, Qt::TextAlignmentRole, Qt::AlignRight);
210 item->setData(
SCI_B_DISP_DEL, Qt::TextAlignmentRole, Qt::AlignRight);
212 item->setData(
SCI_B_DISP_RAT, Qt::TextAlignmentRole, Qt::AlignRight);
215 item->setData(
SCI_B_SIG0_DEL, Qt::TextAlignmentRole, Qt::AlignRight);
217 item->setData(
SCI_B_SIG0_RAT, Qt::TextAlignmentRole, Qt::AlignRight);
220 item->setData(
SCI_B_WRMS_DEL, Qt::TextAlignmentRole, Qt::AlignRight);
222 item->setData(
SCI_B_WRMS_RAT, Qt::TextAlignmentRole, Qt::AlignRight);
225 item->setData(
SCI_B_CLK_BRKS, Qt::TextAlignmentRole, Qt::AlignCenter);
231 item->setData(
SCI_S_SCANS, Qt::TextAlignmentRole, Qt::AlignRight);
234 item->setData(
SCI_S_WRMS_DEL, Qt::TextAlignmentRole, Qt::AlignRight);
239 item->setData(
SCI_S_CLK_BRKS, Qt::TextAlignmentRole, Qt::AlignCenter);
242 item->setData(
SCI_S_ACM, Qt::TextAlignmentRole, Qt::AlignCenter);
246 item->setData(
SCI_S_IGNORE, Qt::TextAlignmentRole, Qt::AlignCenter);
249 item->setData(
SCI_S_CBL_ORI, Qt::TextAlignmentRole, Qt::AlignCenter);
253 item->setData(
SCI_S_CBL_SGN, Qt::TextAlignmentRole, Qt::AlignCenter);
259 item->setData(
SCI_S_REF_CLK, Qt::TextAlignmentRole, Qt::AlignCenter);
263 item->setData(
SCI_S_CBL_CAL, Qt::TextAlignmentRole, Qt::AlignCenter);
270 item->setData(
SCI_S_FLAGS, Qt::TextAlignmentRole, Qt::AlignCenter);
273 item->setData(
SCI_S_LC, Qt::TextAlignmentRole, Qt::AlignCenter);
276 item->setData(
SCI_S_LZ, Qt::TextAlignmentRole, Qt::AlignCenter);
279 item->setData(
SCI_S_COO_EST, Qt::TextAlignmentRole, Qt::AlignCenter);
282 item->setData(
SCI_S_COO_CON, Qt::TextAlignmentRole, Qt::AlignCenter);
285 item->setData(
SCI_S_AXO_EST, Qt::TextAlignmentRole, Qt::AlignCenter);
289 tweStations_->header()->resizeSections(QHeaderView::ResizeToContents);
290 #if QT_VERSION >= 0x050000
291 tweStations_->header()->setSectionResizeMode(QHeaderView::Interactive);
293 tweStations_->header()->setResizeMode(QHeaderView::Interactive);
309 SIGNAL(moveUponItem(
QTreeWidgetItem*,
int, Qt::MouseButton, Qt::KeyboardModifiers)),
323 Qt::MouseButton mouseButtonState, Qt::KeyboardModifiers modifiers)
339 switch (mouseButtonState)
345 case Qt::RightButton:
370 if (modifiers == Qt::ControlModifier)
506 const QString& ownerName,
const SgMJD& t0,
QWidget* parent, Qt::WindowFlags flags)
509 static const QString attrNames[] =
511 QString(
"Ignore the station"),
512 QString(
"Clocks of the station are the reference ones"),
513 QString(
"The station has a bad cable calibration"),
514 QString(
"The station has an inverted cable calibration"),
515 QString(
"Metheo data on the station are wrong"),
516 QString(
"Metheo data on the station are artificial or suspicious"),
517 QString(
"Do not estimate tropospheric refraction parameters"),
533 setWindowTitle(
"The station " +
stationInfo_->
getKey() +
" on the " + ownerName +
"-Band");
536 setWindowTitle(
"The station " +
stationInfo_->
getKey() +
" at " + ownerName +
" session");
539 setWindowTitle(
"The station " +
stationInfo_->
getKey() +
" of " + ownerName +
" project");
544 QVBoxLayout *mainLayout=
new QVBoxLayout(
this);
547 QGroupBox *gBox=
new QGroupBox(
"List of Clock Break Events",
this);
548 QBoxLayout *layout=
new QVBoxLayout(gBox);
550 QStringList headerLabels;
552 <<
"Epoch of a clock break "
562 for (
int i=0; i<
bModel_.size(); i++)
568 item->setData( 0, Qt::TextAlignmentRole, Qt::AlignRight);
569 item->setText( 1, QString(
"").sprintf(
"%.1f", b->
getA0()));
570 item->setData( 1, Qt::TextAlignmentRole, Qt::AlignRight);
571 item->setText( 2, QString(
"").sprintf(
"%.1f", b->
getS0()));
572 item->setData( 2, Qt::TextAlignmentRole, Qt::AlignRight);
574 item->setData( 3, Qt::TextAlignmentRole, Qt::AlignCenter);
576 twClockBreaks_->header()->resizeSections(QHeaderView::ResizeToContents);
577 #if QT_VERSION >= 0x050000
578 twClockBreaks_->header()->setSectionResizeMode(QHeaderView::Interactive);
580 twClockBreaks_->header()->setResizeMode(QHeaderView::Interactive);
594 QPushButton *bAdd =
new QPushButton(
"Add",
this);
595 QPushButton *bEdit =
new QPushButton(
"Edit",
this);
596 QPushButton *bDelete=
new QPushButton(
"Delete",
this);
598 bDelete->setMinimumSize((btnSize=bDelete->sizeHint()));
599 bAdd->setMinimumSize(btnSize);
600 bEdit->setMinimumSize(btnSize);
602 QBoxLayout *subLayout=
new QHBoxLayout();
603 layout->addLayout(subLayout);
604 subLayout->addStretch(1);
605 subLayout->addSpacing(3*btnSize.width());
606 subLayout->addWidget(bAdd);
607 subLayout->addWidget(bEdit);
608 subLayout->addWidget(bDelete);
610 mainLayout->addWidget(gBox);
615 QPushButton *bLClocks=
new QPushButton(
"Edit Clocks",
this);
616 QPushButton *bLZenith=
new QPushButton(
"Edit Zenith",
this);
617 QGroupBox *gboxAttr=
new QGroupBox(
"Attributes of Station",
this);
618 layout =
new QVBoxLayout(gboxAttr);
619 layout->setSpacing(layout->spacing()/2);
620 for (
int i=0; i<7; i++)
635 mainLayout->addSpacing(15);
636 mainLayout->addWidget(gboxAttr, 10);
638 QRadioButton *rbCccSource[4];
639 QGroupBox *gbox=
new QGroupBox(
"Source of cable calibration correction:",
this);
640 QButtonGroup *bgFlybySrcCcc =
new QButtonGroup(gbox);
641 layout =
new QVBoxLayout(gbox);
642 layout->setSpacing(layout->spacing()/2);
643 for (
int i=0; i<4; i++)
645 rbCccSource[i] =
new QRadioButton(
"Use cable calibration correction from: " +
647 rbCccSource[i]->setMinimumSize(rbCccSource[i]->sizeHint());
648 bgFlybySrcCcc->addButton(rbCccSource[i], i);
649 layout->addWidget(rbCccSource[i]);
652 bgFlybySrcCcc->buttons()[1]->setEnabled(
false);
654 bgFlybySrcCcc->buttons()[2]->setEnabled(
false);
656 bgFlybySrcCcc->buttons()[3]->setEnabled(
false);
659 mainLayout->addWidget(gbox, 10);
662 QGridLayout *grid=
new QGridLayout();
664 mainLayout->addLayout(grid);
671 label =
new QLabel(
"Offset (s):",
this);
672 label->setMinimumSize(label->sizeHint());
673 grid->addWidget(label, 0, 1);
679 label =
new QLabel(
"Rate (s/s):",
this);
680 label->setMinimumSize(label->sizeHint());
681 grid->addWidget(label, 1, 1);
688 label =
new QLabel(
"Number of polynomials for a clock model:",
this);
689 label->setMinimumSize(label->sizeHint());
690 grid->addWidget(label, 2, 0);
696 grid->addWidget(
sbOrder_, 2,1, 1,2);
714 cbUseLocalClocks_ =
new QCheckBox(
"Use local setup of parameters for clocks (" + str +
")",
this);
735 cbUseLocalZenith_ =
new QCheckBox(
"Use local setup of parameters for zenith delays (" + str +
")",
741 bLClocks->setMinimumSize(bLClocks->sizeHint());
742 grid->addWidget(bLClocks, 3,1, 1,2);
744 bLZenith->setMinimumSize(bLZenith->sizeHint());
745 grid->addWidget(bLZenith, 4,1, 1,2);
754 subLayout =
new QHBoxLayout();
755 mainLayout->addSpacing(15);
756 mainLayout->addStretch(1);
757 mainLayout->addLayout(subLayout);
759 QPushButton *bOk=
new QPushButton(
"OK",
this);
760 QPushButton *bCancel=
new QPushButton(
"Cancel",
this);
761 bOk->setDefault(
true);
763 bCancel->setMinimumSize((btnSize=bCancel->sizeHint()));
764 bOk->setMinimumSize(btnSize);
766 subLayout->addStretch(1);
767 subLayout->addWidget(bOk);
768 subLayout->addWidget(bCancel);
774 connect(bOk, SIGNAL(clicked()), SLOT(
accept()));
778 connect(bCancel, SIGNAL(clicked()), SLOT(
reject()));
780 mainLayout->activate();
928 if (item && column>-1)
993 cbUseLocalClocks_->setText(
"Use local setup of parameters for clocks (" + str +
")");
1021 cbUseLocalZenith_->setText(
"Use local setup of parameters for zenith delays (" + str +
")");
1035 cbItem->setData( 0, Qt::TextAlignmentRole, Qt::AlignRight);
1036 cbItem->setText( 1, QString(
"").sprintf(
"%.1f", b->
getA0()));
1037 cbItem->setData( 1, Qt::TextAlignmentRole, Qt::AlignRight);
1038 cbItem->setText( 2, QString(
"").sprintf(
"%.1f", b->
getS0()));
1039 cbItem->setData( 2, Qt::TextAlignmentRole, Qt::AlignRight);
1041 cbItem->setData( 3, Qt::TextAlignmentRole, Qt::AlignCenter);
1059 connect (cbEditor, SIGNAL(clockBreakModified(
bool)), SLOT(
updateModifyStatus(
bool)));
1073 if (QMessageBox::warning(
this,
"Delete?",
1074 "Are you sure to delete clock break happened on\n \"" +
1076 QMessageBox::No | QMessageBox::Yes, QMessageBox::No)==QMessageBox::Yes)
1092 connect (cbEditor, SIGNAL(clockBreakModified(
bool)), SLOT(
updateModifyStatus(
bool)));
1121 setWindowTitle(
"Clock Break Editor");
1125 QBoxLayout *layout, *subLayout;
1129 int yr=0, mo=0, dy=0, hr=0, mi=0;
1130 double se=0.0, valA0=0.0, sigA0=0.0;
1145 gbox =
new QGroupBox(
"Clock Break",
this);
1146 grid =
new QGridLayout(gbox);
1148 label=
new QLabel(
"Epoch:", gbox);
1149 label->setMinimumSize(label->sizeHint());
1150 grid ->addWidget(label, 1, 0, Qt::AlignLeft | Qt::AlignVCenter);
1152 label=
new QLabel(
"Value (ns):", gbox);
1153 label->setMinimumSize(label->sizeHint());
1154 grid ->addWidget(label, 2, 0, Qt::AlignLeft | Qt::AlignVCenter);
1156 label=
new QLabel(
"Sigma (ns):", gbox);
1157 label->setMinimumSize(label->sizeHint());
1158 grid ->addWidget(label, 3, 0, Qt::AlignLeft | Qt::AlignVCenter);
1161 label=
new QLabel(
"YYYY", gbox);
1162 label->setMinimumSize(label->sizeHint());
1163 grid ->addWidget(label, 0, 1);
1165 label=
new QLabel(
"/", gbox);
1166 label->setMinimumSize(label->sizeHint());
1167 grid ->addWidget(label, 1, 2);
1169 label=
new QLabel(
"MM", gbox);
1170 label->setMinimumSize(label->sizeHint());
1171 grid ->addWidget(label, 0, 3);
1173 label=
new QLabel(
"/", gbox);
1174 label->setMinimumSize(label->sizeHint());
1175 grid ->addWidget(label, 1, 4);
1177 label=
new QLabel(
"DD", gbox);
1178 label->setMinimumSize(label->sizeHint());
1179 grid ->addWidget(label, 0, 5);
1181 label=
new QLabel(
"HH", gbox);
1182 label->setMinimumSize(label->sizeHint());
1183 grid ->addWidget(label, 0, 7);
1185 label=
new QLabel(
":", gbox);
1186 label->setMinimumSize(label->sizeHint());
1187 grid ->addWidget(label, 1, 8);
1189 label=
new QLabel(
"MM", gbox);
1190 label->setMinimumSize(label->sizeHint());
1191 grid ->addWidget(label, 0, 9);
1193 label=
new QLabel(
":", gbox);
1194 label->setMinimumSize(label->sizeHint());
1195 grid ->addWidget(label, 1,10);
1197 label=
new QLabel(
"SS.SS", gbox);
1198 label->setMinimumSize(label->sizeHint());
1199 grid ->addWidget(label, 0,11);
1202 leYr_ =
new QLineEdit(str.sprintf(
"%04d", yr), gbox);
1203 leYr_->setFixedWidth(
leYr_->fontMetrics().width(
"YYYY") + 10);
1204 grid ->addWidget(
leYr_, 1, 1);
1206 leMn_ =
new QLineEdit(str.sprintf(
"%02d", mo), gbox);
1207 leMn_->setFixedWidth(
leMn_->fontMetrics().width(
"MM") + 10);
1208 grid ->addWidget(
leMn_, 1, 3);
1210 leDy_ =
new QLineEdit(str.sprintf(
"%02d", dy), gbox);
1211 leDy_->setFixedWidth(
leDy_->fontMetrics().width(
"MM") + 10);
1212 grid ->addWidget(
leDy_, 1, 5);
1214 leHr_ =
new QLineEdit(str.sprintf(
"%02d", hr), gbox);
1215 leHr_->setFixedWidth(
leHr_->fontMetrics().width(
"MM") + 10);
1216 grid ->addWidget(
leHr_, 1, 7);
1218 leMi_ =
new QLineEdit(str.sprintf(
"%02d", mi), gbox);
1219 leMi_->setFixedWidth(
leMi_->fontMetrics().width(
"MM") + 10);
1220 grid ->addWidget(
leMi_, 1, 9);
1222 leSc_ =
new QLineEdit(str.sprintf(
"%5.2f", se), gbox);
1223 leSc_->setFixedWidth(
leSc_->fontMetrics().width(
"SS.SS") + 10);
1224 grid ->addWidget(
leSc_, 1,11);
1227 leA0_ =
new QLineEdit(str.sprintf(
"%.2f", valA0), gbox);
1229 grid ->addWidget(
leA0_, 2,1, 1,5);
1233 leS0_ =
new QLineEdit(str.sprintf(
"%.2f", sigA0), gbox);
1235 grid ->addWidget(
leS0_, 3,1, 1,5);
1237 grid->addItem(
new QSpacerItem(15, 0), 0, 6);
1241 layout =
new QVBoxLayout(
this);
1242 layout -> addWidget(gbox);
1244 cbIsDynamic_ =
new QCheckBox(
"Estimate clock break parameters in a common solution",
this);
1249 layout->addSpacing(15);
1254 subLayout =
new QHBoxLayout();
1255 layout->addLayout(subLayout);
1256 subLayout->addStretch(1);
1258 QPushButton *bOk=
new QPushButton(
"OK",
this);
1259 QPushButton *bCancel=
new QPushButton(
"Cancel",
this);
1260 bOk->setDefault(
true);
1263 bCancel->setMinimumSize((btnSize=bCancel->sizeHint()));
1264 bOk->setMinimumSize(btnSize);
1265 subLayout->addWidget(bOk);
1266 subLayout->addWidget(bCancel);
1267 connect(bOk, SIGNAL(clicked()), SLOT(
accept()));
1268 connect(bCancel, SIGNAL(clicked()), SLOT(
reject()));
1322 yr =
leYr_->text().toInt(&isOK);
1324 mn =
leMn_->text().toInt(&isOK);
1326 dy =
leDy_->text().toInt(&isOK);
1328 hr =
leHr_->text().toInt(&isOK);
1330 mi =
leMi_->text().toInt(&isOK);
1332 d =
leSc_->text().toDouble(&isOK);
1334 SgMJD t(yr, mn, dy, hr, mi, d);
1341 d =
leA0_->text().toDouble(&isOK);
1348 d =
leS0_->text().toDouble(&isOK);
const QString sCableCalOrigs[]
bool operator<(const SgMJD &T1, const SgMJD &T2)
const QString sCableCalSourceNames[4]
bool isAttr(uint a) const
void setT0(const SgMJD &t)
bool delBreak(const SgMJD &t)
bool addBreak(const SgMJD &t, double a0=0.0, double a1=0.0, double a2=0.0, bool isDynamic=false)
const SgMJD & getT0() const
SgParameterBreak * getClockBreak()
void setClockBreak(SgParameterBreak *clockBreak)
void setStInfo(SgVlbiStationInfo *info)
virtual bool operator<(const QTreeWidgetItem &other) const
SgVlbiStationInfo * getStInfo()
void refClockStationSelected(const QString &)
void entryDoubleClicked(QTreeWidgetItem *, int)
QMap< QString, SgVlbiStationInfo * > * stationsByName_
void modifyStationInfo(bool)
void refClockStationDeselected(const QString &)
SgGuiQTreeWidgetExt * tweStations_
SgObjectBrowseMode browseMode_
SgGuiVlbiStationList(SgObjectBrowseMode, const QString &, QMap< QString, SgVlbiStationInfo * > *, const SgMJD &t=tZero, QWidget *=0, Qt::WindowFlags=0)
void toggleEntryMoveEnable(QTreeWidgetItem *, int, Qt::MouseButton, Qt::KeyboardModifiers)
void clockBreakModified(bool)
SgObjectBrowseMode browseMode_
SgGuiVlbiStnClockBreakEditor(SgBreakModel *, SgObjectBrowseMode, SgGuiVlbiClockBreakItem *, QWidget *=0, Qt::WindowFlags=0)
void clockBreakCreated(SgParameterBreak *)
SgGuiVlbiClockBreakItem * cbItem_
SgParameterBreak * clockBreak_
SgVlbiStationInfo * stationInfo_
void insertClockBreakRecord()
void editClockBreakRecordItem(QTreeWidgetItem *, int)
SgGuiVlbiStnInfoEditor(SgVlbiStationInfo *, SgObjectBrowseMode, const QString &, const SgMJD &, QWidget *=0, Qt::WindowFlags=0)
void updateLZenithMode(bool)
QLineEdit * leAPrioriClockTerm_1_
SgObjectBrowseMode browseMode_
QCheckBox * cbAttributes_[7]
QTreeWidget * twClockBreaks_
QCheckBox * cbUseLocalZenith_
~SgGuiVlbiStnInfoEditor()
QCheckBox * cbUseLocalClocks_
QCheckBox * cbUseAPrioriClocks_
void updateLClocksMode(bool)
void addNewClockBreak(SgParameterBreak *)
SgTaskConfig::CableCalSource flybyCableCalSource_
void updateModifyStatus(bool)
void flybySourceCccFModified(int n)
void contentModified(bool)
void deleteClockBreakRecord()
void editClockBreakRecord()
QLineEdit * leAPrioriClockTerm_0_
@ F_YYYYMMDDHHMMSSSS
Long verbose: Fri, the 2nd of Apr, 2010; 17hr 02min 43.6400sec.
QString toString(Format format=F_Verbose) const
static void MJD_reverse(int date, double time, int &nYear, int &nMonth, int &nDay, int &nHour, int &nMin, double &dSec)
double dispersion(DataType, bool=false) const
double getSigma2add(DataType) const
const QString & getKey() const
int numProcessed(DataType dType) const
double wrms(DataType) const
int numTotal(DataType dType) const
@ Attr_DYNAMIC
parameters supposed to be estimated during the common solution;
@ Attr_MODIFIED
parameters were modified;
@ Idx_ZENITH
index for wet zenith delay
@ Idx_CLOCK_0
index for clocks (order #0)
void setNeed2useAPrioriClocks(bool)
QMap< QString, SgVlbiAuxObservation * > * auxObservationByScanId()
void setFlybyCableCalSource(SgTaskConfig::CableCalSource s)
@ Attr_ESTIMATE_AXO
estimate axis offset;
@ Attr_NOT_VALID
omit the station;
@ Attr_HAS_CCC_FSLG
a station has cable calibrations from FS log file
@ Attr_INVERSE_CABLE
cable calibration correction has wrong sign;
@ Attr_ART_METEO
indicates that the station has artificial meteo parameters;
@ Attr_CONSTRAIN_COO
constrain station position in estimation;
@ Attr_APRIORI_CLOCK_MODIFIED
@ Attr_REFERENCE_CLOCKS
the clocks are the reference ones;
@ Attr_DONT_ESTIMATE_TRPS
do not estimate parameters of troposphere delay for station;
@ Attr_IGNORE_CABLE_CAL
do not apply cable calibration;
@ Attr_ESTIMATE_COO
estimate station position;
@ Attr_USE_LOCAL_ZENITH
use its own setup for the zenith delay parameter;
@ Attr_USE_LOCAL_CLOCKS
use its own setup for the clock parameter;
@ Attr_BAD_METEO
indicates that the station has bad meteo parameters;
@ Attr_HAS_CCC_CDMS
a station has cable calibrations from CDMS
@ Attr_HAS_CCC_PCMT
a station has cable calibrations from PCMT
SgParameterCfg * pcZenith()
void setAPrioriClockTerm_1(double)
SgParameterCfg * pcClocks()
double getCableCalMultiplierDBCal() const
SgTaskConfig::CableCalSource getFlybyCableCalSource() const
SgBreakModel & clockBreaks()
double getAPrioriClockTerm_1() const
void setClocksModelOrder(int n)
int getClocksModelOrder() const
void setAPrioriClockTerm_0(double)
bool getNeed2useAPrioriClocks() const
double getAPrioriClockTerm_0() const