formatterspinbox.h 531 Bytes
#ifndef FORMATTERSPINBOX_H
#define FORMATTERSPINBOX_H

#include <QWidget>
#include <QSpinBox>



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

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 mouseReleaseEvent(QMouseEvent *event);
};

#endif // SPINBOX_H