Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
#ifndef HEXSPINBOX_H
#define HEXSPINBOX_H
#include <QSpinBox>

class QRegExpValidator;

//tehdään oma HexSpinBox luokka ja peritään se Qt:n QSpinBoxista
class HexSpinBox : public QSpinBox
{
    Q_OBJECT
public:
    HexSpinBox(QWidget *parent = 0);
protected:
    QValidator::State validate(QString &text, int &pos) const;
    int valueFromText(const QString &text) const;
    QString textFromValue(int value) const;
private:
    QRegExpValidator *validator;
};
#endif

...