improve coincidentAnalyzer UI

This commit is contained in:
splitPoleDAQ 2023-11-21 17:31:46 -05:00
parent 926517df91
commit 4fdac4d29f

View File

@ -103,7 +103,12 @@ inline void CoincidentAnalyzer::SetUpCanvas(){
sbUpdateTime->setValue(1); sbUpdateTime->setValue(1);
boxLayout->addWidget(sbUpdateTime, 0, 2); boxLayout->addWidget(sbUpdateTime, 0, 2);
connect(sbUpdateTime, &RSpinBox::valueChanged, this, [=](double sec){ SetUpdateTimeInSec(sec); }); connect(sbUpdateTime, &RSpinBox::valueChanged, this, [=](){ sbUpdateTime->setStyleSheet("color : blue"); });
connect(sbUpdateTime, &RSpinBox::returnPressed, this, [=](){
sbUpdateTime->setStyleSheet("");
SetUpdateTimeInSec(sbUpdateTime->value());
});
chkBackWardBuilding = new QCheckBox("Use Backward builder", this); chkBackWardBuilding = new QCheckBox("Use Backward builder", this);
boxLayout->addWidget(chkBackWardBuilding, 1, 0); boxLayout->addWidget(chkBackWardBuilding, 1, 0);
@ -123,10 +128,16 @@ inline void CoincidentAnalyzer::SetUpCanvas(){
connect(chkBackWardBuilding, &QCheckBox::stateChanged, this, [=](int status){ connect(chkBackWardBuilding, &QCheckBox::stateChanged, this, [=](int status){
SetBackwardBuild(status, sbBackwardCount->value()); SetBackwardBuild(status, sbBackwardCount->value());
sbBackwardCount->setEnabled(status); sbBackwardCount->setEnabled(status);
SetBackwardBuild(true, sbBackwardCount->value());
}); });
connect(sbBackwardCount, &RSpinBox::valueChanged, this, [=](double value){ connect(sbBackwardCount, &RSpinBox::valueChanged, this, [=](){
SetBackwardBuild(true, value); sbBackwardCount->setStyleSheet("color : blue;");
});
connect(sbBackwardCount, &RSpinBox::returnPressed, this, [=](){
sbBackwardCount->setStyleSheet("");
SetBackwardBuild(true, sbBackwardCount->value());
}); });
QLabel * lbBuildWindow = new QLabel("Event Window [tick]", this); QLabel * lbBuildWindow = new QLabel("Event Window [tick]", this);
@ -137,8 +148,13 @@ inline void CoincidentAnalyzer::SetUpCanvas(){
sbBuildWindow->setMaximum(9999999999); sbBuildWindow->setMaximum(9999999999);
boxLayout->addWidget(sbBuildWindow, 2, 2); boxLayout->addWidget(sbBuildWindow, 2, 2);
connect(sbBuildWindow, &RSpinBox::valueChanged, this, [=](double value){ connect(sbBuildWindow, &RSpinBox::valueChanged, this, [=](){
evtbder->SetTimeWindow((int)value); sbBuildWindow->setStyleSheet("color : blue;");
});
connect(sbBuildWindow, &RSpinBox::returnPressed, this, [=](){
sbBuildWindow->setStyleSheet("");
evtbder->SetTimeWindow((int)sbBuildWindow->value());
}); });
} }