void AMDetectorCleanupAction::startImplementation(){ // If you still don't have a detector, check the exposed detectors one last time. if(!detector_) detector_ = AMBeamline::bl()->exposedDetectorByInfo(*(detectorCleanupInfo()->detectorInfo())); if(!detector_) { AMErrorMon::alert(this, AMDETECTORCLEANUPACTION_NO_VALID_DETECTOR, QString("There was an error cleaning up the detector '%1', because the detector was not found. Please report this problem to the Acquaman developers.").arg(detectorCleanupInfo()->name())); setFailed(); return; } if(detector_->cleanupState() == AMDetector::CleanupRequired){ // connect to detector cleanup signals connect(detector_, SIGNAL(cleaningUp()), this, SLOT(onCleanupStarted())); connect(detector_, SIGNAL(cleanedUp()), this, SLOT(onCleanupFinished())); detector_->cleanup(); } else{ setStarted(); setSucceeded(); } }
NLGLWidget::NLGLWidget(QWidget *parent, NLSynthesizer* synthesizer) : QGLWidget(parent), _synthesizer(synthesizer) { setFocusPolicy(Qt::StrongFocus); _graphicsResource = 0; _gl_width = 0; _gl_height = 0; _img_width = 0; _img_height = 0; _texture = -1; _checkboardTexture = -1; _use_Checkboard = true; _use_sRgb = false; connect(_synthesizer, SIGNAL(synthesisAdvanced()), this, SLOT(update())); connect(_synthesizer, SIGNAL(cleaningUp()), this, SLOT(cleanupTexture())); }
void AMDetectorCleanupAction::onCleanupStarted(){ disconnect(detector_, SIGNAL(cleaningUp()), this, SLOT(onCleanupStarted())); setStarted(); }