gap pixels included in gui

This commit is contained in:
2018-04-09 11:13:20 +02:00
parent 649cb0aed9
commit 9847729f3c
3 changed files with 83 additions and 9 deletions

View File

@ -156,9 +156,6 @@ void qTabPlot::SetupWidgetWindow(){
stackedWidget->setCurrentIndex(0);
stackedWidget_2->setCurrentIndex(0);
//gain plot
chkGainPlot->setEnabled(false);
// Depending on whether the detector is 1d or 2d
switch(myDet->getDetectorsType()){
case slsDetectorDefs::MYTHEN:
@ -174,6 +171,7 @@ void qTabPlot::SetupWidgetWindow(){
pagePedestal_2->setEnabled(false);
chkBinary->setEnabled(false);
chkBinary_2->setEnabled(false);
chkGapPixels->setEnabled(true);
break;
case slsDetectorDefs::GOTTHARD:
isOriginallyOneD = true;
@ -202,6 +200,12 @@ void qTabPlot::SetupWidgetWindow(){
//disable histogram initially
boxHistogram->hide();
if (chkGapPixels->isEnabled()) {
int ret = myDet->enableGapPixels(-1);
qDefs::checkErrorMessage(myDet,"qTabPlot::SetupWidgetWindow");
chkGapPixels->setChecked((ret == 1) ? true : false);
}
qDefs::checkErrorMessage(myDet,"qTabPlot::SetupWidgetWindow");
}
@ -376,6 +380,10 @@ void qTabPlot::Initialization(){
//gainplot
if (chkGainPlot->isEnabled())
connect(chkGainPlot, SIGNAL(toggled(bool)),myPlot, SIGNAL(GainPlotSignal(bool)));
// gap pixels
if (chkGapPixels->isEnabled())
connect(chkGapPixels, SIGNAL(toggled(bool)),this, SLOT(EnableGapPixels(bool)));
}
@ -1471,6 +1479,24 @@ void qTabPlot::SetHistogramOptions(){
//-------------------------------------------------------------------------------------------------------------------------------------------------
void qTabPlot::EnableGapPixels(bool enable) {
#ifdef VERBOSE
cout << "Setting Gap pixels to " << enable << endl;
#endif
disconnect(chkGapPixels, SIGNAL(toggled(bool)),this, SLOT(EnableGapPixels(bool)));
myDet->enableGapPixels(enable);
int ret = myDet->enableGapPixels(-1);
qDefs::checkErrorMessage(myDet,"qTabPlot::SetScanArgument");
chkGapPixels->setChecked((ret == 1) ? true : false);
connect(chkGapPixels, SIGNAL(toggled(bool)),this, SLOT(EnableGapPixels(bool)));
}
//-------------------------------------------------------------------------------------------------------------------------------------------------
@ -1487,6 +1513,14 @@ void qTabPlot::Refresh(){
comboFrequency->setCurrentIndex(1);*/
SetFrequency();
if (chkGapPixels->isEnabled()) {
disconnect(chkGapPixels, SIGNAL(toggled(bool)),this, SLOT(EnableGapPixels(bool)));
int ret = myDet->enableGapPixels(-1);
qDefs::checkErrorMessage(myDet,"qTabPlot::Refresh");
chkGapPixels->setChecked((ret == 1) ? true : false);
connect(chkGapPixels, SIGNAL(toggled(bool)),this, SLOT(EnableGapPixels(bool)));
}
}else{
boxFrequency->setEnabled(false);
disconnect(boxScan, SIGNAL(toggled(bool)), this, SLOT(EnableScanBox()));