MLABEnumField Class Reference
[Fields]

A field containing an enumeration value. More...

Inherits MLABField.

List of all members.

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 ()


Detailed Description

A field containing an enumeration value.

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";

Member Function Documentation

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

Warning:
dont use!

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

Warning:
dont use!

virtual void MLABEnumField::setStringValue ( const QString &  value  )  [virtual, slot]

set string value (item string, not the title string)

Reimplemented from MLABField.

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


Generated on Sat Sep 3 18:38:02 2011 for MeVisLab Scripting Reference by  doxygen 1.5.8