formatterspinbox.h 593 Bytes
#ifndef FORMATTERSPINBOX_H
#define FORMATTERSPINBOX_H

#include <QWidget>
#include <QSpinBox>



class FormatterSpinBox : public QSpinBox
{
    Q_OBJECT
private:
    int m_nwidth;

signals:
    void focusInEdit(void);
    void focusOutEdit(void);

public:
    explicit FormatterSpinBox(QWidget *parent = Q_NULLPTR);

    int valueFromText(const QString &text) const Q_DECL_OVERRIDE;
    QString textFromValue(int value) const Q_DECL_OVERRIDE;

    void setFormatterWidth(int wid);

    void focusInEvent(QFocusEvent *event);
    void focusOutEvent(QFocusEvent *event);
};

#endif // SPINBOX_H