27 #if QT_VERSION >= 0x050000
28 # include <QtWidgets/QBoxLayout>
29 # include <QtWidgets/QGroupBox>
30 # include <QtWidgets/QLabel>
31 # include <QtWidgets/QLineEdit>
32 # include <QtWidgets/QMessageBox>
33 # include <QtWidgets/QPushButton>
35 # include <QtGui/QBoxLayout>
36 # include <QtGui/QGroupBox>
37 # include <QtGui/QLabel>
38 # include <QtGui/QLineEdit>
39 # include <QtGui/QMessageBox>
40 # include <QtGui/QPushButton>
97 int column=treeWidget()->sortColumn();
100 dL = text(column).toDouble(&isOk);
103 dR = other.text(column).toDouble(&isOk);
120 QMap<QString, SgVlbiStationInfo*>* map,
const SgMJD& t0,
QWidget* parent, Qt::WindowFlags f)
131 QBoxLayout *layout =
new QVBoxLayout(
this);
132 QStringList headerLabels;
181 QMap<QString, SgVlbiStationInfo*>::const_iterator i =
stationsByName_->constBegin();
189 item->setData(
SCI_NUMBER, Qt::TextAlignmentRole, Qt::AlignRight);
190 item->setToolTip(
SCI_NUMBER,
"Index of a station");
193 item->setData(
SCI_NAME, Qt::TextAlignmentRole, Qt::AlignLeft);
196 item->setData(
SCI_TOT_OBS, Qt::TextAlignmentRole, Qt::AlignRight);
199 item->setData(
SCI_PRC_OBS, Qt::TextAlignmentRole, Qt::AlignRight);
204 item->setData(
SCI_B_DISP_DEL, Qt::TextAlignmentRole, Qt::AlignRight);
206 item->setData(
SCI_B_DISP_RAT, Qt::TextAlignmentRole, Qt::AlignRight);
209 item->setData(
SCI_B_SIG0_DEL, Qt::TextAlignmentRole, Qt::AlignRight);
211 item->setData(
SCI_B_SIG0_RAT, Qt::TextAlignmentRole, Qt::AlignRight);
214 item->setData(
SCI_B_WRMS_DEL, Qt::TextAlignmentRole, Qt::AlignRight);
216 item->setData(
SCI_B_WRMS_RAT, Qt::TextAlignmentRole, Qt::AlignRight);
219 item->setData(
SCI_B_CLK_BRKS, Qt::TextAlignmentRole, Qt::AlignCenter);
225 item->setData(
SCI_S_SCANS, Qt::TextAlignmentRole, Qt::AlignRight);
228 item->setData(
SCI_S_WRMS_DEL, Qt::TextAlignmentRole, Qt::AlignRight);
233 item->setData(
SCI_S_CLK_BRKS, Qt::TextAlignmentRole, Qt::AlignCenter);
236 item->setData(
SCI_S_ACM, Qt::TextAlignmentRole, Qt::AlignCenter);
240 item->setData(
SCI_S_IGNORE, Qt::TextAlignmentRole, Qt::AlignCenter);
244 item->setData(
SCI_S_CBL_SGN, Qt::TextAlignmentRole, Qt::AlignCenter);
250 item->setData(
SCI_S_REF_CLK, Qt::TextAlignmentRole, Qt::AlignCenter);
254 item->setData(
SCI_S_CBL_CAL, Qt::TextAlignmentRole, Qt::AlignCenter);
261 item->setData(
SCI_S_FLAGS, Qt::TextAlignmentRole, Qt::AlignCenter);
264 item->setData(
SCI_S_LC, Qt::TextAlignmentRole, Qt::AlignCenter);
267 item->setData(
SCI_S_LZ, Qt::TextAlignmentRole, Qt::AlignCenter);
270 item->setData(
SCI_S_COO_EST, Qt::TextAlignmentRole, Qt::AlignCenter);
273 item->setData(
SCI_S_COO_CON, Qt::TextAlignmentRole, Qt::AlignCenter);
276 item->setData(
SCI_S_AXO_EST, Qt::TextAlignmentRole, Qt::AlignCenter);
280 tweStations_->header()->resizeSections(QHeaderView::ResizeToContents);
281 #if QT_VERSION >= 0x050000
282 tweStations_->header()->setSectionResizeMode(QHeaderView::Interactive);
284 tweStations_->header()->setResizeMode(QHeaderView::Interactive);
300 SIGNAL(moveUponItem(
QTreeWidgetItem*,
int, Qt::MouseButton, Qt::KeyboardModifiers)),
314 Qt::MouseButton mouseButtonState, Qt::KeyboardModifiers modifiers)
330 switch (mouseButtonState)
336 case Qt::RightButton:
361 if (modifiers == Qt::ControlModifier)
496 const QString& ownerName,
const SgMJD& t0,
QWidget* parent, Qt::WindowFlags flags)
499 static const QString attrNames[] =
501 QString(
"Ignore the station"),
502 QString(
"Clocks of the station are the reference ones"),
503 QString(
"The station has a bad cable calibration"),
504 QString(
"The station has an inverted cable calibration"),
505 QString(
"Metheo data on the station are wrong"),
506 QString(
"Metheo data on the station are artificial or suspicious"),
507 QString(
"Do not estimate tropospheric refraction parameters"),
523 setWindowTitle(
"The station " +
stationInfo_->
getKey() +
" on the " + ownerName +
"-Band");
526 setWindowTitle(
"The station " +
stationInfo_->
getKey() +
" at " + ownerName +
" session");
529 setWindowTitle(
"The station " +
stationInfo_->
getKey() +
" of " + ownerName +
" project");
534 QVBoxLayout *mainLayout=
new QVBoxLayout(
this);
537 QGroupBox *gBox=
new QGroupBox(
"List of Clock Break Events",
this);
538 QBoxLayout *layout=
new QVBoxLayout(gBox);
540 QStringList headerLabels;
542 <<
"Epoch of a clock break "
552 for (
int i=0; i<
bModel_.size(); i++)
558 item->setData( 0, Qt::TextAlignmentRole, Qt::AlignRight);
559 item->setText( 1, QString(
"").sprintf(
"%.1f", b->
getA0()));
560 item->setData( 1, Qt::TextAlignmentRole, Qt::AlignRight);
561 item->setText( 2, QString(
"").sprintf(
"%.1f", b->
getS0()));
562 item->setData( 2, Qt::TextAlignmentRole, Qt::AlignRight);
564 item->setData( 3, Qt::TextAlignmentRole, Qt::AlignCenter);
566 twClockBreaks_->header()->resizeSections(QHeaderView::ResizeToContents);
567 #if QT_VERSION >= 0x050000
568 twClockBreaks_->header()->setSectionResizeMode(QHeaderView::Interactive);
570 twClockBreaks_->header()->setResizeMode(QHeaderView::Interactive);
584 QPushButton *bAdd =
new QPushButton(
"Add",
this);
585 QPushButton *bEdit =
new QPushButton(
"Edit",
this);
586 QPushButton *bDelete=
new QPushButton(
"Delete",
this);
588 bDelete->setMinimumSize((btnSize=bDelete->sizeHint()));
589 bAdd->setMinimumSize(btnSize);
590 bEdit->setMinimumSize(btnSize);
592 QBoxLayout *subLayout=
new QHBoxLayout();
593 layout->addLayout(subLayout);
594 subLayout->addStretch(1);
595 subLayout->addSpacing(3*btnSize.width());
596 subLayout->addWidget(bAdd);
597 subLayout->addWidget(bEdit);
598 subLayout->addWidget(bDelete);
600 mainLayout->addWidget(gBox);
605 QPushButton *bLClocks=
new QPushButton(
"Edit Clocks",
this);
606 QPushButton *bLZenith=
new QPushButton(
"Edit Zenith",
this);
607 QGroupBox *gboxAttr=
new QGroupBox(
"Attributes of Station",
this);
608 layout =
new QVBoxLayout(gboxAttr);
609 for (
int i=0; i<7; i++)
624 mainLayout->addSpacing(15);
625 mainLayout->addWidget(gboxAttr, 10);
627 QGridLayout *grid=
new QGridLayout();
629 mainLayout->addLayout(grid);
636 label =
new QLabel(
"Offset (s):",
this);
637 label->setMinimumSize(label->sizeHint());
638 grid->addWidget(label, 0, 1);
644 label =
new QLabel(
"Rate (s/s):",
this);
645 label->setMinimumSize(label->sizeHint());
646 grid->addWidget(label, 1, 1);
653 label =
new QLabel(
"Number of polynomials for a clock model:",
this);
654 label->setMinimumSize(label->sizeHint());
655 grid->addWidget(label, 2, 0);
661 grid->addWidget(
sbOrder_, 2,1, 1,2);
679 cbUseLocalClocks_ =
new QCheckBox(
"Use local setup of parameters for clocks (" + str +
")",
this);
700 cbUseLocalZenith_ =
new QCheckBox(
"Use local setup of parameters for zenith delays (" + str +
")",
706 bLClocks->setMinimumSize(bLClocks->sizeHint());
707 grid->addWidget(bLClocks, 3,1, 1,2);
709 bLZenith->setMinimumSize(bLZenith->sizeHint());
710 grid->addWidget(bLZenith, 4,1, 1,2);
719 subLayout =
new QHBoxLayout();
720 mainLayout->addSpacing(15);
721 mainLayout->addStretch(1);
722 mainLayout->addLayout(subLayout);
724 QPushButton *bOk=
new QPushButton(
"OK",
this);
725 QPushButton *bCancel=
new QPushButton(
"Cancel",
this);
726 bOk->setDefault(
true);
728 bCancel->setMinimumSize((btnSize=bCancel->sizeHint()));
729 bOk->setMinimumSize(btnSize);
731 subLayout->addStretch(1);
732 subLayout->addWidget(bOk);
733 subLayout->addWidget(bCancel);
739 connect(bOk, SIGNAL(clicked()), SLOT(
accept()));
743 connect(bCancel, SIGNAL(clicked()), SLOT(
reject()));
745 mainLayout->activate();
865 if (item && column>-1)
930 cbUseLocalClocks_->setText(
"Use local setup of parameters for clocks (" + str +
")");
958 cbUseLocalZenith_->setText(
"Use local setup of parameters for zenith delays (" + str +
")");
972 cbItem->setData( 0, Qt::TextAlignmentRole, Qt::AlignRight);
973 cbItem->setText( 1, QString(
"").sprintf(
"%.1f", b->
getA0()));
974 cbItem->setData( 1, Qt::TextAlignmentRole, Qt::AlignRight);
975 cbItem->setText( 2, QString(
"").sprintf(
"%.1f", b->
getS0()));
976 cbItem->setData( 2, Qt::TextAlignmentRole, Qt::AlignRight);
978 cbItem->setData( 3, Qt::TextAlignmentRole, Qt::AlignCenter);
1010 if (QMessageBox::warning(
this,
"Delete?",
1011 "Are you sure to delete clock break happened on\n \"" +
1013 QMessageBox::No | QMessageBox::Yes, QMessageBox::No)==QMessageBox::Yes)
1029 connect (cbEditor, SIGNAL(clockBreakModified(
bool)), SLOT(
updateModifyStatus(
bool)));
1058 setWindowTitle(
"Clock Break Editor");
1062 QBoxLayout *layout, *subLayout;
1066 int yr=0, mo=0, dy=0, hr=0, mi=0;
1067 double se=0.0, valA0=0.0, sigA0=0.0;
1082 gbox =
new QGroupBox(
"Clock Break",
this);
1083 grid =
new QGridLayout(gbox);
1085 label=
new QLabel(
"Epoch:", gbox);
1086 label->setMinimumSize(label->sizeHint());
1087 grid ->addWidget(label, 1, 0, Qt::AlignLeft | Qt::AlignVCenter);
1089 label=
new QLabel(
"Value (ns):", gbox);
1090 label->setMinimumSize(label->sizeHint());
1091 grid ->addWidget(label, 2, 0, Qt::AlignLeft | Qt::AlignVCenter);
1093 label=
new QLabel(
"Sigma (ns):", gbox);
1094 label->setMinimumSize(label->sizeHint());
1095 grid ->addWidget(label, 3, 0, Qt::AlignLeft | Qt::AlignVCenter);
1098 label=
new QLabel(
"YYYY", gbox);
1099 label->setMinimumSize(label->sizeHint());
1100 grid ->addWidget(label, 0, 1);
1102 label=
new QLabel(
"/", gbox);
1103 label->setMinimumSize(label->sizeHint());
1104 grid ->addWidget(label, 1, 2);
1106 label=
new QLabel(
"MM", gbox);
1107 label->setMinimumSize(label->sizeHint());
1108 grid ->addWidget(label, 0, 3);
1110 label=
new QLabel(
"/", gbox);
1111 label->setMinimumSize(label->sizeHint());
1112 grid ->addWidget(label, 1, 4);
1114 label=
new QLabel(
"DD", gbox);
1115 label->setMinimumSize(label->sizeHint());
1116 grid ->addWidget(label, 0, 5);
1118 label=
new QLabel(
"HH", gbox);
1119 label->setMinimumSize(label->sizeHint());
1120 grid ->addWidget(label, 0, 7);
1122 label=
new QLabel(
":", gbox);
1123 label->setMinimumSize(label->sizeHint());
1124 grid ->addWidget(label, 1, 8);
1126 label=
new QLabel(
"MM", gbox);
1127 label->setMinimumSize(label->sizeHint());
1128 grid ->addWidget(label, 0, 9);
1130 label=
new QLabel(
":", gbox);
1131 label->setMinimumSize(label->sizeHint());
1132 grid ->addWidget(label, 1,10);
1134 label=
new QLabel(
"SS.SS", gbox);
1135 label->setMinimumSize(label->sizeHint());
1136 grid ->addWidget(label, 0,11);
1139 leYr_ =
new QLineEdit(str.sprintf(
"%04d", yr), gbox);
1140 leYr_->setFixedWidth(
leYr_->fontMetrics().width(
"YYYY") + 10);
1141 grid ->addWidget(
leYr_, 1, 1);
1143 leMn_ =
new QLineEdit(str.sprintf(
"%02d", mo), gbox);
1144 leMn_->setFixedWidth(
leMn_->fontMetrics().width(
"MM") + 10);
1145 grid ->addWidget(
leMn_, 1, 3);
1147 leDy_ =
new QLineEdit(str.sprintf(
"%02d", dy), gbox);
1148 leDy_->setFixedWidth(
leDy_->fontMetrics().width(
"MM") + 10);
1149 grid ->addWidget(
leDy_, 1, 5);
1151 leHr_ =
new QLineEdit(str.sprintf(
"%02d", hr), gbox);
1152 leHr_->setFixedWidth(
leHr_->fontMetrics().width(
"MM") + 10);
1153 grid ->addWidget(
leHr_, 1, 7);
1155 leMi_ =
new QLineEdit(str.sprintf(
"%02d", mi), gbox);
1156 leMi_->setFixedWidth(
leMi_->fontMetrics().width(
"MM") + 10);
1157 grid ->addWidget(
leMi_, 1, 9);
1159 leSc_ =
new QLineEdit(str.sprintf(
"%5.2f", se), gbox);
1160 leSc_->setFixedWidth(
leSc_->fontMetrics().width(
"SS.SS") + 10);
1161 grid ->addWidget(
leSc_, 1,11);
1164 leA0_ =
new QLineEdit(str.sprintf(
"%.2f", valA0), gbox);
1166 grid ->addWidget(
leA0_, 2,1, 1,5);
1170 leS0_ =
new QLineEdit(str.sprintf(
"%.2f", sigA0), gbox);
1172 grid ->addWidget(
leS0_, 3,1, 1,5);
1174 grid->addItem(
new QSpacerItem(15, 0), 0, 6);
1178 layout =
new QVBoxLayout(
this);
1179 layout -> addWidget(gbox);
1181 cbIsDynamic_ =
new QCheckBox(
"Estimate clock break parameters in a common solution",
this);
1186 layout->addSpacing(15);
1191 subLayout =
new QHBoxLayout();
1192 layout->addLayout(subLayout);
1193 subLayout->addStretch(1);
1195 QPushButton *bOk=
new QPushButton(
"OK",
this);
1196 QPushButton *bCancel=
new QPushButton(
"Cancel",
this);
1197 bOk->setDefault(
true);
1200 bCancel->setMinimumSize((btnSize=bCancel->sizeHint()));
1201 bOk->setMinimumSize(btnSize);
1202 subLayout->addWidget(bOk);
1203 subLayout->addWidget(bCancel);
1204 connect(bOk, SIGNAL(clicked()), SLOT(
accept()));
1205 connect(bCancel, SIGNAL(clicked()), SLOT(
reject()));
1259 yr =
leYr_->text().toInt(&isOK);
1261 mn =
leMn_->text().toInt(&isOK);
1263 dy =
leDy_->text().toInt(&isOK);
1265 hr =
leHr_->text().toInt(&isOK);
1267 mi =
leMi_->text().toInt(&isOK);
1269 d =
leSc_->text().toDouble(&isOK);
1271 SgMJD t(yr, mn, dy, hr, mi, d);
1278 d =
leA0_->text().toDouble(&isOK);
1285 d =
leS0_->text().toDouble(&isOK);
bool operator<(const SgMJD &T1, const SgMJD &T2)
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 *)
void updateModifyStatus(bool)
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()
@ Attr_ESTIMATE_AXO
estimate axis offset;
@ Attr_NOT_VALID
omit the station;
@ 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;
SgParameterCfg * pcZenith()
void setAPrioriClockTerm_1(double)
SgParameterCfg * pcClocks()
double getCableCalMultiplierDBCal() 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