void DataLocations::deletePersistentWritablePath() { QString pathToDelete = DataLocations::getPersistentWritablePath(); QDir dir(pathToDelete); CX_LOG_INFO() << "Going to delete:" << dir.absolutePath(); dir.removeRecursively(); }
void LogicManager::initializeServices() { CX_LOG_INFO() << " --- Initialize services for " << qApp->applicationName() << "..."; this->basicSetup(); mPluginFramework->loadState(); if (mComponent) mComponent->create(); CX_LOG_DEBUG() << " --- End initialize services."; }
void VideoConnection::runDirectLinkClient(StreamerServicePtr service) { if (mClient) { // in this case we already have a working system: ignore CX_LOG_INFO() << "Video client already exists - cannot start"; return; } if (mThread) { // in this case we have a thread but no client: probably shutting down: ignore CX_LOG_INFO() << "Video thread already exists (in shutdown?) - cannot start"; return; } mStreamerInterface = service; mClient = new ImageReceiverThread(mStreamerInterface); connect(mClient.data(), &ImageReceiverThread::imageReceived, this, &VideoConnection::imageReceivedSlot); // thread-bridging connection connect(mClient.data(), &ImageReceiverThread::sonixStatusReceived, this, &VideoConnection::statusReceivedSlot); // thread-bridging connection connect(mClient.data(), &ImageReceiverThread::fps, this, &VideoConnection::fpsSlot); // thread-bridging connection mThread = new EventProcessingThread; mThread->setObjectName("org.custusx.core.video.imagereceiver"); mClient->moveToThread(mThread); connect(mThread.data(), &QThread::started, this, &VideoConnection::onConnected); connect(mThread.data(), &QThread::started, mClient.data(), &ImageReceiverThread::initialize); connect(mClient.data(), &ImageReceiverThread::finished, mThread.data(), &QThread::quit); connect(mClient.data(), &ImageReceiverThread::finished, mClient.data(), &ImageReceiverThread::deleteLater); connect(mThread.data(), &QThread::finished, this, &VideoConnection::onDisconnected); connect(mThread.data(), &QThread::finished, mThread.data(), &QThread::deleteLater); mThread->start(); }
void LogicManager::shutdownServices() { CX_LOG_INFO() << " --- Shutting down " << qApp->applicationName() << "..."; this->getPatientModelService()->autoSave(); if (mComponent) mComponent->destroy(); // this is the GUI - delete first mPluginFramework->stop(); this->shutdownLegacyStoredServices(); mPluginFramework.reset(); GPUImageBufferRepository::shutdown(); Reporter::shutdown(); ProfileManager::shutdown(); CX_LOG_DEBUG() << " --- End shutdown services"; }
void Ur5LungSimulationTab::startSimulationSlot() { if(this->isParametersSet() && mUr5Robot->isValidWorkspace(jointStartPosition) && mUr5Robot->isValidWorkspace(jointStopPosition)) { mUr5Robot->clearProgramQueue(); for(int i=0;i<500;i++) { mUr5Robot->addToProgramQueue(mMessageEncoder.movej(jointStartPosition,inspirationTimeLineEdit->text().toDouble())); mUr5Robot->addToProgramQueue(mMessageEncoder.movej(jointStopPosition,expirationTimeLineEdit->text().toDouble())); } mLungSimulation->lungMovement(inspirationTimeLineEdit->text().toDouble(),inspiratoryPauseTimeLineEdit->text().toDouble(), expirationTimeLineEdit->text().toDouble(),expiratoryPauseTimeLineEdit->text().toDouble()); } else { CX_LOG_INFO() << "All parameters not set or invalid positions."; } }