checking if probes or threshold ..shouldnt check if its the wrong detector unnecessary err printouts

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@225 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
l_maliakal_d 2013-08-12 12:21:49 +00:00
parent 440b244b66
commit eb48b1c492
5 changed files with 94 additions and 14 deletions

View File

@ -99,7 +99,7 @@
</rect> </rect>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>3</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">
@ -542,6 +542,44 @@
</layout> </layout>
</widget> </widget>
</widget> </widget>
<widget class="QWidget" name="page_11">
<widget class="QWidget" name="horizontalLayoutWidget_12">
<property name="geometry">
<rect>
<x>25</x>
<y>5</y>
<width>128</width>
<height>26</height>
</rect>
</property>
<layout class="QHBoxLayout" name="layoutSave_8">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QCheckBox" name="chkStatistics_2">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>&lt;nobr&gt;
Displays minimum, maximum and sum of values for each plot.
&lt;nobr&gt;</string>
</property>
<property name="text">
<string>Display Statistics</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</widget> </widget>
</widget> </widget>
<widget class="QGroupBox" name="box1D"> <widget class="QGroupBox" name="box1D">
@ -572,7 +610,7 @@
</rect> </rect>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>4</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="page"> <widget class="QWidget" name="page">
<widget class="QWidget" name="gridLayoutWidget_2"> <widget class="QWidget" name="gridLayoutWidget_2">
@ -1100,6 +1138,44 @@
</layout> </layout>
</widget> </widget>
</widget> </widget>
<widget class="QWidget" name="page_10">
<widget class="QWidget" name="horizontalLayoutWidget_9">
<property name="geometry">
<rect>
<x>25</x>
<y>5</y>
<width>128</width>
<height>26</height>
</rect>
</property>
<layout class="QHBoxLayout" name="layoutSave_7">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QCheckBox" name="chkStatistics">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>&lt;nobr&gt;
Displays minimum, maximum and sum of values for each plot.
&lt;nobr&gt;</string>
</property>
<property name="text">
<string>Display Statistics</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</widget> </widget>
</widget> </widget>
<widget class="QGroupBox" name="boxSave"> <widget class="QGroupBox" name="boxSave">

View File

