* @brief Enables or disables CSV export, closing the file on disable. */
| 331 | * @brief Enables or disables CSV export, closing the file on disable. |
| 332 | */ |
| 333 | void CSV::Export::setExportEnabled(const bool enabled) |
| 334 | { |
| 335 | const bool allow = enabled && AppState::instance().operationMode() != SerialStudio::ConsoleOnly; |
| 336 | |
| 337 | if (!allow && isOpen()) |
| 338 | closeFile(); |
| 339 | |
| 340 | setConsumerEnabled(allow); |
| 341 | if (m_persistSettings) |
| 342 | m_settings.setValue("CSVExport", allow); |
| 343 | |
| 344 | Q_EMIT enabledChanged(); |
| 345 | } |
| 346 | |
| 347 | //-------------------------------------------------------------------------------------------------- |
| 348 | // Hotpath data processing |
no test coverage detected