diff --git a/slsDetectorGui/src/qActionsWidget.cpp b/slsDetectorGui/src/qActionsWidget.cpp index 465fed646..6781128c1 100644 --- a/slsDetectorGui/src/qActionsWidget.cpp +++ b/slsDetectorGui/src/qActionsWidget.cpp @@ -96,7 +96,7 @@ void qActionsWidget::SetMode(int mode){ } } } - + qDefs::checkErrorMessage(myDet); } @@ -167,6 +167,8 @@ void qActionsWidget::SetScriptFile(){ //dont display if theres a none if(!dispScript->text().compare("none")) dispScript->setText(""); + qDefs::checkErrorMessage(myDet); + } @@ -181,6 +183,8 @@ void qActionsWidget::SetParameter(){ myDet->setActionParameter(id,parameter.toAscii().constData()); //dont display if theres a none if(!dispParameter->text().compare("none")) dispParameter->setText(""); + + qDefs::checkErrorMessage(myDet); } @@ -207,6 +211,8 @@ void qActionsWidget::Refresh(){ "script:" << script << "\t" "parameter:" << parameter << "\t***" << endl; #endif + + qDefs::checkErrorMessage(myDet); } diff --git a/slsDetectorGui/src/qTabDataOutput.cpp b/slsDetectorGui/src/qTabDataOutput.cpp index 1e8be365a..edede74c3 100644 --- a/slsDetectorGui/src/qTabDataOutput.cpp +++ b/slsDetectorGui/src/qTabDataOutput.cpp @@ -110,6 +110,7 @@ void qTabDataOutput::SetupWidgetWindow(){ if(myDet->getBadChannelCorrection()) chkDiscardBad->setChecked(true); + qDefs::checkErrorMessage(myDet); } @@ -152,9 +153,12 @@ void qTabDataOutput::setOutputDir(){ if(myDet->setReceiverOnline()==slsDetectorDefs::ONLINE_FLAG){ for(int i=0;igetNumberOfDetectors();i++){ slsDetector *det = myDet->getSlsDetector(i); + qDefs::checkErrorMessage(myDet); det->setFilePath(string(path.toAscii().constData())); + qDefs::checkErrorMessage(det); if(det->getFilePath()!=(string(path.toAscii().constData()))){ error=true; + qDefs::checkErrorMessage(det); break; } } @@ -162,7 +166,9 @@ void qTabDataOutput::setOutputDir(){ //set it back for the ones which got set for(int i=0;igetNumberOfDetectors();i++){ slsDetector *det = myDet->getSlsDetector(i); + qDefs::checkErrorMessage(myDet); det->setFilePath(oldPath); + qDefs::checkErrorMessage(det); } }//set it in multi as well if it worked so that they reflect the same else @@ -199,6 +205,8 @@ void qTabDataOutput::setOutputDir(){ } connect(dispOutputDir, SIGNAL(editingFinished()), this, SLOT(setOutputDir())); + + qDefs::checkErrorMessage(myDet); } @@ -286,6 +294,8 @@ void qTabDataOutput::SetFlatField(){ } connect(dispFlatField,SIGNAL(editingFinished()),this,SLOT(SetFlatField())); + + qDefs::checkErrorMessage(myDet); } //------------------------------------------------------------------------------------------------------------------------------------------------- @@ -314,12 +324,13 @@ void qTabDataOutput::UpdateFlatFieldFromServer(){ chkFlatField->setText("Flat Field File:"); connect(dispFlatField, SIGNAL(editingFinished()), this, SLOT(SetFlatField())); + + qDefs::checkErrorMessage(myDet); } //------------------------------------------------------------------------------------------------------------------------------------------------- -void qTabDataOutput::BrowseFlatFieldPath() -{ +void qTabDataOutput::BrowseFlatFieldPath(){ QString fName = dispFlatField->text(); QString dir = fName.section('/',0,-2,QString::SectionIncludeLeadingSep); if(dir.isEmpty()) dir = QString(myDet->getFlatFieldCorrectionDir().c_str());/*"/home/";*/ @@ -330,6 +341,8 @@ void qTabDataOutput::BrowseFlatFieldPath() dispFlatField->setText(fName); SetFlatField(); } + + qDefs::checkErrorMessage(myDet); } @@ -381,6 +394,8 @@ void qTabDataOutput::SetRateCorrection(){ connect(radioAuto, SIGNAL(toggled(bool)), this, SLOT(SetRateCorrection())); connect(radioDeadTime, SIGNAL(toggled(bool)), this, SLOT(SetRateCorrection())); connect(spinDeadTime, SIGNAL(valueChanged(double)), this, SLOT(SetRateCorrection())); + + qDefs::checkErrorMessage(myDet); } @@ -395,6 +410,7 @@ void qTabDataOutput::UpdateRateCorrectionFromServer(){ double rate; rate = (double)myDet->getRateCorrectionTau(); + qDefs::checkErrorMessage(myDet); #ifdef VERBOSE cout << "Getting rate correction from server:" << rate << " : "; #endif @@ -461,6 +477,8 @@ void qTabDataOutput::SetAngularCorrection(){ } emit AngularConversionSignal(chkAngular->isChecked()); + + qDefs::checkErrorMessage(myDet); } @@ -482,6 +500,8 @@ void qTabDataOutput::DiscardBadChannels(){ cout << "Unsetting bad channel correction" << endl; #endif } + + qDefs::checkErrorMessage(myDet); } @@ -552,6 +572,8 @@ void qTabDataOutput::Refresh(){ #ifdef VERBOSE cout << "**Updated DataOutput Tab" << endl << endl; #endif + + qDefs::checkErrorMessage(myDet); } diff --git a/slsDetectorGui/src/qTabDebugging.cpp b/slsDetectorGui/src/qTabDebugging.cpp index 2aec64dc1..efb72a83a 100644 --- a/slsDetectorGui/src/qTabDebugging.cpp +++ b/slsDetectorGui/src/qTabDebugging.cpp @@ -91,6 +91,7 @@ void qTabDebugging::SetupWidgetWindow(){ if(detType==slsDetectorDefs::MYTHEN) UpdateModuleList(); UpdateStatus(); + qDefs::checkErrorMessage(myDet); } //------------------------------------------------------------------------------------------------------------------------------------------------- @@ -115,6 +116,7 @@ void qTabDebugging::UpdateModuleList(){ cout << "Getting Module List" << endl; #endif det = myDet->getSlsDetector(comboDetector->currentIndex()); + qDefs::checkErrorMessage(myDet); //deletes all modules except "all modules" for(int i=0;icount()-1;i++) comboModule->removeItem(i); @@ -122,6 +124,7 @@ void qTabDebugging::UpdateModuleList(){ comboModule->addItem(QString("Module %1").arg(i)); } + qDefs::checkErrorMessage(det); } @@ -133,11 +136,12 @@ void qTabDebugging::UpdateStatus(){ cout << "Getting Status" << endl; #endif det = myDet->getSlsDetector(comboDetector->currentIndex()); + qDefs::checkErrorMessage(myDet); int detStatus = (int)det->getRunStatus(); string status = slsDetectorBase::runStatusType(slsDetectorDefs::runStatus(detStatus)); lblStatus->setText(QString(status.c_str()).toUpper()); - + qDefs::checkErrorMessage(det); } @@ -204,9 +208,11 @@ void qTabDebugging::GetInfo(){ for (int i=0;icount();i++){ QList childItems; det = myDet->getSlsDetector(i); + qDefs::checkErrorMessage(myDet); for(int j=0;jgetNMods();j++) childItems.append(new QTreeWidgetItem((QTreeWidget*)0, QStringList(QString("Module %1").arg(j)))); treeDet->topLevelItem(i)->insertChildren(0,childItems); + qDefs::checkErrorMessage(det); } break; @@ -305,6 +311,7 @@ void qTabDebugging::SetParameters(QTreeWidgetItem *item){ break; det = myDet->getSlsDetector(i); + qDefs::checkErrorMessage(myDet); lblDetectorId->setText(comboDetector->itemText(i)); sprintf(value,"%llx",det->getId(slsDetectorDefs::DETECTOR_SERIAL_NUMBER)); lblDetectorSerial->setText(QString(value)); @@ -312,6 +319,7 @@ void qTabDebugging::SetParameters(QTreeWidgetItem *item){ lblDetectorFirmware ->setText(QString(value)); sprintf(value,"%llx",det->getId(slsDetectorDefs::DETECTOR_SOFTWARE_VERSION)); lblDetectorSoftware->setText(QString(value)); + qDefs::checkErrorMessage(det); lblModuleId->setText(""); lblModuleSerial->setText(""); @@ -324,6 +332,7 @@ void qTabDebugging::SetParameters(QTreeWidgetItem *item){ int im = item->parent()->indexOfChild(item); det = myDet->getSlsDetector(i); + qDefs::checkErrorMessage(myDet); lblDetectorId->setText(comboDetector->itemText(i)); sprintf(value,"%llx",det->getId(slsDetectorDefs::DETECTOR_SERIAL_NUMBER)); lblDetectorSerial->setText(QString(value)); @@ -337,6 +346,8 @@ void qTabDebugging::SetParameters(QTreeWidgetItem *item){ lblModuleSerial->setText(QString(value)); sprintf(value,"%llx",det->getId(slsDetectorDefs::MODULE_FIRMWARE_VERSION,im)); lblModuleFirmware->setText(QString(value)); + + qDefs::checkErrorMessage(det); } break; } @@ -353,6 +364,7 @@ void qTabDebugging::SetParameters(QTreeWidgetItem *item){ break; det = myDet->getSlsDetector(i); + qDefs::checkErrorMessage(myDet); lblDetectorId->setText(comboDetector->itemText(i)); sprintf(value,"%llx",det->getId(slsDetectorDefs::DETECTOR_SERIAL_NUMBER)); lblDetectorSerial->setText(QString(value)); @@ -360,6 +372,8 @@ void qTabDebugging::SetParameters(QTreeWidgetItem *item){ lblDetectorFirmware ->setText(QString(value)); sprintf(value,"%llx",det->getId(slsDetectorDefs::DETECTOR_SOFTWARE_VERSION)); lblDetectorSoftware->setText(QString(value)); + + qDefs::checkErrorMessage(det); } break; } @@ -374,6 +388,7 @@ void qTabDebugging::SetParameters(QTreeWidgetItem *item){ break; det = myDet->getSlsDetector(i); + qDefs::checkErrorMessage(myDet); lblDetectorId->setText(comboDetector->itemText(i)); sprintf(value,"%llx",det->getId(slsDetectorDefs::DETECTOR_SERIAL_NUMBER)); lblDetectorSerial->setText(QString(value)); @@ -381,6 +396,8 @@ void qTabDebugging::SetParameters(QTreeWidgetItem *item){ lblDetectorFirmware ->setText(QString(value)); sprintf(value,"%llx",det->getId(slsDetectorDefs::DETECTOR_SOFTWARE_VERSION)); lblDetectorSoftware->setText(QString(value)); + + qDefs::checkErrorMessage(det); break; } @@ -421,6 +438,7 @@ void qTabDebugging::TestDetector(){ //get sls det object det = myDet->getSlsDetector(comboDetector->currentIndex()); + qDefs::checkErrorMessage(myDet); //detector firmware if(chkDetectorFirmware->isChecked()){ @@ -478,6 +496,8 @@ void qTabDebugging::TestDetector(){ } //display message qDefs::Message(qDefs::INFORMATION,message.toAscii().constData(),"Debugging"); + + qDefs::checkErrorMessage(det); } diff --git a/slsDetectorGui/src/qTabPlot.cpp b/slsDetectorGui/src/qTabPlot.cpp index f6e050747..2b5a19c43 100644 --- a/slsDetectorGui/src/qTabPlot.cpp +++ b/slsDetectorGui/src/qTabPlot.cpp @@ -153,6 +153,7 @@ void qTabPlot::SetupWidgetWindow(){ btnResetPedestal->setEnabled(false); } + qDefs::checkErrorMessage(myDet); } @@ -482,6 +483,7 @@ void qTabPlot::SetFrequency(){ //if period is 0, check exptime, if that is also 0, give warning and set to min timer if(acqPeriodMS==0){ acqPeriodMS = (myDet->setTimer(slsDetectorDefs::ACQUISITION_TIME,-1)*(1E-6)); + if(acqPeriodMS==0){ qDefs::Message(qDefs::WARNING,"Interval between Plots:
" "Every Nth Image: Period betwen Frames and Exposure Time cannot both be 0 ms.
" @@ -500,6 +502,7 @@ void qTabPlot::SetFrequency(){ connect(spinTimeGap, SIGNAL(editingFinished()), this, SLOT(SetFrequency())); connect(spinNthFrame, SIGNAL(editingFinished()), this, SLOT(SetFrequency())); connect(comboFrequency, SIGNAL(currentIndexChanged(int)), this, SLOT(SetFrequency())); + qDefs::checkErrorMessage(myDet); return; } } @@ -594,6 +597,8 @@ void qTabPlot::SetFrequency(){ connect(spinTimeGap, SIGNAL(editingFinished()), this, SLOT(SetFrequency())); connect(spinNthFrame, SIGNAL(editingFinished()), this, SLOT(SetFrequency())); connect(comboFrequency, SIGNAL(currentIndexChanged(int)), this, SLOT(SetFrequency())); + + qDefs::checkErrorMessage(myDet); } @@ -614,6 +619,8 @@ void qTabPlot::EnableScanBox(){ //none of these scan plotting options make sense if positions exists bool positionsExist = myDet->getAngularConversion(ang);//myDet->getPositions(); + qDefs::checkErrorMessage(myDet); + //only now enable/disable boxScan->setEnabled((mode0||mode1)&&(!positionsExist)); @@ -801,6 +808,8 @@ void qTabPlot::SetScanArgument(){ }else //done here so that it isnt set by default each time myPlot->SetScanArgument(0); + qDefs::checkErrorMessage(myDet); + }