AttributeWidget Class Reference


Detailed Description

Definition at line 64 of file widgets.h.

#include <widgets.h>

Inheritance diagram for AttributeWidget:
Inheritance graph
[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]

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  )
virtual void MoveValue ( int  ,
int   
) [inline, virtual]

Definition at line 87 of file widgets.h.

{};
virtual void MoveContent ( int  iStart,
int  iEnd,
bool  bVisibleValue 
) [virtual]
virtual void ChangeWidth ( int  iWidth,
bool  bVisibleValue 
) [virtual]
Attribute* GetAttribute ( void  ) const [inline]

Definition at line 90 of file widgets.h.

{ return m_pAttribute; };
Node* GetNode ( void  ) const [inline]

Definition at line 91 of file widgets.h.

{ return m_pNode; };

Member Data Documentation

QLabel m_cLabel [protected]

Reimplemented in AttributeImagebox.

Definition at line 75 of file widgets.h.

QHBoxLayout m_cMainLayout [protected]

Definition at line 76 of file widgets.h.

QHBoxLayout * m_pValueLayout [protected]

Definition at line 76 of file widgets.h.

QHBoxLayout * m_pValueStretchLayout [protected]

Definition at line 76 of file widgets.h.

QWidget m_cValue [protected]

Definition at line 77 of file widgets.h.

float m_fLabelWidth [protected]

Definition at line 78 of file widgets.h.

int m_iHeight [protected]

Definition at line 79 of file widgets.h.

bool m_bLeftAlignedName [protected]

Definition at line 80 of file widgets.h.


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

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