mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-08 19:10:42 +02:00
Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer
This commit is contained in:
commit
22ef1cee8b
@ -38,7 +38,10 @@ void qTabSettings::SetupWidgetWindow(){
|
|||||||
detType=myDet->getDetectorsType();
|
detType=myDet->getDetectorsType();
|
||||||
|
|
||||||
// Settings
|
// Settings
|
||||||
|
if (detType != slsReceiverDefs::JUNGFRAUCTB) {
|
||||||
SetupDetectorSettings();
|
SetupDetectorSettings();
|
||||||
|
} else
|
||||||
|
comboSettings->setEnabled(false);
|
||||||
|
|
||||||
//threshold
|
//threshold
|
||||||
if((detType == slsDetectorDefs::MYTHEN) || (detType == slsDetectorDefs::EIGER))
|
if((detType == slsDetectorDefs::MYTHEN) || (detType == slsDetectorDefs::EIGER))
|
||||||
@ -104,8 +107,7 @@ void qTabSettings::SetupDetectorSettings(){
|
|||||||
int sett = (int)myDet->getSettings();cout<<"sett:"<<sett<<endl;
|
int sett = (int)myDet->getSettings();cout<<"sett:"<<sett<<endl;
|
||||||
qDefs::checkErrorMessage(myDet,"qTabSettings::SetupDetectorSettings");
|
qDefs::checkErrorMessage(myDet,"qTabSettings::SetupDetectorSettings");
|
||||||
if(sett==-1) sett = Undefined;
|
if(sett==-1) sett = Undefined;
|
||||||
if(detType == slsDetectorDefs::JUNGFRAUCTB && sett > slsDetectorDefs::UNDEFINED) sett = Uninitialized;
|
if(sett == slsDetectorDefs::UNDEFINED) sett = Undefined;
|
||||||
else if(sett == slsDetectorDefs::UNDEFINED) sett = Undefined;
|
|
||||||
else if(sett == slsDetectorDefs::UNINITIALIZED) sett = Uninitialized;
|
else if(sett == slsDetectorDefs::UNINITIALIZED) sett = Uninitialized;
|
||||||
// To be able to index items on a combo box
|
// To be able to index items on a combo box
|
||||||
model = qobject_cast<QStandardItemModel*>(comboSettings->model());
|
model = qobject_cast<QStandardItemModel*>(comboSettings->model());
|
||||||
@ -167,7 +169,6 @@ void qTabSettings::SetupDetectorSettings(){
|
|||||||
item[(int)VeryLowGain]->setEnabled(false);
|
item[(int)VeryLowGain]->setEnabled(false);
|
||||||
break;
|
break;
|
||||||
case slsDetectorDefs::JUNGFRAU:
|
case slsDetectorDefs::JUNGFRAU:
|
||||||
case slsDetectorDefs::JUNGFRAUCTB:
|
|
||||||
item[(int)Standard]->setEnabled(false);
|
item[(int)Standard]->setEnabled(false);
|
||||||
item[(int)Fast]->setEnabled(false);
|
item[(int)Fast]->setEnabled(false);
|
||||||
item[(int)HighGain]->setEnabled(false);
|
item[(int)HighGain]->setEnabled(false);
|
||||||
@ -208,6 +209,7 @@ void qTabSettings::SetupDetectorSettings(){
|
|||||||
|
|
||||||
void qTabSettings::Initialization(){
|
void qTabSettings::Initialization(){
|
||||||
// Settings
|
// Settings
|
||||||
|
if (detType != slsReceiverDefs::JUNGFRAUCTB)
|
||||||
connect(comboSettings, SIGNAL(currentIndexChanged(int)), this, SLOT(setSettings(int)));
|
connect(comboSettings, SIGNAL(currentIndexChanged(int)), this, SLOT(setSettings(int)));
|
||||||
// Number of Modules
|
// Number of Modules
|
||||||
connect(spinNumModules, SIGNAL(valueChanged(int)), this, SLOT(SetNumberOfModules(int)));
|
connect(spinNumModules, SIGNAL(valueChanged(int)), this, SLOT(SetNumberOfModules(int)));
|
||||||
@ -226,8 +228,7 @@ void qTabSettings::setSettings(int index){
|
|||||||
disconnect(comboSettings, SIGNAL(currentIndexChanged(int)), this, SLOT(setSettings(int)));
|
disconnect(comboSettings, SIGNAL(currentIndexChanged(int)), this, SLOT(setSettings(int)));
|
||||||
int sett = (int)myDet->getSettings();
|
int sett = (int)myDet->getSettings();
|
||||||
if(sett==-1) sett = Undefined;
|
if(sett==-1) sett = Undefined;
|
||||||
if(detType == slsDetectorDefs::JUNGFRAUCTB && sett > slsDetectorDefs::UNDEFINED) sett = Uninitialized;
|
if(sett == slsDetectorDefs::UNDEFINED) sett = Undefined;
|
||||||
else if(sett == slsDetectorDefs::UNDEFINED) sett = Undefined;
|
|
||||||
else if(sett == slsDetectorDefs::UNINITIALIZED) sett = Uninitialized;
|
else if(sett == slsDetectorDefs::UNINITIALIZED) sett = Uninitialized;
|
||||||
comboSettings->setCurrentIndex(sett);
|
comboSettings->setCurrentIndex(sett);
|
||||||
connect(comboSettings, SIGNAL(currentIndexChanged(int)), this, SLOT(setSettings(int)));
|
connect(comboSettings, SIGNAL(currentIndexChanged(int)), this, SLOT(setSettings(int)));
|
||||||
@ -320,6 +321,7 @@ void qTabSettings::Refresh(){
|
|||||||
cout << endl << "**Updating Settings Tab" << endl;
|
cout << endl << "**Updating Settings Tab" << endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (detType != slsReceiverDefs::JUNGFRAUCTB)
|
||||||
disconnect(comboSettings, SIGNAL(currentIndexChanged(int)), this, SLOT(setSettings(int)));
|
disconnect(comboSettings, SIGNAL(currentIndexChanged(int)), this, SLOT(setSettings(int)));
|
||||||
disconnect(spinNumModules, SIGNAL(valueChanged(int)), this, SLOT(SetNumberOfModules(int)));
|
disconnect(spinNumModules, SIGNAL(valueChanged(int)), this, SLOT(SetNumberOfModules(int)));
|
||||||
disconnect(spinThreshold, SIGNAL(valueChanged(int)), this, SLOT(SetEnergy()));
|
disconnect(spinThreshold, SIGNAL(valueChanged(int)), this, SLOT(SetEnergy()));
|
||||||
@ -339,17 +341,16 @@ void qTabSettings::Refresh(){
|
|||||||
GetDynamicRange();
|
GetDynamicRange();
|
||||||
|
|
||||||
// Settings
|
// Settings
|
||||||
|
if (detType != slsReceiverDefs::JUNGFRAUCTB) {
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
cout << "Getting settings" << endl;
|
cout << "Getting settings" << endl;
|
||||||
#endif
|
#endif
|
||||||
int sett = (int)myDet->getSettings();
|
int sett = (int)myDet->getSettings();
|
||||||
if(sett==-1) sett = Undefined;//slsDetectorDefs::UNDEFINED;
|
if(sett==-1) sett = Undefined;//slsDetectorDefs::UNDEFINED;
|
||||||
if(detType == slsDetectorDefs::JUNGFRAUCTB && sett > slsDetectorDefs::UNDEFINED) sett = Uninitialized;
|
if(sett == slsDetectorDefs::UNDEFINED) sett = Undefined;
|
||||||
else if(sett == slsDetectorDefs::UNDEFINED) sett = Undefined;
|
|
||||||
else if(sett == slsDetectorDefs::UNINITIALIZED) sett = Uninitialized;
|
else if(sett == slsDetectorDefs::UNINITIALIZED) sett = Uninitialized;
|
||||||
comboSettings->setCurrentIndex(sett);
|
comboSettings->setCurrentIndex(sett);
|
||||||
|
|
||||||
|
|
||||||
//threshold
|
//threshold
|
||||||
sett = comboSettings->currentIndex();
|
sett = comboSettings->currentIndex();
|
||||||
if((detType==slsDetectorDefs::MYTHEN)||(detType==slsDetectorDefs::EIGER)){
|
if((detType==slsDetectorDefs::MYTHEN)||(detType==slsDetectorDefs::EIGER)){
|
||||||
@ -365,8 +366,9 @@ void qTabSettings::Refresh(){
|
|||||||
spinThreshold->setValue(myDet->getThresholdEnergy());
|
spinThreshold->setValue(myDet->getThresholdEnergy());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (detType != slsReceiverDefs::JUNGFRAUCTB)
|
||||||
connect(comboSettings, SIGNAL(currentIndexChanged(int)), this, SLOT(setSettings(int)));
|
connect(comboSettings, SIGNAL(currentIndexChanged(int)), this, SLOT(setSettings(int)));
|
||||||
connect(spinNumModules, SIGNAL(valueChanged(int)), this, SLOT(SetNumberOfModules(int)));
|
connect(spinNumModules, SIGNAL(valueChanged(int)), this, SLOT(SetNumberOfModules(int)));
|
||||||
connect(spinThreshold, SIGNAL(valueChanged(int)), this, SLOT(SetEnergy()));
|
connect(spinThreshold, SIGNAL(valueChanged(int)), this, SLOT(SetEnergy()));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user