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

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Protected Attributes

# AttributeWidget Class Reference

Search for all occurrences

## Detailed Description

Definition at line 72 of file widgets.h.

`#include <widgets.h>`

Inheritance diagram for AttributeWidget:
[legend]

List of all members.

## Public Member Functions
| AttributeWidget (QWidget *pParent, int iWidth, Attribute *pAttribute)
| ~AttributeWidget (void)
bool | Validate (void)
virtual void | Update (void)
virtual void | MoveValue (int, int)
virtual void | MoveContent (int iStart, int iEnd, bool bVisibleValue)
virtual void | ChangeWidth (int iWidth, bool bVisibleValue)
Attribute * | GetAttribute (void) const
Node * | GetNode (void) const
## Protected Member Functions
void | OnNodeEvent (const Attribute &cAttribute, NodeEventType eType)
| This function is called if an event occurs with any of the attributes of the node.
## Protected Attributes
QLabel | m_cLabel
QHBoxLayout | m_cMainLayout
QHBoxLayout * | m_pValueLayout
QHBoxLayout * | m_pValueStretchLayout
QWidget | m_cValue
float | m_fLabelWidth
int | m_iHeight
bool | m_bLeftAlignedName

## Constructor & Destructor Documentation

AttributeWidget | ( | QWidget * | pParent,
|  | int | iWidth,
|  | Attribute * | pAttribute
| ) |  |

~AttributeWidget | ( | void |  | ) |

## Member Function Documentation

void OnNodeEvent | ( | const Attribute & | cAttribute,
|  | NodeEventType | cType
| ) |  | `[protected, virtual]`

Search for all occurrences

This function is called if an event occurs with any of the attributes of the node.

All derived classes should override this function to be able to handle attribute events.

Parameters:

  cAttribute | The attribute which caused the event. The attribute has a special == operator to make it easier to implement this function. You can write the following:
              void MyClass::OnNodeEvent( const Attribute &cAttribute, NodeEventType cType )
              {
                  if ( cAttribute == myAttribute0 )
                  {
                      ...
                  }
                  else if ( cAttribute == myAttribute1 )
                  {
                      ...
                  }
              }
  This comparison will check the address of the two attributes and NOT their values.
  cType | Type of the event occured.

Reimplemented from Node.

bool Validate | ( | void |  | ) |

Search for all occurrences

virtual void Update | ( | void |  | ) | `[inline, virtual]`

Search for all occurrences

Reimplemented in AttributeVectorbox, AttributeVector4box, AttributeEditbox, AttributeColorbox, AttributeSliderbox, AttributeSpinbox, AttributeCombobox, AttributePointerbox, AttributeCurveEditor, AttributeStampConfigurationWidget, and AttributeMirrorConfigurationWidget.

Definition at line 94 of file widgets.h.

    {};

virtual void MoveValue | ( | int | ,
|  | int |
| ) |  | `[inline, virtual]`

Search for all occurrences

Definition at line 95 of file widgets.h.

    {};

virtual void MoveContent | ( | int | iStart,
|  | int | iEnd,
|  | bool | bVisibleValue
| ) |  | `[virtual]`

Search for all occurrences

virtual void ChangeWidth | ( | int | iWidth,
|  | bool | bVisibleValue
| ) |  | `[virtual]`

Search for all occurrences

Attribute* GetAttribute | ( | void |  | ) | const `[inline]`

Search for all occurrences

Definition at line 98 of file widgets.h.

    { return m_pAttribute; };

Node* GetNode | ( | void |  | ) | const `[inline]`

Search for all occurrences

Definition at line 99 of file widgets.h.

    { return m_pNode; };

## Member Data Documentation

QLabel m_cLabel `[protected]`

Search for all occurrences

Reimplemented in AttributeImagebox.

Definition at line 83 of file widgets.h.

QHBoxLayout m_cMainLayout `[protected]`

Search for all occurrences

Definition at line 84 of file widgets.h.

QHBoxLayout * m_pValueLayout `[protected]`

Search for all occurrences

Definition at line 84 of file widgets.h.

QHBoxLayout * m_pValueStretchLayout `[protected]`

Search for all occurrences

Definition at line 84 of file widgets.h.

QWidget m_cValue `[protected]`

Search for all occurrences

Definition at line 85 of file widgets.h.

float m_fLabelWidth `[protected]`

Search for all occurrences

Definition at line 86 of file widgets.h.

int m_iHeight `[protected]`

Search for all occurrences

Definition at line 87 of file widgets.h.

bool m_bLeftAlignedName `[protected]`

Search for all occurrences

Definition at line 88 of file widgets.h.

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

- Mudbox/widgets.h

AttributeWidget AttributeWidget AttributeWidget AttributeWidget AttributeWidget AttributeWidget AttributeWidget AttributeWidget AttributeWidget AttributeWidget
AttributeWidget AttributeWidget AttributeWidget AttributeWidget AttributeWidget AttributeWidget AttributeWidget AttributeWidget AttributeWidget AttributeWidget