A container class that holds a boolean and a float value.
Can be used to to enable/disable the usage of the float value. Typically represented by a checkbox and a slider below that where the state of the checkbox enables or disables the slider.
#include <math.h>
Public Member Functions |
|
CheckableFloat (void) | |
CheckableFloat (bool bState, float fValue) | |
void | SetValue (float f) |
Sets the associated float value. |
|
float | Value (void) const |
Retrieves the associated float value.
|
|
void | SetState (bool b) |
Sets the associated boolean value. |
|
bool | State (void) const |
Retrieves the associated boolean value.
|
|
bool | operator== (const CheckableFloat &cf) const throw () |
bool | operator!= (const CheckableFloat &cf) const throw () |
CheckableFloat & | operator= (const CheckableFloat &cf) |
void | Serialize (Stream &s) |
Protected Attributes |
|
bool | m_bState |
float | m_fValue |
CheckableFloat | ( | void | ) | [inline] |
CheckableFloat | ( | bool | bState, |
float | fValue | ||
) | [inline] |
Definition at line 1580 of file math.h.
{ return !operator ==( cf ); };
void SetValue | ( | float | f | ) | [inline] |
float Value | ( | void | ) | const [inline] |
void SetState | ( | bool | b | ) | [inline] |
bool State | ( | void | ) | const [inline] |
bool operator== | ( | const CheckableFloat & | cf | ) | const throw () [inline] |
bool operator!= | ( | const CheckableFloat & | cf | ) | const throw () [inline] |
CheckableFloat& operator= | ( | const CheckableFloat & | cf | ) | [inline] |
void Serialize | ( | Stream & | s | ) | [inline] |
Definition at line 1598 of file math.h.
: AttributeCheckableFloat( Node *pOwner = 0, const QString &sID = "", const QString &sValueName = "" ) : AttributeInstance<CheckableFloat>( pOwner, sID ) { m_iSize = sizeof(CheckableFloat); m_sValueName = sValueName; }; void SetValueName( const QString &sValueName ) { m_sValueName = sValueName; };
bool
m_bState [protected] |
float
m_fValue [protected] |