Loading [MathJax]/extensions/TeX/AMSmath.js
Radium Engine  1.5.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Ra::Gui::Widgets::ConstrainedNumericSpinBox< T > Class Template Reference

Constrained input spin box. The constraint to apply to any input value is verified using the user-define predicate associated to the object. More...

#include <Gui/Widgets/ConstrainedNumericSpinBox.hpp>

Inherits QtSpinBox::getType::Type.

+ Collaboration diagram for Ra::Gui::Widgets::ConstrainedNumericSpinBox< T >:

Public Types

using BaseWidget = typename QtSpinBox::getType< T >::Type
 
using Predicate = std::function< bool(T)>
 

Public Member Functions

QValidator::State validate (QString &input, int &) const override
 
void setPredicate (Predicate p)
 Set the predicate to evaluate.
 
bool isValid (T s) const
 Validate a value. More...
 

Detailed Description

template<typename T>
class Ra::Gui::Widgets::ConstrainedNumericSpinBox< T >

Constrained input spin box. The constraint to apply to any input value is verified using the user-define predicate associated to the object.

Template Parameters
TType of the constrained value to input

Definition at line 18 of file ConstrainedNumericSpinBox.hpp.

Member Function Documentation

◆ isValid()

template<typename T >
bool Ra::Gui::Widgets::ConstrainedNumericSpinBox< T >::isValid ( s) const
inline

Validate a value.

Parameters
s
Returns
true if the value is valid according to the stored predicate, false otherwise.

Definition at line 33 of file ConstrainedNumericSpinBox.hpp.


The documentation for this class was generated from the following file: