|  | Home · All Classes · Main Classes · Annotated · Grouped Classes · Functions |

# lcdrange.h Example File
tutorial/t12/lcdrange.h

        /****************************************************************
        **
        ** Definition of LCDRange class, Qt tutorial 12
        **
        ****************************************************************/

        #ifndef LCDRANGE_H
        #define LCDRANGE_H

        #include <QVBoxWidget>

        class QLabel;
        class QSlider;

        class LCDRange : public QVBoxWidget
        {
            Q_OBJECT

        public:
            LCDRange(QWidget *parent = 0);
            LCDRange(const QString &text, QWidget *parent = 0);

            int value() const;
            QString text() const;

        public slots:
            void setValue(int value);
            void setRange(int minValue, int maxValue);
            void setText(const QString &text);

        signals:
            void valueChanged(int newValue);

        private:
            void init();

            QSlider *slider;
            QLabel *label;
        };

        #endif // LCDRANGE_H