@ -107,11 +107,11 @@ void qDetectorMain::SetUpWidgetWindow(){
tab_plot = new qTabPlot (this, myDet,myPlot); cout<<"Plot ready"<<endl; tab_plot = new qTabPlot (this, myDet,myPlot); cout<<"Plot ready"<<endl;
tab_actions = new qTabActions (this, myDet); cout<<"Actions ready"<<endl; tab_actions = new qTabActions (this, myDet); cout<<"Actions ready"<<endl;
tab_settings = new qTabSettings (this, myDet); cout<<"Settings ready"<<endl; tab_settings = new qTabSettings (this, myDet); cout<<"Settings ready"<<endl;
tab_advanced = new qTabAdvanced (this, myDet,myPlot);cout<<"Advanced ready"<<endl; tab_advanced = new qTabAdvanced (this, myDet,myPlot); cout<<"Advanced ready"<<endl;
tab_debugging = new qTabDebugging (this, myDet); cout<<"Debugging ready"<<endl; tab_debugging = new qTabDebugging (this, myDet); cout<<"Debugging ready"<<endl;
tab_developer = new qTabDeveloper (this, myDet); cout<<"Developer ready"<<endl; tab_developer = new qTabDeveloper (this, myDet); cout<<"Developer ready"<<endl;
myServer = new qServer(this); myServer = new qServer(this); cout<<"Client Server ready"<<endl;
// creating the scroll area widgets for the tabs // creating the scroll area widgets for the tabs
for(int i=0;i<NumberOfTabs;i++){ for(int i=0;i<NumberOfTabs;i++){

View File

@ -73,6 +73,7 @@ void qDrawPlot::SetupWidgetWindow(){
} }
//initialization
data_pause_over = true;//to get the first image data_pause_over = true;//to get the first image
currentMeasurement = 0; currentMeasurement = 0;
@ -91,7 +92,6 @@ void qDrawPlot::SetupWidgetWindow(){
pthread_mutex_init(&last_image_complete_mutex,NULL); pthread_mutex_init(&last_image_complete_mutex,NULL);
// Default titles- only for the initial picture // Default titles- only for the initial picture
imageXAxisTitle="Pixel"; imageXAxisTitle="Pixel";
imageYAxisTitle="Pixel"; imageYAxisTitle="Pixel";
imageZAxisTitle="Intensity"; imageZAxisTitle="Intensity";
@ -104,7 +104,6 @@ void qDrawPlot::SetupWidgetWindow(){
//histTitle[i] = temp_title; //histTitle[i] = temp_title;
} }
imageTitle=""; imageTitle="";
/*imageTitle.assign("Start Image");*/
plotTitle = ""; plotTitle = "";
plotTitle_prefix = ""; plotTitle_prefix = "";
plot_in_scope = 0; plot_in_scope = 0;
@ -196,7 +195,8 @@ void qDrawPlot::SetupWidgetWindow(){
binaryFrom = 0; binaryFrom = 0;
binaryTo = 0; binaryTo = 0;
//widget related initialization
//widget related initialization
// clone // clone
for(int i=0;i<MAXCloneWindows;i++) winClone[i]=0; for(int i=0;i<MAXCloneWindows;i++) winClone[i]=0;
@ -264,7 +264,7 @@ void qDrawPlot::SetupWidgetWindow(){
plotLayout->addWidget(plot2D,0,0,1,1); plotLayout->addWidget(plot2D,0,0,1,1);
//callbacks //callbacks
// Setting the callback function to get data from detector class // Setting the callback function to get data from detector class
myDet->registerDataCallback(&(GetDataCallBack),this); myDet->registerDataCallback(&(GetDataCallBack),this);

View File

@ -69,6 +69,7 @@ void qTabMeasurement::SetupWidgetWindow(){
//gates //gates
spinNumGates->setValue((int)myDet->setTimer(slsDetectorDefs::GATES_NUMBER,-1)); spinNumGates->setValue((int)myDet->setTimer(slsDetectorDefs::GATES_NUMBER,-1));
//probes //probes
if(myDet->getDetectorsType() == slsDetectorDefs::MYTHEN)
spinNumProbes->setValue((int)myDet->setTimer(slsDetectorDefs::PROBES_NUMBER,-1)); spinNumProbes->setValue((int)myDet->setTimer(slsDetectorDefs::PROBES_NUMBER,-1));
//File Name //File Name
dispFileName->setText(QString(myDet->getFileName().c_str())); dispFileName->setText(QString(myDet->getFileName().c_str()));
@ -820,11 +821,12 @@ void qTabMeasurement::Refresh(){
#endif #endif
//probes //probes
if(myDet->getDetectorsType() == slsDetectorDefs::MYTHEN){
spinNumProbes->setValue((int)myDet->setTimer(slsDetectorDefs::PROBES_NUMBER,-1)); spinNumProbes->setValue((int)myDet->setTimer(slsDetectorDefs::PROBES_NUMBER,-1));
#ifdef VERBOSE #ifdef VERBOSE
cout << "Getting number of probes" << endl; cout << "Getting number of probes" << endl;
#endif #endif
}
//File Name //File Name
dispFileName->setText(QString(myDet->getFileName().c_str())); dispFileName->setText(QString(myDet->getFileName().c_str()));
#ifdef VERBOSE #ifdef VERBOSE
@ -889,6 +891,7 @@ void qTabMeasurement::EnableProbes(){
return; return;
} }
cout << "Probes not enabled" << endl; cout << "Probes not enabled" << endl;
if(myDet->getDetectorsType()==slsDetectorDefs::MYTHEN)
spinNumProbes->setValue(0); spinNumProbes->setValue(0);
lblNumProbes->setEnabled(false); lblNumProbes->setEnabled(false);
spinNumProbes->setEnabled(false); spinNumProbes->setEnabled(false);

View File

@ -46,6 +46,7 @@ void qTabSettings::SetupWidgetWindow(){
comboSettings->setCurrentIndex(sett); comboSettings->setCurrentIndex(sett);
//threshold //threshold
if((detType == slsDetectorDefs::MYTHEN) || (detType == slsDetectorDefs::EIGER))
spinThreshold->setValue(myDet->getThresholdEnergy()); spinThreshold->setValue(myDet->getThresholdEnergy());
//expert mode is not enabled initially //expert mode is not enabled initially