25 #if QT_VERSION >= 0x050000
26 # include <QtWidgets/QBoxLayout>
27 # include <QtWidgets/QButtonGroup>
28 # include <QtWidgets/QGridLayout>
29 # include <QtWidgets/QGroupBox>
30 # include <QtWidgets/QLabel>
31 # include <QtWidgets/QLineEdit>
32 # include <QtWidgets/QPushButton>
33 # include <QtWidgets/QRadioButton>
34 # include <QtWidgets/QTabWidget>
36 # include <QtGui/QBoxLayout>
37 # include <QtGui/QButtonGroup>
38 # include <QtGui/QGridLayout>
39 # include <QtGui/QGroupBox>
40 # include <QtGui/QLabel>
41 # include <QtGui/QLineEdit>
42 # include <QtGui/QPushButton>
43 # include <QtGui/QRadioButton>
44 # include <QtGui/QTabWidget>
60 QWidget* parent, Qt::WindowFlags f)
71 QBoxLayout *layout, *subLayout;
74 layout =
new QVBoxLayout(
this);
98 subLayout =
new QHBoxLayout();
99 layout->addLayout(subLayout);
101 QPushButton *btnApply =
new QPushButton(
"Apply",
this);
102 QPushButton *btnOk =
new QPushButton(
"OK",
this);
103 QPushButton *btnCancel =
new QPushButton(
"Cancel",
this);
104 QPushButton *btnDefault =
new QPushButton(
"Default",
this);
105 btnOk->setDefault(
true);
106 btnDefault->setMinimumSize((btnSize=btnDefault->sizeHint()));
107 btnCancel ->setMinimumSize( btnSize );
108 btnOk ->setMinimumSize( btnSize );
109 btnApply ->setMinimumSize( btnSize );
111 subLayout->addWidget(btnApply);
112 subLayout->addWidget(btnDefault);
113 subLayout->addStretch(1);
114 subLayout->addWidget(btnOk);
115 subLayout->addWidget(btnCancel);
116 setSizeGripEnabled(
true);
118 connect(btnApply, SIGNAL(clicked()), SLOT(
apply()));
119 connect(btnDefault,SIGNAL(clicked()), SLOT(
setDefault()));
120 connect(btnOk, SIGNAL(clicked()), SLOT(
accept()));
121 connect(btnCancel, SIGNAL(clicked()), SLOT(
reject()));
185 d =
str_.toDouble(&isOK);
193 d =
str_.toDouble(&isOK);
201 d =
str_.toDouble(&isOK);
208 d =
str_.toDouble(&isOK);
216 d =
str_.toDouble(&isOK);
223 d =
str_.toDouble(&isOK);
230 d =
str_.toDouble(&isOK);
276 QBoxLayout *layout=
new QVBoxLayout(w);
277 QGroupBox *gbox=
new QGroupBox(
"Conventional Parameter", w);
278 layout->addWidget(gbox);
279 QGridLayout *grid=
new QGridLayout(gbox);
281 label->setMinimumSize(label->sizeHint());
282 grid->addWidget(label, 0, 0);
298 QBoxLayout *layout=
new QVBoxLayout(w);
299 QGroupBox *gbox=
new QGroupBox(
"Arc Parameter", w);
300 layout->addWidget(gbox);
301 QGridLayout *grid=
new QGridLayout(gbox);
302 QLabel *label=
new QLabel(
"Arc length (hrs):", gbox);
303 label->setMinimumSize(label->sizeHint());
304 grid->addWidget(label, 0, 0);
320 QBoxLayout *layout=
new QVBoxLayout(w);
321 QGroupBox *gbox=
new QGroupBox(
"PieceWise Linear Parameter", w);
322 layout->addWidget(gbox);
323 QGridLayout *grid=
new QGridLayout(gbox);
325 QLabel *label=
new QLabel(
"A priori sigmas for rate terms (" +
327 label->setMinimumSize(label->sizeHint());
328 grid->setRowStretch(0, 1);
329 grid->addWidget(label, 1, 0);
336 label =
new QLabel(
"Interval length (hrs):", gbox);
337 label->setMinimumSize(label->sizeHint());
338 grid->addWidget(label, 2, 0);
344 grid->setRowStretch(3, 1);
356 QString(
"White noise"),
357 QString(
"2-nd order Markov process"),
358 QString(
"Random Walk"),
361 QBoxLayout *layout=
new QVBoxLayout(w);
362 QGroupBox *gbox=
new QGroupBox(
"Stochastic Parameter", w);
363 layout->addWidget(gbox);
364 QGridLayout *grid=
new QGridLayout(gbox);
367 label->setMinimumSize(label->sizeHint());
368 grid->addWidget(label, 0, 0);
376 label->setMinimumSize(label->sizeHint());
377 grid->addWidget(label, 1, 0);
384 label =
new QLabel(
"Time of relaxation (hr):", gbox);
385 label->setMinimumSize(label->sizeHint());
386 grid->addWidget(label, 2, 0);
388 leTau_ =
new QLineEdit(gbox);
391 grid->addWidget(
leTau_, 2, 1);
393 gbox =
new QGroupBox(
"Type of stochastic modelling", gbox);
394 layout =
new QVBoxLayout(gbox);
395 QButtonGroup *gr=
new QButtonGroup(gbox);
396 for (
int i=0; i<3; i++)
403 grid->addWidget(gbox, 3,0, 2,1);
419 leTau_->setEnabled(
false);
428 leTau_->setEnabled(
false);
const QString typeNames[]
QWidget * tab4RegularType()
SgParameterCfg * parConfig_
QLineEdit * leStcApriori_
SgGuiParameterCfg(SgParameterCfg *, int, bool=false, QWidget *=0, Qt::WindowFlags=Qt::Widget)
virtual void browseData()
QRadioButton * rbSType_[3]
virtual void acquireData()
QLineEdit * leConvApriori_
QWidget * tab4StochasticType()
QLineEdit * lePwlApriori_
void stochasticTypeChanged(int)
SgParameterCfg * parConfigOrig_
double getStocAPriori() const
void setSType(SType type)
void setStocAPriori(double)
const QString & getName() const
double getConvAPriori() const
double getPwlStep() const
void setArcStep(double s)
const QString & getScaleName() const
double getPwlAPriori() const
double getWhiteNoise() const
void setPwlStep(double s)
void setPwlAPriori(double)
void setWhiteNoise(double w)
void setPMode(PMode mode)
double getArcStep() const
void setConvAPriori(double)
const SgParameterCfg & getParameter(int i) const