Inherits MLABField.
Public Slots | |
Scripting access | |
| QVariantMap | deprecatedItemNames () const |
| QVariantList | deprecatedItemNames (MLABEnumItem *item) const |
| QVariantList | deprecatedItemNames (const QString &itemName) const |
| QStringList | info () |
| int | intValue () const |
| QStringList | items () |
| void | setIntValue (int value) |
| virtual void | setStringValue (const QString &value) |
| void | setValue (const QString &val) |
| QString | titleForItem (const QString &item) |
| QString | titleValue () |
The "value" property of this field is the item string. Each entry in the enumeration has an int value, a item and a user interface title Only the item string is saved to a file. Thus items should only be renamed/removed when backwards compability is NOT required. Use the user interface titles to change the representation of the enums in the GUI.
// getting value: var item = ctx.field("somefield").value; // setting value: ctx.field("somefield").value = "SomeItem";
| QVariantMap MLABEnumField::deprecatedItemNames | ( | ) | const [slot] |
returns a dictionary of deprecated names of all items.
| QVariantList MLABEnumField::deprecatedItemNames | ( | MLABEnumItem * | item | ) | const [slot] |
returns a list of deprecated names of a certain item.
| QVariantList MLABEnumField::deprecatedItemNames | ( | const QString & | itemName | ) | const [slot] |
returns a list of deprecated names of a certain item name.
| QStringList MLABEnumField::info | ( | ) | [slot] |
returns the items that can be set via setStringValue(), their int value and deprecatedNames
| int MLABEnumField::intValue | ( | ) | const [slot] |
deprecated: get the int enum value
| QStringList MLABEnumField::items | ( | ) | [slot] |
returns the items that can be set via setStringValue();
| void MLABEnumField::setIntValue | ( | int | value | ) | [slot] |
deprecated: set the int enum value
| virtual void MLABEnumField::setStringValue | ( | const QString & | value | ) | [virtual, slot] |
| void MLABEnumField::setValue | ( | const QString & | val | ) | [inline, slot] |
set string value (item string, not the title string)
| QString MLABEnumField::titleForItem | ( | const QString & | item | ) | [slot] |
get title for GUI for given item
| QString MLABEnumField::titleValue | ( | ) | [slot] |
get current title for GUI
1.5.8