#include <widgets.h>

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 |
| AttributeWidget | ( | QWidget * | pParent, |
| int | iWidth, | ||
| Attribute * | pAttribute | ||
| ) |
| ~AttributeWidget | ( | void | ) |
| void OnNodeEvent | ( | const Attribute & | cAttribute, |
| NodeEventType | cType | ||
| ) | [protected, virtual] |
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.
| 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 | ) |
| virtual void Update | ( | void | ) | [inline, virtual] |
Reimplemented in AttributeVectorbox, AttributeVector4box, AttributeEditbox, AttributeColorbox, AttributeSliderbox, AttributeSpinbox, AttributeCombobox, AttributePointerbox, AttributeCurveEditor, AttributeStampConfigurationWidget, and AttributeMirrorConfigurationWidget.
Definition at line 86 of file widgets.h.
{};
| virtual void MoveValue | ( | int | , |
| int | |||
| ) | [inline, virtual] |
| virtual void MoveContent | ( | int | iStart, |
| int | iEnd, | ||
| bool | bVisibleValue | ||
| ) | [virtual] |
| virtual void ChangeWidth | ( | int | iWidth, |
| bool | bVisibleValue | ||
| ) | [virtual] |
| Attribute* GetAttribute | ( | void | ) | const [inline] |
| Node* GetNode | ( | void | ) | const [inline] |
QLabel
m_cLabel [protected] |
Reimplemented in AttributeImagebox.
QHBoxLayout
m_cMainLayout [protected] |
QHBoxLayout *
m_pValueLayout [protected] |
QHBoxLayout *
m_pValueStretchLayout [protected] |
QWidget
m_cValue [protected] |
float
m_fLabelWidth [protected] |
int
m_iHeight [protected] |
bool
m_bLeftAlignedName [protected] |