raDIYo 0.4
swspectrumwidget.h
1/***************************************************************************
2
3 source::worx raDIYo
4 Copyright © 2020-2022 c.holzheuer
5 c.holzheuer@sourceworx.org
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12***************************************************************************/
13
14
15#ifndef SWSPECTRUMWIDGET_H
16#define SWSPECTRUMWIDGET_H
17
18#include <QTimer>
19#include <swabstractbarwidget.h>
20
22{
23 Q_OBJECT
24
25public:
26
27 explicit SWSpectrumWidget( QWidget* parent = nullptr );
28
29 void paintEvent( QPaintEvent* event ) override;
30
31
32public slots:
33
34 void onTimer();
35
36signals:
37
38
39
40protected:
41
42 QTimer _timer;
43
44};
45
46/*
47public slots:
48
49 void reset();
50 //void spectrumChanged(const FrequencySpectrum &spectrum);
51public slots:
52 void setBuffer();
53 void plot();
54private:
55 qreal getPeakValue(const QAudioFormat &format);
56 void updateBars();
57int barIndex(qreal frequency) const;
58*/
59
60#endif // SWSPECTRUMWIDGET_H