DzEnumProperty Class Reference
[Property Objects]

An animatible enum property. More...

Inheritance diagram for DzEnumProperty:

DzIntProperty DzNumericProperty DzProperty DzBase QObject Object List of all members.

Methods

Number addItem (String item, Number index=-1)
String getItem (Number i)
Number getNumItems ()
String getStringDefaultValue ()
String getStringKeyValue (Number i)
String getStringValue (DzTime tm)
String getStringValue ()
String getUniqueItemString (String item)
void removeAllItems ()
Boolean removeItem (Number index)
Boolean replaceItem (Number index, String item)

Constructors

 DzEnumProperty (String name, Boolean canAnimate, Boolean isUserProperty)
 DzEnumProperty ()

Signals

void itemListChanged ()
 Signature: "itemListChanged()"

Detailed Description

An animatible enum property.

This class provides an animatable enumerated property that is stored and can be accessed as an integer property. It maintains a list of strings that correspond to the integer value of the property.


Constructor & Destructor Documentation

DzEnumProperty::DzEnumProperty (  ) 

Default Constructor. Creates a non-animatable, non-user property.

DzEnumProperty::DzEnumProperty ( String  name,
Boolean  canAnimate,
Boolean  isUserProperty 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:
name The name of this property.
canAnimate If true, creates an animatable property.
isUserProperty If true, create a user property. User properties are properties that can be added/deleted by users.


Member Function Documentation

Number DzEnumProperty::addItem ( String  item,
Number  index = -1 
)

Adds a string to the available choices for this property. Duplicates are not allowed.

Parameters:
item The string to add to the list of items.
index The index to insert the item at. If invalid, the item is appended to the list.
Returns:
The index of the newly added item is returned, or -1 on error.

String DzEnumProperty::getItem ( Number  i  ) 

Parameters:
i The index of the item to return.
Returns:
The string representation of the i'th item.

Number DzEnumProperty::getNumItems (  ) 

Returns:
The number of enum items.

String DzEnumProperty::getStringDefaultValue (  ) 

Returns:
The string representation of the default value.

String DzEnumProperty::getStringKeyValue ( Number  i  ) 

Parameters:
i The index of the key to return the value of.
Returns:
The string representation of the i'th key value.

String DzEnumProperty::getStringValue ( DzTime  tm  ) 

Parameters:
tm The scene time at which to get the value.
Returns:
The string representation of the value at the given time.

String DzEnumProperty::getStringValue (  ) 

Returns:
The string representation of the current value.

String DzEnumProperty::getUniqueItemString ( String  item  ) 

Returns:
An item string that is guaranteed to be unique. If
Parameters:
item is not already in the list, it is returned. Otherwise, a number will be appended to
item to make it unique.

DzEnumProperty::itemListChanged (  )  [signal]

Signature: "itemListChanged()"

Emitted when the item list (list of legal values for this property) changes.

void DzEnumProperty::removeAllItems (  ) 

Removes all items and makes this property essentially invalid.

Boolean DzEnumProperty::removeItem ( Number  index  ) 

Removes the item at the given index.

Parameters:
idx The index of the item to remove.
Returns:
true if the item was successfully removed, false on error.

Boolean DzEnumProperty::replaceItem ( Number  index,
String  item 
)

Replaces the item at the given index with the given string.

Parameters:
index The index of the item to replace.
item The new item to place into the list.
Returns:
false if the index is out of range or the string is invalid (empty).


Generated on Thu Sep 24 12:21:11 2009

Copyright © 2002 - 2009 DAZ 3D, Inc.