included setroi for multidet

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@145 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
l_maliakal_d
2013-02-21 16:00:44 +00:00
parent f3eb9c924f
commit 4814962347
6 changed files with 473 additions and 152 deletions

View File

@ -39,7 +39,9 @@ void qTabSettings::SetupWidgetWindow(){
// Settings
SetupDetectorSettings();
comboSettings->setCurrentIndex(myDet->getSettings());
int sett = (int)myDet->getSettings();
if(sett==-1) sett = slsDetectorDefs::UNDEFINED;
comboSettings->setCurrentIndex(sett);
//threshold
spinThreshold->setValue(myDet->getThresholdEnergy());
@ -69,6 +71,7 @@ void qTabSettings::SetupWidgetWindow(){
void qTabSettings::SetupDetectorSettings(){
// Get detector settings from detector
slsDetectorDefs::detectorSettings sett = myDet->getSettings();
if(sett==-1) sett = slsDetectorDefs::UNDEFINED;
// To be able to index items on a combo box
model = qobject_cast<QStandardItemModel*>(comboSettings->model());
if (model) {
@ -145,7 +148,9 @@ void qTabSettings::setSettings(int index){
if((index==Undefined)||(index==Uninitialized)){
qDefs::Message(qDefs::WARNING,"Cannot change settings to Undefined or Uninitialized.","Settings");
disconnect(comboSettings, SIGNAL(currentIndexChanged(int)), this, SLOT(setSettings(int)));
comboSettings->setCurrentIndex((int)myDet->getSettings());
int sett = (int)myDet->getSettings();
if(sett==-1) sett = slsDetectorDefs::UNDEFINED;
comboSettings->setCurrentIndex(sett);
connect(comboSettings, SIGNAL(currentIndexChanged(int)), this, SLOT(setSettings(int)));
}
@ -268,12 +273,14 @@ void qTabSettings::Refresh(){
cout << "Getting settings" << endl;
#endif
disconnect(comboSettings, SIGNAL(currentIndexChanged(int)), this, SLOT(setSettings(int)));
comboSettings->setCurrentIndex((int)myDet->getSettings());
int sett = (int)myDet->getSettings();
if(sett==-1) sett = slsDetectorDefs::UNDEFINED;
comboSettings->setCurrentIndex(sett);
connect(comboSettings, SIGNAL(currentIndexChanged(int)), this, SLOT(setSettings(int)));
//threshold
int sett = comboSettings->currentIndex();
sett = comboSettings->currentIndex();
if((detType==slsDetectorDefs::MYTHEN)||(detType==slsDetectorDefs::EIGER)){
if((sett==Undefined)||(sett==Uninitialized)){
lblThreshold->setEnabled(false);