QGCRadioChannelDisplay.h 969 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
#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);
13
    void showMinMax(bool show = true);
14
    void hideMinMax();
15
    bool isMinMaxShown() { return m_showMinMax; }
16 17
    void setValueAndRange(int val, int min, int max);
    void setMinMax(int min, int max);
18 19
    void setMin(int value);
    void setMax(int value);
20
    void setName(QString name);
21 22 23
    int value() { return m_value; }
    int min() { return m_min; }
    int max() { return m_max; }
24

25 26 27 28 29 30 31 32 33
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;
34 35
    QBrush m_fillBrush;

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

#endif // QGCRADIOCHANNELDISPLAY_H