mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-09 02:26:06 -05:00
0e87c974e9
1. Level meter range increased to 0-90 dB. 2. Level meter reading is independent of slider setting. 3. For a trial period: thermometer bar goes red if a 16-bit sample is within 5 dB A/D limit. 4. Slider can be used to adjust levels sent to waterfall. 5. Tx6 message is selected on program startup. Thanks to W9MDB for most of this code. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7596 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
34 lines
655 B
C++
34 lines
655 B
C++
// -*- Mode: C++ -*-
|
|
#ifndef METERWIDGET_H
|
|
#define METERWIDGET_H
|
|
|
|
#include <QWidget>
|
|
#include <QQueue>
|
|
|
|
class MeterWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
Q_PROPERTY (int value READ value WRITE setValue)
|
|
|
|
public:
|
|
explicit MeterWidget (QWidget *parent = 0);
|
|
|
|
// value property
|
|
int value () const {return m_signal;}
|
|
Q_SLOT void setValue (int value);
|
|
|
|
// QWidget implementation
|
|
QSize sizeHint () const override;
|
|
void set_sigPeak(int value);
|
|
protected:
|
|
void paintEvent( QPaintEvent * ) override;
|
|
|
|
private:
|
|
QQueue<int> signalQueue;
|
|
int m_signal;
|
|
int m_noisePeak;
|
|
int m_sigPeak; // peak value for color coding
|
|
};
|
|
|
|
#endif // METERWIDGET_H
|