From 992d4b4b8d3f3a630a2cf00d593ee4ce4dfa7ce8 Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Thu, 9 Jan 2025 22:12:06 +0100 Subject: New upstream version 2.7.0~rc8+repack --- widgets/HintedSpinBox.hpp | 106 +++++++++++++++++++++++----------------------- 1 file changed, 53 insertions(+), 53 deletions(-) (limited to 'widgets/HintedSpinBox.hpp') diff --git a/widgets/HintedSpinBox.hpp b/widgets/HintedSpinBox.hpp index 10177571..8498b29e 100755 --- a/widgets/HintedSpinBox.hpp +++ b/widgets/HintedSpinBox.hpp @@ -1,53 +1,53 @@ -#ifndef HINTED_SPIN_BOX_HPP_ -#define HINTED_SPIN_BOX_HPP_ - -#include - -#include - -// -// HintedSpinBox - QSpinBox refinement with an optional sequence of -// discrete hints -// -// The hint sequence values are used as step values and can -// optionally define the minimum and maximum value. Intermediate -// values are allowed but the step up/down arrows and accelerator -// keys will only use the hints. -// -// Ensure that the default minimum and maximum values are sufficient -// to allow initial initialization if done before the hints are set. -// -class HintedSpinBox - : public QSpinBox -{ -public: - typedef std::vector values_type; - - HintedSpinBox (QWidget * parent = nullptr) - : QSpinBox {parent} - { - } - - // Initialize sequence of values allowed. - // - // This spin box behaves exactly as a standard QSpinBox if the - // sequence of values is empty. - // - // The minimum and maximum are automatically set to the lowest and - // highest value provided if required. - // - // Returns the previous sequence. - values_type values (values_type values, bool set_min_max = true); - - // Read access to the values. - values_type const& values () const {return values_;} - -protected: - // override the QSpinBox stepping - void stepBy (int steps) override; - -private: - values_type values_; -}; - -#endif +#ifndef HINTED_SPIN_BOX_HPP_ +#define HINTED_SPIN_BOX_HPP_ + +#include + +#include + +// +// HintedSpinBox - QSpinBox refinement with an optional sequence of +// discrete hints +// +// The hint sequence values are used as step values and can +// optionally define the minimum and maximum value. Intermediate +// values are allowed but the step up/down arrows and accelerator +// keys will only use the hints. +// +// Ensure that the default minimum and maximum values are sufficient +// to allow initial initialization if done before the hints are set. +// +class HintedSpinBox + : public QSpinBox +{ +public: + typedef std::vector values_type; + + HintedSpinBox (QWidget * parent = nullptr) + : QSpinBox {parent} + { + } + + // Initialize sequence of values allowed. + // + // This spin box behaves exactly as a standard QSpinBox if the + // sequence of values is empty. + // + // The minimum and maximum are automatically set to the lowest and + // highest value provided if required. + // + // Returns the previous sequence. + values_type values (values_type values, bool set_min_max = true); + + // Read access to the values. + values_type const& values () const {return values_;} + +protected: + // override the QSpinBox stepping + void stepBy (int steps) override; + +private: + values_type values_; +}; + +#endif -- cgit v1.2.3