mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 15:20:02 +02:00
gap pixels included in gui
This commit is contained in:
parent
649cb0aed9
commit
9847729f3c
@ -99,7 +99,7 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>4</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="page_6">
|
<widget class="QWidget" name="page_6">
|
||||||
<widget class="QWidget" name="gridLayoutWidget_5">
|
<widget class="QWidget" name="gridLayoutWidget_5">
|
||||||
@ -548,7 +548,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>25</x>
|
<x>25</x>
|
||||||
<y>5</y>
|
<y>5</y>
|
||||||
<width>314</width>
|
<width>335</width>
|
||||||
<height>26</height>
|
<height>26</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -587,7 +587,7 @@ Displays minimum, maximum and sum of values for each plot.
|
|||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>100</width>
|
<width>10</width>
|
||||||
<height>10</height>
|
<height>10</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@ -596,7 +596,7 @@ Displays minimum, maximum and sum of values for each plot.
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="chkGainPlot">
|
<widget class="QCheckBox" name="chkGainPlot">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
@ -614,6 +614,43 @@ Displays minimum, maximum and sum of values for each plot.
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_22">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>10</width>
|
||||||
|
<height>10</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="chkGapPixels">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><nobr>
|
||||||
|
Displays minimum, maximum and sum of values for each plot.
|
||||||
|
<nobr></string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Gap Pixels</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
@ -1695,7 +1732,7 @@ Displays minimum, maximum and sum of values for each plot.
|
|||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>20</y>
|
<y>20</y>
|
||||||
<width>331</width>
|
<width>357</width>
|
||||||
<height>26</height>
|
<height>26</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -2522,7 +2559,7 @@ Interval between plots has 2 modes. A condition to be satisfied, in order to avo
|
|||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>12</y>
|
<y>12</y>
|
||||||
<width>331</width>
|
<width>365</width>
|
||||||
<height>36</height>
|
<height>36</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -174,6 +174,9 @@ private slots:
|
|||||||
/** Set histogram options */
|
/** Set histogram options */
|
||||||
void SetHistogramOptions();
|
void SetHistogramOptions();
|
||||||
|
|
||||||
|
/** Enable Gap pixels */
|
||||||
|
void EnableGapPixels(bool enable);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void DisableZoomSignal(bool);
|
void DisableZoomSignal(bool);
|
||||||
void ResetZMinZMaxSignal(bool,bool,double,double);
|
void ResetZMinZMaxSignal(bool,bool,double,double);
|
||||||
|
@ -156,9 +156,6 @@ void qTabPlot::SetupWidgetWindow(){
|
|||||||
stackedWidget->setCurrentIndex(0);
|
stackedWidget->setCurrentIndex(0);
|
||||||
stackedWidget_2->setCurrentIndex(0);
|
stackedWidget_2->setCurrentIndex(0);
|
||||||
|
|
||||||
//gain plot
|
|
||||||
chkGainPlot->setEnabled(false);
|
|
||||||
|
|
||||||
// Depending on whether the detector is 1d or 2d
|
// Depending on whether the detector is 1d or 2d
|
||||||
switch(myDet->getDetectorsType()){
|
switch(myDet->getDetectorsType()){
|
||||||
case slsDetectorDefs::MYTHEN:
|
case slsDetectorDefs::MYTHEN:
|
||||||
@ -174,6 +171,7 @@ void qTabPlot::SetupWidgetWindow(){
|
|||||||
pagePedestal_2->setEnabled(false);
|
pagePedestal_2->setEnabled(false);
|
||||||
chkBinary->setEnabled(false);
|
chkBinary->setEnabled(false);
|
||||||
chkBinary_2->setEnabled(false);
|
chkBinary_2->setEnabled(false);
|
||||||
|
chkGapPixels->setEnabled(true);
|
||||||
break;
|
break;
|
||||||
case slsDetectorDefs::GOTTHARD:
|
case slsDetectorDefs::GOTTHARD:
|
||||||
isOriginallyOneD = true;
|
isOriginallyOneD = true;
|
||||||
@ -202,6 +200,12 @@ void qTabPlot::SetupWidgetWindow(){
|
|||||||
//disable histogram initially
|
//disable histogram initially
|
||||||
boxHistogram->hide();
|
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");
|
qDefs::checkErrorMessage(myDet,"qTabPlot::SetupWidgetWindow");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -376,6 +380,10 @@ void qTabPlot::Initialization(){
|
|||||||
//gainplot
|
//gainplot
|
||||||
if (chkGainPlot->isEnabled())
|
if (chkGainPlot->isEnabled())
|
||||||
connect(chkGainPlot, SIGNAL(toggled(bool)),myPlot, SIGNAL(GainPlotSignal(bool)));
|
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);*/
|
comboFrequency->setCurrentIndex(1);*/
|
||||||
SetFrequency();
|
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{
|
}else{
|
||||||
boxFrequency->setEnabled(false);
|
boxFrequency->setEnabled(false);
|
||||||
disconnect(boxScan, SIGNAL(toggled(bool)), this, SLOT(EnableScanBox()));
|
disconnect(boxScan, SIGNAL(toggled(bool)), this, SLOT(EnableScanBox()));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user