From 37f727ac0746fd85504aa46c1f023c09b3eff33a Mon Sep 17 00:00:00 2001 From: hibby Date: Fri, 16 Feb 2018 15:17:14 +0000 Subject: New upstream version 1.8.0+repack --- RestrictedSpinBox.hpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 RestrictedSpinBox.hpp (limited to 'RestrictedSpinBox.hpp') diff --git a/RestrictedSpinBox.hpp b/RestrictedSpinBox.hpp new file mode 100644 index 00000000..f856e90c --- /dev/null +++ b/RestrictedSpinBox.hpp @@ -0,0 +1,25 @@ +#ifndef RESTRICTED_SPIN_BOX_HPP_ +#define RESTRICTED_SPIN_BOX_HPP_ + +#include "HintedSpinBox.hpp" + +class QString; + +// +// RestrictedSpinBox - select only from a sequence of values +// +class RestrictedSpinBox final + : public HintedSpinBox +{ +public: + RestrictedSpinBox (QWidget * parent = nullptr) + : HintedSpinBox {parent} + { + } + +protected: + // override the base class validation + QValidator::State validate (QString& input, int& pos) const override; +}; + +#endif -- cgit v1.2.3