NAP
Public Member Functions | Public Attributes | List of all members
ParameterNumeric< T > Class Template Reference

#include <parameternumeric.h>

Public Member Functions

virtual void setValue (const Parameter &value) override
 
virtual void setValue (T value)
 
void setRange (T minimum, T maximum)
 
- Public Member Functions inherited from Parameter
const std::string getDisplayName () const
 
- Public Member Functions inherited from Resource
 Resource ()
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
virtual bool init (utility::ErrorState &errorState)
 
virtual void onDestroy ()
 
 Object (Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=delete
 
Objectoperator= (Object &&)=delete
 

Public Attributes

mValue
 Property: 'Value' the value of this parameter. More...
 
mMinimum = static_cast<T>(0)
 Property: 'Minimum' the minimum value of this parameter. More...
 
mMaximum = static_cast<T>(1)
 Property: 'Maximum' the maximum value of this parameter. More...
 
Signal< T > valueChanged
 Signal that's raised when the value of this parameter changes. More...
 
- Public Attributes inherited from Parameter
std::string mName
 Property 'Name': The name of this property. The name is separate from the ID and doesn't have to be unique. More...
 
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)
 

Description

template<typename T>
class nap::ParameterNumeric< T >

A numeric parameter can hold any numeric type and provides a minimum & maximum value to ensure the value stays within range

Inheritance diagram for ParameterNumeric< T >:
[legend]
Collaboration diagram for ParameterNumeric< T >:
[legend]

Member Function Documentation

◆ setRange()

void setRange ( minimum,
maximum 
)

Sets the min/max range of this parameter to the specified values. If the current value is outside of the specified range, it will be clamped.

Parameters
minimumThe minimum value for this parameter
maximumThe maximum value for this parameter

◆ setValue() [1/2]

void setValue ( const Parameter value)
overridevirtual

Set the value of this enum from another parameter

Parameters
valueThe parameter to set the value from

Implements Parameter.

◆ setValue() [2/2]

void setValue ( value)
virtual

Set the value of this parameter. Will raise the valueChanged signal if the value actually changes.

Parameters
valueThe value to set

Member Data Documentation

◆ mMaximum

T mMaximum = static_cast<T>(1)

Property: 'Maximum' the maximum value of this parameter.

◆ mMinimum

T mMinimum = static_cast<T>(0)

Property: 'Minimum' the minimum value of this parameter.

◆ mValue

T mValue

Property: 'Value' the value of this parameter.

◆ valueChanged

Signal<T> valueChanged

Signal that's raised when the value of this parameter changes.