Inheritance diagram for DzEnumProperty:
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()" |
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.
DzEnumProperty::DzEnumProperty | ( | ) |
Default Constructor. Creates a non-animatable, non-user property.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
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. |
Adds a string to the available choices for this property. Duplicates are not allowed.
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. |
i | The index of the item to return. |
Number DzEnumProperty::getNumItems | ( | ) |
String DzEnumProperty::getStringDefaultValue | ( | ) |
i | The index of the key to return the value of. |
tm | The scene time at which to get the value. |
String DzEnumProperty::getStringValue | ( | ) |
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.
Removes the item at the given index.
idx | The index of the item to remove. |
Replaces the item at the given index with the given string.
index | The index of the item to replace. | |
item | The new item to place into the list. |