mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 07:20:01 +02:00
included shortframe in gui for time being its just adc selection
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@141 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
parent
2ead554b7b
commit
6b311f931b
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>775</width>
|
<width>775</width>
|
||||||
<height>345</height>
|
<height>351</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -35,15 +35,135 @@
|
|||||||
<iconset resource="../include/icons.qrc">
|
<iconset resource="../include/icons.qrc">
|
||||||
<normaloff>:/icons/images/refresh.png</normaloff>:/icons/images/refresh.png</iconset>
|
<normaloff>:/icons/images/refresh.png</normaloff>:/icons/images/refresh.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>5</x>
|
||||||
|
<y>5</y>
|
||||||
|
<width>761</width>
|
||||||
|
<height>341</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="tab_3">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Trimming</string>
|
||||||
|
</attribute>
|
||||||
|
<widget class="QGroupBox" name="boxPlot">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>5</x>
|
||||||
|
<y>10</y>
|
||||||
|
<width>746</width>
|
||||||
|
<height>66</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Trimbits Plot</string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="horizontalLayoutWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>510</x>
|
||||||
|
<y>15</y>
|
||||||
|
<width>211</width>
|
||||||
|
<height>44</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>17</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btnRefresh">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><nobr>
|
||||||
|
Updates plot with Trimbits from Shared Memory, not from Detector.
|
||||||
|
</nobr></string>
|
||||||
|
</property>
|
||||||
|
<property name="autoFillBackground">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Refresh </string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../include/icons.qrc">
|
||||||
|
<normaloff>:/icons/images/refresh.png</normaloff>:/icons/images/refresh.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>16</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btnGetTrimbits">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><nobr>
|
||||||
|
Plots Trimbits from Detector. This will take time.
|
||||||
|
</nobr></string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Get Trimbits </string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../include/icons.qrc">
|
||||||
|
<normaloff>:/icons/images/download.png</normaloff>:/icons/images/download.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="gridLayoutWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>25</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>187</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QRadioButton" name="radioDataGraph">
|
||||||
|
<property name="text">
|
||||||
|
<string>Data Graph</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QRadioButton" name="radioHistogram">
|
||||||
|
<property name="text">
|
||||||
|
<string>Histogram</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
<widget class="QGroupBox" name="boxTrimming">
|
<widget class="QGroupBox" name="boxTrimming">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>25</x>
|
<x>5</x>
|
||||||
<y>100</y>
|
<y>85</y>
|
||||||
<width>726</width>
|
<width>746</width>
|
||||||
<height>226</height>
|
<height>226</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -65,7 +185,7 @@
|
|||||||
<widget class="QWidget" name="gridLayoutWidget_3">
|
<widget class="QWidget" name="gridLayoutWidget_3">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>15</x>
|
<x>25</x>
|
||||||
<y>25</y>
|
<y>25</y>
|
||||||
<width>696</width>
|
<width>696</width>
|
||||||
<height>195</height>
|
<height>195</height>
|
||||||
@ -552,128 +672,28 @@ An extension given by the modules serial number will be attached.
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QGroupBox" name="boxPlot">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>25</x>
|
|
||||||
<y>10</y>
|
|
||||||
<width>341</width>
|
|
||||||
<height>76</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Trimbits Plot</string>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="horizontalLayoutWidget">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>120</x>
|
|
||||||
<y>22</y>
|
|
||||||
<width>211</width>
|
|
||||||
<height>44</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>17</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="btnRefresh">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><nobr>
|
|
||||||
Updates plot with Trimbits from Shared Memory, not from Detector.
|
|
||||||
</nobr></string>
|
|
||||||
</property>
|
|
||||||
<property name="autoFillBackground">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Refresh </string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../include/icons.qrc">
|
|
||||||
<normaloff>:/icons/images/refresh.png</normaloff>:/icons/images/refresh.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>16</width>
|
|
||||||
<height>16</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="btnGetTrimbits">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><nobr>
|
|
||||||
Plots Trimbits from Detector. This will take time.
|
|
||||||
</nobr></string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Get Trimbits </string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../include/icons.qrc">
|
|
||||||
<normaloff>:/icons/images/download.png</normaloff>:/icons/images/download.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="gridLayoutWidget">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>15</x>
|
|
||||||
<y>20</y>
|
|
||||||
<width>101</width>
|
|
||||||
<height>46</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QRadioButton" name="radioHistogram">
|
|
||||||
<property name="text">
|
|
||||||
<string>Histogram</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QRadioButton" name="radioDataGraph">
|
|
||||||
<property name="text">
|
|
||||||
<string>Data Graph</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab_4">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Logs</string>
|
||||||
|
</attribute>
|
||||||
<widget class="QGroupBox" name="boxLogs">
|
<widget class="QGroupBox" name="boxLogs">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>405</x>
|
<x>5</x>
|
||||||
<y>10</y>
|
<y>10</y>
|
||||||
<width>346</width>
|
<width>746</width>
|
||||||
<height>76</height>
|
<height>66</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Calibration Logs</string>
|
<string>Calibration Logs</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="horizontalLayoutWidget_2">
|
<widget class="QWidget" name="horizontalLayoutWidget_2">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>420</x>
|
<x>25</x>
|
||||||
<y>37</y>
|
<y>20</y>
|
||||||
<width>313</width>
|
<width>313</width>
|
||||||
<height>31</height>
|
<height>31</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -711,6 +731,79 @@ Plots Trimbits from Detector. This will take time.
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab_5">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Readout</string>
|
||||||
|
</attribute>
|
||||||
|
<widget class="QWidget" name="horizontalLayoutWidget_3">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>10</y>
|
||||||
|
<width>136</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>42</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="lblADC">
|
||||||
|
<property name="text">
|
||||||
|
<string>ADC:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="comboADC">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>0</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>1</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>2</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>3</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>4</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>All</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../include/icons.qrc"/>
|
<include location="../include/icons.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -56,6 +56,11 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
|
/** Set ADC Readout
|
||||||
|
*/
|
||||||
|
void SetADCReadout(int i);
|
||||||
|
|
||||||
/** Enable/Disable Energy and Calibration Logs
|
/** Enable/Disable Energy and Calibration Logs
|
||||||
*/
|
*/
|
||||||
void SetLogs();
|
void SetLogs();
|
||||||
@ -102,6 +107,10 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
/** The sls detector object */
|
/** The sls detector object */
|
||||||
multiSlsDetector *myDet;
|
multiSlsDetector *myDet;
|
||||||
|
|
||||||
|
/** detector type */
|
||||||
|
slsDetectorDefs::detectorType detType;
|
||||||
|
|
||||||
/** The Plot widget */
|
/** The Plot widget */
|
||||||
qDrawPlot *myPlot;
|
qDrawPlot *myPlot;
|
||||||
|
|
||||||
|
@ -40,11 +40,22 @@ qTabAdvanced::~qTabAdvanced(){
|
|||||||
|
|
||||||
void qTabAdvanced::SetupWidgetWindow(){
|
void qTabAdvanced::SetupWidgetWindow(){
|
||||||
//executed even for non digital, so make sure its necessary
|
//executed even for non digital, so make sure its necessary
|
||||||
slsDetectorDefs::detectorType detType = myDet->getDetectorsType();
|
|
||||||
|
//readout adc
|
||||||
|
lblADC->setEnabled(false);
|
||||||
|
comboADC->setEnabled(false);
|
||||||
|
|
||||||
|
detType = myDet->getDetectorsType();
|
||||||
switch(detType){
|
switch(detType){
|
||||||
case slsDetectorDefs::MYTHEN: isEnergy = true; isAngular = true; break;
|
case slsDetectorDefs::MYTHEN: isEnergy = true; isAngular = true; break;
|
||||||
case slsDetectorDefs::EIGER: isEnergy = true; isAngular = false; break;
|
case slsDetectorDefs::EIGER: isEnergy = true; isAngular = false; break;
|
||||||
case slsDetectorDefs::GOTTHARD: isEnergy = false; isAngular = true; break;
|
|
||||||
|
case slsDetectorDefs::GOTTHARD:
|
||||||
|
isEnergy = false;
|
||||||
|
isAngular = true;
|
||||||
|
lblADC->setEnabled(true);
|
||||||
|
comboADC->setEnabled(true);
|
||||||
|
break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,6 +129,21 @@ void qTabAdvanced::Initialization(){
|
|||||||
connect(btnGroup, SIGNAL(buttonClicked(int)), this, SLOT(UpdateTrimbitPlot(int)));
|
connect(btnGroup, SIGNAL(buttonClicked(int)), this, SLOT(UpdateTrimbitPlot(int)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(detType==slsDetectorDefs::GOTTHARD)
|
||||||
|
connect(comboADC, SIGNAL(currentIndexChanged(int)), this, SLOT(SetADCReadout(int)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
void qTabAdvanced::SetADCReadout(int i){
|
||||||
|
|
||||||
|
if(i==6) i=-1;
|
||||||
|
if(myDet->configureMAC(i)==slsDetectorDefs::FAIL)
|
||||||
|
qDefs::Message(qDefs::WARNING,"Could not configure mac","Advanced");
|
||||||
|
else
|
||||||
|
qDefs::Message(qDefs::WARNING,"ADC Readout successfully set up","Advanced");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user