void AcquisitionData::removeRecordSession(RecordSessionPtr session) { for(int i = 0; i < mRecordSessions.size(); ++i) { if(mRecordSessions[i]->getUid() == session->getUid()) mRecordSessions.erase(mRecordSessions.begin() + i); } emit recordedSessionsChanged(); }
void AcquisitionServiceProxy::onServiceRemoved(AcquisitionService *service) { disconnect(service, &AcquisitionService::started, this, &AcquisitionService::started); disconnect(service, &AcquisitionService::cancelled, this, &AcquisitionService::cancelled); disconnect(service, &AcquisitionService::stateChanged, this, &AcquisitionService::stateChanged); disconnect(service, &AcquisitionService::usReadinessChanged, this, &AcquisitionService::usReadinessChanged); disconnect(service, &AcquisitionService::acquisitionStopped, this, &AcquisitionService::acquisitionStopped); disconnect(service, &AcquisitionService::recordedSessionsChanged, this, &AcquisitionService::recordedSessionsChanged); disconnect(service, &AcquisitionService::acquisitionDataReady, this, &AcquisitionService::acquisitionDataReady); disconnect(service, &AcquisitionService::saveDataCompleted, this, &AcquisitionService::saveDataCompleted); mAcquisitionService = AcquisitionService::getNullObject(); emit stateChanged(); emit usReadinessChanged(); emit recordedSessionsChanged(); }
void AcquisitionServiceProxy::onServiceAdded(AcquisitionService* service) { mAcquisitionService.reset(service, null_deleter()); connect(service, &AcquisitionService::started, this, &AcquisitionService::started); connect(service, &AcquisitionService::cancelled, this, &AcquisitionService::cancelled); connect(service, &AcquisitionService::stateChanged, this, &AcquisitionService::stateChanged); connect(service, &AcquisitionService::usReadinessChanged, this, &AcquisitionService::usReadinessChanged); connect(service, &AcquisitionService::acquisitionStopped, this, &AcquisitionService::acquisitionStopped); connect(service, &AcquisitionService::recordedSessionsChanged, this, &AcquisitionService::recordedSessionsChanged); connect(service, &AcquisitionService::acquisitionDataReady, this, &AcquisitionService::acquisitionDataReady); connect(service, &AcquisitionService::saveDataCompleted, this, &AcquisitionService::saveDataCompleted); if(mAcquisitionService->isNull()) reportWarning("AcquisitionServiceProxy::onServiceAdded mAcquisitionService->isNull()"); emit stateChanged(); emit usReadinessChanged(); emit recordedSessionsChanged(); }
void AcquisitionData::addRecordSession(RecordSessionPtr session) { mRecordSessions.push_back(session); emit recordedSessionsChanged(); }
void AcquisitionData::clear() { mRecordSessions.clear(); emit recordedSessionsChanged(); }