mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-18 10:01:57 -05:00
947b429723
This change incorporates a reorganization of the GUI code with widgets, validators, models, and item delegates being moved to sub-directories. Relax the requirements of the ForeignKeyDelegate and related CandidateKeyFilter classes to allow them to work with constant model pointers for both referenced and referencing models.
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
|