mudbox::AttributeEnumeration Class Reference

#include <node.h>

Inheritance diagram for mudbox::AttributeEnumeration:

Inheritance graph
[legend]
List of all members.

Detailed Description

This attribute is very similar to the aint type but on the user interface it will be displayed as a combobox, and the user will be able to choose its value from a list.

Public Member Functions

  AttributeEnumeration (Node *pOwner, const QString &sID)
  OPERATORS (int)
AttributeWidget CreateEditorWidget (QWidget *pParent, int iWidth)
unsigned int  AddItem (const QString &sValue)
  Add a new value to the attribute. The values will be assigned by calling order to this function, so the first given string will mean value 0, second will mean 1 and so on.
void  SetItem (unsigned int iIndex, const QString &sValue)
AttributeEnumeration operator<< (const char *sValue)
  This operator is provided to make it easier to fill the possible values for the attribute.
unsigned int  ItemCount (void) const
  Returns the number of items in the enumeration.
void  Clear (void)
QString  Item (unsigned int iIndex) const

Constructor & Destructor Documentation

mudbox::AttributeEnumeration::AttributeEnumeration Node pOwner,
const QString &  sID
 

Member Function Documentation

mudbox::AttributeEnumeration::OPERATORS int   ) 
 

Reimplemented from mudbox::AttributeInstance< int >.

AttributeWidget* mudbox::AttributeEnumeration::CreateEditorWidget QWidget *  pParent,
int  iWidth
[virtual]
 

Reimplemented from mudbox::AttributeInstance< int >.

unsigned int mudbox::AttributeEnumeration::AddItem const QString &  sValue  ) 
 

Add a new value to the attribute. The values will be assigned by calling order to this function, so the first given string will mean value 0, second will mean 1 and so on.

void mudbox::AttributeEnumeration::SetItem unsigned int  iIndex,
const QString &  sValue
 
AttributeEnumeration& mudbox::AttributeEnumeration::operator<< const char *  sValue  ) 
 

This operator is provided to make it easier to fill the possible values for the attribute.

You can write:

        m_eImageType << "gif" << "bmp" << "jpg" << "tif";
Which is the same as
        n_eImageType.AddValue( "gif" );
        n_eImageType.AddValue( "bmp" );
        n_eImageType.AddValue( "jpg" );
        n_eImageType.AddValue( "tif" );
unsigned int mudbox::AttributeEnumeration::ItemCount void   )  const
 

Returns the number of items in the enumeration.

void mudbox::AttributeEnumeration::Clear void   ) 
 
QString mudbox::AttributeEnumeration::Item unsigned int  iIndex  )  const
 

mudbox::AttributeEnumeration mudbox::AttributeEnumeration mudbox::AttributeEnumeration mudbox::AttributeEnumeration mudbox::AttributeEnumeration mudbox::AttributeEnumeration mudbox::AttributeEnumeration mudbox::AttributeEnumeration mudbox::AttributeEnumeration mudbox::AttributeEnumeration
mudbox::AttributeEnumeration mudbox::AttributeEnumeration mudbox::AttributeEnumeration mudbox::AttributeEnumeration mudbox::AttributeEnumeration mudbox::AttributeEnumeration mudbox::AttributeEnumeration mudbox::AttributeEnumeration mudbox::AttributeEnumeration mudbox::AttributeEnumeration