QGCRadioChannelDisplay.h 903 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#ifndef QGCRADIOCHANNELDISPLAY_H
#define QGCRADIOCHANNELDISPLAY_H

#include <QWidget>

class QGCRadioChannelDisplay : public QWidget
{
    Q_OBJECT
public:
    explicit QGCRadioChannelDisplay(QWidget *parent = 0);
    void setOrientation(Qt::Orientation orient);
    void setValue(int value);
    void showMinMax();
    void hideMinMax();
15 16
    void setValueAndRange(int val, int min, int max);
    void setMinMax(int min, int max);
17 18
    void setMin(int value);
    void setMax(int value);
19
    void setName(QString name);
20 21 22
    int value() { return m_value; }
    int min() { return m_min; }
    int max() { return m_max; }
23

24 25 26 27 28 29 30 31 32
protected:
    void paintEvent(QPaintEvent *event);
private:
    Qt::Orientation m_orientation;
    int m_value;
    int m_min;
    int m_max;
    bool m_showMinMax;
    QString m_name;
33 34
    QBrush m_fillBrush;

35 36 37 38 39 40 41
signals:
    
public slots:
    
};

#endif // QGCRADIOCHANNELDISPLAY_H