* @brief Updates the current dataset value from the dashboard source. */
| 277 | * @brief Updates the current dataset value from the dashboard source. |
| 278 | */ |
| 279 | void Widgets::Bar::updateData() |
| 280 | { |
| 281 | if (VALIDATE_WIDGET(SerialStudio::DashboardBar, m_index)) { |
| 282 | const auto& dataset = GET_DATASET(SerialStudio::DashboardBar, m_index); |
| 283 | if (!std::isfinite(dataset.numericValue)) |
| 284 | return; |
| 285 | |
| 286 | auto value = qMax(m_minValue, qMin(m_maxValue, dataset.numericValue)); |
| 287 | if (DSP::notEqual(value, m_value)) { |
| 288 | m_value = value; |
| 289 | recomputeActiveBand(value); |
| 290 | if (isEnabled()) |
| 291 | Q_EMIT updated(); |
| 292 | } |
| 293 | } |
| 294 | } |
nothing calls this directly
no test coverage detected