* @brief Allocates the spectrogram image based on FFT size and history depth. */
| 558 | * @brief Allocates the spectrogram image based on FFT size and history depth. |
| 559 | */ |
| 560 | void Widgets::Waterfall::rebuildHistoryImage() |
| 561 | { |
| 562 | const int width = qMax(1, m_size / 2); |
| 563 | const int height = qMax(1, m_historySize); |
| 564 | m_image = QImage(width, height, QImage::Format_RGB32); |
| 565 | m_image.fill(sampleColorMap(m_colorMap, 0.0)); |
| 566 | m_topRow = 0; |
| 567 | m_writeRow = 0; |
| 568 | m_filledOnce = false; |
| 569 | } |
| 570 | |
| 571 | /** |
| 572 | * @brief Writes a new spectrum row into the ring: the newest row's physical position is |