* @brief Disconnects the primary device and any other project sources. */
| 706 | * @brief Disconnects the primary device and any other project sources. |
| 707 | */ |
| 708 | void IO::ConnectionManager::disconnectDevice() |
| 709 | { |
| 710 | QApplication::setOverrideCursor(Qt::WaitCursor); |
| 711 | |
| 712 | disconnectDevice(0); |
| 713 | |
| 714 | if (AppState::instance().operationMode() == SerialStudio::ProjectFile) { |
| 715 | for (auto& [id, dm] : m_devices) |
| 716 | if (id > 0) |
| 717 | disconnectDevice(id); |
| 718 | } |
| 719 | |
| 720 | DataModel::FrameBuilder::instance().registerQuickPlotHeaders(QStringList()); |
| 721 | |
| 722 | QApplication::restoreOverrideCursor(); |
| 723 | Q_EMIT driverChanged(); |
| 724 | Q_EMIT connectedChanged(); |
| 725 | } |
| 726 | |
| 727 | /** |
| 728 | * @brief Recreates the FrameReader for device 0 with the current settings. |
no test coverage detected