tried to reduce the time to refresh measurement and settings tab

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@258 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
l_maliakal_d
2014-02-07 12:33:07 +00:00
parent 534be9f942
commit f768886308
3 changed files with 43 additions and 44 deletions

View File

@ -261,6 +261,11 @@ void qTabSettings::Refresh(){
cout << endl << "**Updating Settings Tab" << endl;
#endif
disconnect(comboSettings, SIGNAL(currentIndexChanged(int)), this, SLOT(setSettings(int)));
disconnect(spinNumModules, SIGNAL(valueChanged(int)), this, SLOT(SetNumberOfModules(int)));
disconnect(comboDynamicRange, SIGNAL(activated(int)), this, SLOT(SetDynamicRange(int)));
disconnect(spinThreshold, SIGNAL(valueChanged(int)), this, SLOT(SetEnergy()));
// Number of Modules
#ifdef VERBOSE
@ -290,11 +295,9 @@ void qTabSettings::Refresh(){
#ifdef VERBOSE
cout << "Getting settings" << endl;
#endif
disconnect(comboSettings, SIGNAL(currentIndexChanged(int)), this, SLOT(setSettings(int)));
int sett = (int)myDet->getSettings();
if(sett==-1) sett = slsDetectorDefs::UNDEFINED;
comboSettings->setCurrentIndex(sett);
connect(comboSettings, SIGNAL(currentIndexChanged(int)), this, SLOT(setSettings(int)));
//threshold
@ -309,11 +312,16 @@ void qTabSettings::Refresh(){
#ifdef VERBOSE
cout << "Getting threshold energy" << endl;
#endif
SetEnergy();
spinThreshold->setValue(myDet->getThresholdEnergy());
}
}
connect(comboSettings, SIGNAL(currentIndexChanged(int)), this, SLOT(setSettings(int)));
connect(spinNumModules, SIGNAL(valueChanged(int)), this, SLOT(SetNumberOfModules(int)));
connect(comboDynamicRange, SIGNAL(activated(int)), this, SLOT(SetDynamicRange(int)));
connect(spinThreshold, SIGNAL(valueChanged(int)), this, SLOT(SetEnergy()));
#ifdef VERBOSE
cout << "**Updated Settings Tab" << endl << endl;
#endif