Qyoto  4.0.6
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Properties
QtCore.QMetaEnum Class Reference

The QMetaEnum class provides meta-data about an enumerator. More...

Inheritance diagram for QtCore.QMetaEnum:
Collaboration diagram for QtCore.QMetaEnum:

Public Member Functions

 QMetaEnum ()
 
 QMetaEnum (QMetaEnum copy)
 
virtual void CreateProxy ()
 
new string Key (int index)
 
 
new int KeyToValue (string key)
 
 
new int KeysToValue (string keys)
 
 
new int Value (int index)
 
 
new string ValueToKey (int value)
 
 
new QByteArray ValueToKeys (int value)
 
 
new void Dispose ()
 

Protected Member Functions

 QMetaEnum (System.Type dummy)
 

Protected Attributes

SmokeInvocation interceptor
 

Properties

QMetaObject EnclosingMetaObject [get]
 
bool IsFlag [get]
 
 
bool IsValid [get]
 
 
int KeyCount [get]
 
 
string Name [get]
 
 
string Scope [get]
 
 
virtual System.IntPtr SmokeObject [get, set]
 

Detailed Description

The QMetaEnum class provides meta-data about an enumerator.

Use name() for the enumerator's name. The enumerator's keys (names of each enumerated item) are returned by key(); use keyCount() to find the number of keys. isFlag() returns whether the enumerator is meant to be used as a flag, meaning that its values can be combined using the OR operator.

The conversion functions keyToValue(), valueToKey(), keysToValue(), and valueToKeys() allow conversion between the integer representation of an enumeration or set value and its literal representation. The scope() function returns the class scope this enumerator was declared in.

See also QMetaObject, QMetaMethod, and QMetaProperty.

Constructor & Destructor Documentation

QtCore.QMetaEnum.QMetaEnum ( System.Type  dummy)
protected
QtCore.QMetaEnum.QMetaEnum ( )
QtCore.QMetaEnum.QMetaEnum ( QMetaEnum  copy)

Member Function Documentation

virtual void QtCore.QMetaEnum.CreateProxy ( )
virtual
new void QtCore.QMetaEnum.Dispose ( )
new string QtCore.QMetaEnum.Key ( int  index)

Returns the key with the given index, or 0 if no such key exists.

See also keyCount(), value(), and valueToKey().

new int QtCore.QMetaEnum.KeysToValue ( string  keys)

Returns the value derived from combining together the values of the keys using the OR operator, or -1 if keys is not defined. Note that the strings in keys must be '|'-separated.

See also isFlag(), valueToKey(), and valueToKeys().

new int QtCore.QMetaEnum.KeyToValue ( string  key)

Returns the integer value of the given enumeration key, or -1 if key is not defined.

For flag types, use keysToValue().

See also valueToKey(), isFlag(), and keysToValue().

new int QtCore.QMetaEnum.Value ( int  index)

Returns the value with the given index; or returns -1 if there is no such value.

See also keyCount(), key(), and keyToValue().

new string QtCore.QMetaEnum.ValueToKey ( int  value)

Returns the string that is used as the name of the given enumeration value, or 0 if value is not defined.

For flag types, use valueToKeys().

See also isFlag() and valueToKeys().

new QByteArray QtCore.QMetaEnum.ValueToKeys ( int  value)

Returns a byte array of '|'-separated keys that represents the given value.

See also isFlag(), valueToKey(), and keysToValue().

Member Data Documentation

SmokeInvocation QtCore.QMetaEnum.interceptor
protected

Property Documentation

QMetaObject QtCore.QMetaEnum.EnclosingMetaObject
get
bool QtCore.QMetaEnum.IsFlag
get

Returns true if this enumerator is used as a flag; otherwise returns false.

When used as flags, enumerators can be combined using the OR operator.

See also keysToValue() and valueToKeys().

bool QtCore.QMetaEnum.IsValid
get

Returns true if this enum is valid (has a name); otherwise returns false.

See also name().

int QtCore.QMetaEnum.KeyCount
get

Returns the number of keys.

See also key().

string QtCore.QMetaEnum.Name
get

Returns the name of the enumerator (without the scope).

For example, the Qt::AlignmentFlag enumeration has AlignmentFlag as the name and Qt as the scope.

See also isValid() and scope().

string QtCore.QMetaEnum.Scope
get

Returns the scope this enumerator was declared in.

For example, the Qt::AlignmentFlag enumeration has Qt as the scope and AlignmentFlag as the name.

See also name().

virtual System.IntPtr QtCore.QMetaEnum.SmokeObject
getset