- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Attributes

# AttributeCheckableFloat Class Reference

Search for all occurrences

## Detailed Description

Definition at line 1602 of file math.h.

`#include <math.h>`

Inheritance diagram for AttributeCheckableFloat:
[legend]

List of all members.

## Public Member Functions
| AttributeCheckableFloat (Node *pOwner=0, const QString &sID="", const QString &sValueName="")
void | SetValueName (const QString &sValueName)
QString | ValueName (void) const
Attribute::AttributeType | Type (void) const
| Returns the type of the attribute.
AttributeWidget * | CreateEditorWidget (QWidget *pParent, int iWidth)
| This function creates and returns the address of a QWidget object.
QString | AsString (bool) const
| Returns the value of the attribute as a string.
void | SetFromString (const QString &s, bool=true, bool=false)
| Sets the value of the attribute as a string.
## Protected Attributes
QString | m_sValueName

## Constructor & Destructor Documentation

AttributeCheckableFloat | ( | Node * | pOwner = `0`,
|  | const QString & | sID = `""`,
|  | const QString & | sValueName = `""`
| ) |  | `[inline]`

Definition at line 1605 of file math.h.

                                                                                                             : AttributeInstance<CheckableFloat>( pOwner, sID )
            { m_iSize = sizeof(CheckableFloat); m_sValueName = sValueName; };

## Member Function Documentation

void SetValueName | ( | const QString & | sValueName | ) | `[inline]`

Search for all occurrences

Definition at line 1607 of file math.h.

    { m_sValueName = sValueName; };

QString ValueName | ( | void |  | ) | const `[inline]`

Search for all occurrences

Definition at line 1608 of file math.h.

    { return m_sValueName; };

Attribute::AttributeType Type | ( | void |  | ) | const `[inline, virtual]`

Search for all occurrences

Returns the type of the attribute.

Reimplemented from AttributeInstance< CheckableFloat >.

Definition at line 1610 of file math.h.

    { return typeUnknown; };

AttributeWidget* CreateEditorWidget | ( | QWidget * | pParent,
|  | int | iWidth
| ) |  | `[inline, virtual]`

Search for all occurrences

This function creates and returns the address of a QWidget object.

The object then can be used in the interface to give the user control over the attribute value. Mudbox calls this function for every attribute in a node when it displays a properties dialog box for it. You must override it if you implement a new kind of attribute and want a special interface.

Reimplemented from AttributeInstance< CheckableFloat >.

Definition at line 1611 of file math.h.

    { return CreateNewCheckableFloatWidget( pParent, iWidth, (AttributeCheckableFloat *)this ); };

QString AsString | ( | bool | bLocalized | ) | const `[inline, virtual]`

Search for all occurrences

Returns the value of the attribute as a string.

See also SetFromString.

Parameters:

  bLocalized | if this is true the string representation of the value is assumed to be localized (translated)

Reimplemented from AttributeInstance< CheckableFloat >.

Definition at line 1612 of file math.h.

    { return QString("%1 %2").arg(m_cValue.State() ? "true" : "false").arg(m_cValue.Value()); };

void SetFromString | ( | const QString & | sValue,
|  | bool | bInternal = `true`,
|  | bool | bLocalized = `false`
| ) |  | `[inline, virtual]`

Search for all occurrences

Sets the value of the attribute as a string.

See also AsString.

Parameters:

  bInternal | if this is false the owner node will receive an event about the value change (See NodeEventType::etValueChanged).
  bLocalized | if this is true the string representation of the value is assumed to be localized (translated)

Reimplemented from AttributeInstance< CheckableFloat >.

Definition at line 1613 of file math.h.

        {
            m_cValue.SetState( s.section( ' ', 0, 0 ) == "true" ? true : false );
            m_cValue.SetValue( s.section( ' ', 1, 1 ).toFloat() );
        };

## Member Data Documentation

QString m_sValueName `[protected]`

Search for all occurrences

Definition at line 1617 of file math.h.

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

- Mudbox/math.h

AttributeCheckableFloat AttributeCheckableFloat AttributeCheckableFloat AttributeCheckableFloat AttributeCheckableFloat AttributeCheckableFloat AttributeCheckableFloat AttributeCheckableFloat AttributeCheckableFloat AttributeCheckableFloat
AttributeCheckableFloat AttributeCheckableFloat AttributeCheckableFloat AttributeCheckableFloat AttributeCheckableFloat AttributeCheckableFloat AttributeCheckableFloat AttributeCheckableFloat AttributeCheckableFloat AttributeCheckableFloat