Qyoto
4.0.5
Qyoto is a C# language binding for Qt
|
The QMetaProperty class provides meta-data about a property. More...
Public Member Functions | |
QMetaProperty () | |
QMetaProperty (QMetaProperty copy) | |
virtual void | CreateProxy () |
new QMetaObject | EnclosingMetaObject () |
new QMetaEnum | Enumerator () |
| |
new bool | HasNotifySignal () |
| |
new bool | HasStdCppSet () |
new bool | IsConstant () |
| |
new bool | IsDesignable (QObject obj=null) |
| |
new bool | IsEditable (QObject obj=null) |
| |
new bool | IsEnumType () |
| |
new bool | IsFinal () |
| |
new bool | IsFlagType () |
| |
new bool | IsReadable () |
| |
new bool | IsResettable () |
| |
new bool | IsScriptable (QObject obj=null) |
| |
new bool | IsStored (QObject obj=null) |
| |
new bool | IsUser (QObject obj=null) |
| |
new bool | IsValid () |
| |
new bool | IsWritable () |
| |
new string | Name () |
| |
new QMetaMethod | NotifySignal () |
| |
new int | NotifySignalIndex () |
| |
new int | PropertyIndex () |
| |
new object | Read (QObject obj) |
| |
new bool | Reset (QObject obj) |
| |
new int | Revision () |
new QVariant.Type | Type () |
| |
new string | TypeName () |
| |
new int | UserType () |
| |
new bool | Write (QObject obj, object value) |
| |
new void | Dispose () |
Protected Member Functions | |
QMetaProperty (System.Type dummy) | |
Protected Attributes | |
SmokeInvocation | interceptor |
Properties | |
virtual System.IntPtr | SmokeObject [get, set] |
The QMetaProperty class provides meta-data about a property.
Property meta-data is obtained from an object's meta-object. See QMetaObject::property() and QMetaObject::propertyCount() for details.
Property Meta-Data
A property has a name() and a type(), as well as various attributes that specify its behavior: isReadable(), isWritable(), isDesignable(), isScriptable(), and isStored().
If the property is an enumeration, isEnumType() returns true; if the property is an enumeration that is also a flag (i.e. its values can be combined using the OR operator), isEnumType() and isFlagType() both return true. The enumerator for these types is available from enumerator().
The property's values are set and retrieved with read(), write(), and reset(); they can also be changed through QObject's set and get functions. See QObject::setProperty() and QObject::property() for details.
Copying and Assignment
QMetaProperty objects can be copied by value. However, each copy will refer to the same underlying property meta-data.
See also QMetaObject, QMetaEnum, QMetaMethod, and Qt's Property System.
|
protected |
QtCore.QMetaProperty.QMetaProperty | ( | ) |
QtCore.QMetaProperty.QMetaProperty | ( | QMetaProperty | copy | ) |
|
virtual |
new void QtCore.QMetaProperty.Dispose | ( | ) |
new QMetaObject QtCore.QMetaProperty.EnclosingMetaObject | ( | ) |
new QMetaEnum QtCore.QMetaProperty.Enumerator | ( | ) |
Returns the enumerator if this property's type is an enumerator type; otherwise the returned value is undefined.
See also isEnumType() and isFlagType().
new bool QtCore.QMetaProperty.HasNotifySignal | ( | ) |
Returns true if this property has a corresponding change notify signal; otherwise returns false.
See also notifySignal().
new bool QtCore.QMetaProperty.HasStdCppSet | ( | ) |
new bool QtCore.QMetaProperty.IsConstant | ( | ) |
Returns true if the property is constant; otherwise returns false.
A property is constant if the Q_PROPERTY()'s CONSTANT attribute is set.
This function was introduced in Qt 4.6.
new bool QtCore.QMetaProperty.IsDesignable | ( | QObject | obj = null | ) |
Returns true if this property is designable for the given object; otherwise returns false.
If no object is given, the function returns false if the Q_PROPERTY()'s DESIGNABLE attribute is false; otherwise returns true (if the attribute is true or is a function or expression).
See also isScriptable() and isStored().
new bool QtCore.QMetaProperty.IsEditable | ( | QObject | obj = null | ) |
Returns true if the property is editable for the given object; otherwise returns false.
If no object is given, the function returns false if the Q_PROPERTY()'s EDITABLE attribute is false; otherwise returns true (if the attribute is true or is a function or expression).
See also isDesignable(), isScriptable(), and isStored().
new bool QtCore.QMetaProperty.IsEnumType | ( | ) |
Returns true if the property's type is an enumeration value; otherwise returns false.
See also enumerator() and isFlagType().
new bool QtCore.QMetaProperty.IsFinal | ( | ) |
Returns true if the property is final; otherwise returns false.
A property is final if the Q_PROPERTY()'s FINAL attribute is set.
This function was introduced in Qt 4.6.
new bool QtCore.QMetaProperty.IsFlagType | ( | ) |
Returns true if the property's type is an enumeration value that is used as a flag; otherwise returns false.
Flags can be combined using the OR operator. A flag type is implicitly also an enum type.
See also isEnumType(), enumerator(), and QMetaEnum::isFlag().
new bool QtCore.QMetaProperty.IsReadable | ( | ) |
Returns true if this property is readable; otherwise returns false.
See also isWritable(), read(), and isValid().
new bool QtCore.QMetaProperty.IsResettable | ( | ) |
Returns true if this property can be reset to a default value; otherwise returns false.
See also reset().
new bool QtCore.QMetaProperty.IsScriptable | ( | QObject | obj = null | ) |
Returns true if the property is scriptable for the given object; otherwise returns false.
If no object is given, the function returns false if the Q_PROPERTY()'s SCRIPTABLE attribute is false; otherwise returns true (if the attribute is true or is a function or expression).
See also isDesignable() and isStored().
new bool QtCore.QMetaProperty.IsStored | ( | QObject | obj = null | ) |
Returns true if the property is stored for object; otherwise returns false.
If no object is given, the function returns false if the Q_PROPERTY()'s STORED attribute is false; otherwise returns true (if the attribute is true or is a function or expression).
See also isDesignable() and isScriptable().
new bool QtCore.QMetaProperty.IsUser | ( | QObject | obj = null | ) |
Returns true if this property is designated as the USER property, i.e., the one that the user can edit for object or that is significant in some other way. Otherwise it returns false. e.g., the text property is the USER editable property of a QLineEdit.
If object is null, the function returns false if the Q_PROPERTY()'s USER attribute is false. Otherwise it returns true.
See also QMetaObject::userProperty(), isDesignable(), and isScriptable().
new bool QtCore.QMetaProperty.IsValid | ( | ) |
Returns true if this property is valid (readable); otherwise returns false.
See also isReadable().
new bool QtCore.QMetaProperty.IsWritable | ( | ) |
Returns true if this property is writable; otherwise returns false.
See also isReadable() and write().
new string QtCore.QMetaProperty.Name | ( | ) |
Returns this property's name.
See also type() and typeName().
new QMetaMethod QtCore.QMetaProperty.NotifySignal | ( | ) |
Returns the QMetaMethod instance of the property change notifying signal if one was specified, otherwise returns an invalid QMetaMethod.
This function was introduced in Qt 4.5.
See also hasNotifySignal().
new int QtCore.QMetaProperty.NotifySignalIndex | ( | ) |
Returns the index of the property change notifying signal if one was specified, otherwise returns -1.
This function was introduced in Qt 4.6.
See also hasNotifySignal().
new int QtCore.QMetaProperty.PropertyIndex | ( | ) |
Returns this property's index.
This function was introduced in Qt 4.6.
new object QtCore.QMetaProperty.Read | ( | QObject | obj | ) |
Reads the property's value from the given object. Returns the value if it was able to read it; otherwise returns an invalid variant.
See also write(), reset(), and isReadable().
new bool QtCore.QMetaProperty.Reset | ( | QObject | obj | ) |
Resets the property for the given object with a reset method. Returns true if the reset worked; otherwise returns false.
Reset methods are optional; only a few properties support them.
See also read() and write().
new int QtCore.QMetaProperty.Revision | ( | ) |
new QVariant.Type QtCore.QMetaProperty.Type | ( | ) |
Returns this property's type. The return value is one of the values of the QVariant::Type enumeration.
See also userType(), typeName(), and name().
new string QtCore.QMetaProperty.TypeName | ( | ) |
Returns the name of this property's type.
See also type() and name().
new int QtCore.QMetaProperty.UserType | ( | ) |
new bool QtCore.QMetaProperty.Write | ( | QObject | obj, |
object | value | ||
) |
Writes value as the property's value to the given object. Returns true if the write succeeded; otherwise returns false.
See also read(), reset(), and isWritable().
|
protected |
|
getset |