Optika Development
Public Member Functions | Static Public Member Functions
Optika::EnhancedNumberValidator< float > Class Template Reference

#include <Optika_SpecificParameterEntryValidators.hpp>

Inheritance diagram for Optika::EnhancedNumberValidator< float >:
Inheritance graph
[legend]
Collaboration diagram for Optika::EnhancedNumberValidator< float >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 EnhancedNumberValidator ()
 EnhancedNumberValidator (float min, float max, float step=floatDefaultStep, int precision=floatDefaultPrecision)
void setPrecision (int precision)
int getPrecision () const

Static Public Member Functions

static void applyToSpinBox (Teuchos::RCP< const EnhancedNumberValidator< float > > validator, QDoubleSpinBox *spinBox)

Detailed Description

template<>
class Optika::EnhancedNumberValidator< float >

A specific validator used to validat values of type float.


Constructor & Destructor Documentation

Construcsts an EnhancedNumberValidator of type float with no minimum or maximum.

Optika::EnhancedNumberValidator< float >::EnhancedNumberValidator ( float  min,
float  max,
float  step = floatDefaultStep,
int  precision = floatDefaultPrecision 
) [inline]

Constructs an EnhancedNumberValidator of type float.

Parameters:
minThe minimum acceptable value for this validator.
maxThe maximum acceptable value for this validator.
stepThe increments at which the value should be changed. This is mostly used for the QSpinBox that is used in the Optika GUI. If you're not using the GUI, you may ignore this parameter.
precisionThis determines the precision at which the number should be displayed in the GUI. NOTE: THIS DOES NOT ACTUALLY SPECIFY THE PRECISION USED IN STORING THE VARIABLE. IT IS FOR GUI PURPOSES ONLY!

Member Function Documentation

static void Optika::EnhancedNumberValidator< float >::applyToSpinBox ( Teuchos::RCP< const EnhancedNumberValidator< float > >  validator,
QDoubleSpinBox *  spinBox 
) [inline, static]

Applies an EnhancedNumberValidator of type float to a QDoubleSpinBox.

Parameters:
validatorThe validator to be useed.
spinBoxThe SpinBox on which to apply the validator.
int Optika::EnhancedNumberValidator< float >::getPrecision ( ) const [inline]

Gets the precision specified for the validator. NOTE: THIS IS PRECISION USED BY THE GUI. NOT THE ACTUAL PRECISION USED TO STORE THE VARIABLE.

Returns:
The precision specific for the validator.
void Optika::EnhancedNumberValidator< float >::setPrecision ( int  precision) [inline]

Sets the precision specified for the validator. NOTE: THIS IS PRECISION USED BY THE GUI. NOT THE ACTUAL PRECISION USED TO STORE THE VARIABLE.

Parameters:
Theprecision specific for the validator.

The documentation for this class was generated from the following file:
 All Classes Functions Variables Typedefs Enumerations