#ifndef NUMPAD_H
#define NUMPAD_H

#include "ui_numpad.h"

class Numpad : public QDialog
{
    Q_OBJECT

public:
    explicit Numpad(QString caption, QString min, QString max, QString value, QWidget *parent = 0);
    explicit Numpad(QString caption, int min, int max, int value, QWidget *parent = 0);
    explicit Numpad(QString caption, double min, double max, double value, QWidget *parent = 0);
    QString value();
    int valueInt();
    double valueDouble();

protected:
    void changeEvent(QEvent *e);
    void moveEvent (QMoveEvent * event);

protected slots:
    void slotClicked();

private:
    void init();
    Ui::Numpad ui;
    bool m_bClearSelection;
    bool m_bHasSelectedText;
    QString m_actValue;

signals:
    void value(const QString &value) const;

};

#endif // NUMPAD_H
