[][src]Struct qt_core::QMetaProperty

#[repr(C)]
pub struct QMetaProperty { /* fields omitted */ }

The QMetaProperty class provides meta-data about a property.

C++ class: QMetaProperty.

C++ documentation:

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.

Methods

impl QMetaProperty[src]

pub unsafe fn copy_from(
    &mut self,
    other: impl CastInto<Ref<QMetaProperty>>
) -> MutRef<QMetaProperty>
[src]

The QMetaProperty class provides meta-data about a property.

Calls C++ function: QMetaProperty& QMetaProperty::operator=(const QMetaProperty& other).

C++ documentation:

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.

pub unsafe fn enclosing_meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: const QMetaObject* QMetaProperty::enclosingMetaObject() const.

pub unsafe fn enumerator(&self) -> CppBox<QMetaEnum>[src]

Returns the enumerator if this property's type is an enumerator type; otherwise the returned value is undefined.

Calls C++ function: QMetaEnum QMetaProperty::enumerator() const.

C++ documentation:

Returns the enumerator if this property's type is an enumerator type; otherwise the returned value is undefined.

See also isEnumType() and isFlagType().

pub unsafe fn has_notify_signal(&self) -> bool[src]

Returns true if this property has a corresponding change notify signal; otherwise returns false.

Calls C++ function: bool QMetaProperty::hasNotifySignal() const.

C++ documentation:

Returns true if this property has a corresponding change notify signal; otherwise returns false.

See also notifySignal().

pub unsafe fn has_std_cpp_set(&self) -> bool[src]

Calls C++ function: bool QMetaProperty::hasStdCppSet() const.

pub unsafe fn is_constant(&self) -> bool[src]

Returns true if the property is constant; otherwise returns false.

Calls C++ function: bool QMetaProperty::isConstant() const.

C++ documentation:

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.

pub unsafe fn is_designable_1a(&self, obj: impl CastInto<Ptr<QObject>>) -> bool[src]

Returns true if this property is designable for the given object; otherwise returns false.

Calls C++ function: bool QMetaProperty::isDesignable(const QObject* obj = …) const.

C++ documentation:

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

pub unsafe fn is_designable_0a(&self) -> bool[src]

Returns true if this property is designable for the given object; otherwise returns false.

Calls C++ function: bool QMetaProperty::isDesignable() const.

C++ documentation:

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

pub unsafe fn is_editable_1a(&self, obj: impl CastInto<Ptr<QObject>>) -> bool[src]

Returns true if the property is editable for the given object; otherwise returns false.

Calls C++ function: bool QMetaProperty::isEditable(const QObject* obj = …) const.

C++ documentation:

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

pub unsafe fn is_editable_0a(&self) -> bool[src]

Returns true if the property is editable for the given object; otherwise returns false.

Calls C++ function: bool QMetaProperty::isEditable() const.

C++ documentation:

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

pub unsafe fn is_enum_type(&self) -> bool[src]

Returns true if the property's type is an enumeration value; otherwise returns false.

Calls C++ function: bool QMetaProperty::isEnumType() const.

C++ documentation:

Returns true if the property's type is an enumeration value; otherwise returns false.

See also enumerator() and isFlagType().

pub unsafe fn is_final(&self) -> bool[src]

Returns true if the property is final; otherwise returns false.

Calls C++ function: bool QMetaProperty::isFinal() const.

C++ documentation:

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.

pub unsafe fn is_flag_type(&self) -> bool[src]

Returns true if the property's type is an enumeration value that is used as a flag; otherwise returns false.

Calls C++ function: bool QMetaProperty::isFlagType() const.

C++ documentation:

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

pub unsafe fn is_readable(&self) -> bool[src]

Returns true if this property is readable; otherwise returns false.

Calls C++ function: bool QMetaProperty::isReadable() const.

C++ documentation:

Returns true if this property is readable; otherwise returns false.

See also isWritable(), read(), and isValid().

pub unsafe fn is_resettable(&self) -> bool[src]

Returns true if this property can be reset to a default value; otherwise returns false.

Calls C++ function: bool QMetaProperty::isResettable() const.

C++ documentation:

Returns true if this property can be reset to a default value; otherwise returns false.

See also reset().

pub unsafe fn is_scriptable_1a(&self, obj: impl CastInto<Ptr<QObject>>) -> bool[src]

Returns true if the property is scriptable for the given object; otherwise returns false.

Calls C++ function: bool QMetaProperty::isScriptable(const QObject* obj = …) const.

C++ documentation:

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

pub unsafe fn is_scriptable_0a(&self) -> bool[src]

Returns true if the property is scriptable for the given object; otherwise returns false.

Calls C++ function: bool QMetaProperty::isScriptable() const.

C++ documentation:

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

pub unsafe fn is_stored_1a(&self, obj: impl CastInto<Ptr<QObject>>) -> bool[src]

Returns true if the property is stored for object; otherwise returns false.

Calls C++ function: bool QMetaProperty::isStored(const QObject* obj = …) const.

C++ documentation:

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

pub unsafe fn is_stored_0a(&self) -> bool[src]

Returns true if the property is stored for object; otherwise returns false.

Calls C++ function: bool QMetaProperty::isStored() const.

C++ documentation:

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

pub unsafe fn is_user_1a(&self, obj: impl CastInto<Ptr<QObject>>) -> bool[src]

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.

Calls C++ function: bool QMetaProperty::isUser(const QObject* obj = …) const.

C++ documentation:

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

pub unsafe fn is_user_0a(&self) -> bool[src]

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.

Calls C++ function: bool QMetaProperty::isUser() const.

C++ documentation:

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

pub unsafe fn is_valid(&self) -> bool[src]

Returns true if this property is valid (readable); otherwise returns false.

Calls C++ function: bool QMetaProperty::isValid() const.

C++ documentation:

Returns true if this property is valid (readable); otherwise returns false.

See also isReadable().

pub unsafe fn is_writable(&self) -> bool[src]

Returns true if this property is writable; otherwise returns false.

Calls C++ function: bool QMetaProperty::isWritable() const.

C++ documentation:

Returns true if this property is writable; otherwise returns false.

See also isReadable() and write().

pub unsafe fn name(&self) -> Ptr<c_char>[src]

Returns this property's name.

Calls C++ function: const char* QMetaProperty::name() const.

C++ documentation:

Returns this property's name.

See also type() and typeName().

pub unsafe fn new() -> CppBox<QMetaProperty>[src]

Calls C++ function: [constructor] void QMetaProperty::QMetaProperty().

pub unsafe fn new_copy(
    other: impl CastInto<Ref<QMetaProperty>>
) -> CppBox<QMetaProperty>
[src]

The QMetaProperty class provides meta-data about a property.

Calls C++ function: [constructor] void QMetaProperty::QMetaProperty(const QMetaProperty& other).

C++ documentation:

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.

pub unsafe fn notify_signal(&self) -> CppBox<QMetaMethod>[src]

Returns the QMetaMethod instance of the property change notifying signal if one was specified, otherwise returns an invalid QMetaMethod.

Calls C++ function: QMetaMethod QMetaProperty::notifySignal() const.

C++ documentation:

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

pub unsafe fn notify_signal_index(&self) -> c_int[src]

Returns the index of the property change notifying signal if one was specified, otherwise returns -1.

Calls C++ function: int QMetaProperty::notifySignalIndex() const.

C++ documentation:

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

pub unsafe fn property_index(&self) -> c_int[src]

Returns this property's index.

Calls C++ function: int QMetaProperty::propertyIndex() const.

C++ documentation:

Returns this property's index.

This function was introduced in Qt 4.6.

pub unsafe fn read(&self, obj: impl CastInto<Ptr<QObject>>) -> CppBox<QVariant>[src]

Reads the property's value from the given object. Returns the value if it was able to read it; otherwise returns an invalid variant.

Calls C++ function: QVariant QMetaProperty::read(const QObject* obj) const.

C++ documentation:

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

pub unsafe fn read_on_gadget(
    &self,
    gadget: impl CastInto<Ptr<c_void>>
) -> CppBox<QVariant>
[src]

Reads the property's value from the given gadget. Returns the value if it was able to read it; otherwise returns an invalid variant.

Calls C++ function: QVariant QMetaProperty::readOnGadget(const void* gadget) const.

C++ documentation:

Reads the property's value from the given gadget. Returns the value if it was able to read it; otherwise returns an invalid variant.

This function should only be used if this is a property of a Q_GADGET

This function was introduced in Qt 5.5.

pub unsafe fn reset(&self, obj: impl CastInto<MutPtr<QObject>>) -> bool[src]

Resets the property for the given object with a reset method. Returns true if the reset worked; otherwise returns false.

Calls C++ function: bool QMetaProperty::reset(QObject* obj) const.

C++ documentation:

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

pub unsafe fn reset_on_gadget(
    &self,
    gadget: impl CastInto<MutPtr<c_void>>
) -> bool
[src]

Resets the property for the given gadget with a reset method. Returns true if the reset worked; otherwise returns false.

Calls C++ function: bool QMetaProperty::resetOnGadget(void* gadget) const.

C++ documentation:

Resets the property for the given gadget with a reset method. Returns true if the reset worked; otherwise returns false.

Reset methods are optional; only a few properties support them.

This function should only be used if this is a property of a Q_GADGET

This function was introduced in Qt 5.5.

pub unsafe fn revision(&self) -> c_int[src]

Returns the property revision if one was specified by REVISION, otherwise returns 0.

Calls C++ function: int QMetaProperty::revision() const.

C++ documentation:

Returns the property revision if one was specified by REVISION, otherwise returns 0.

This function was introduced in Qt 5.1.

pub unsafe fn type_(&self) -> Type[src]

Returns this property's type. The return value is one of the values of the QVariant::Type enumeration.

Calls C++ function: QVariant::Type QMetaProperty::type() const.

C++ documentation:

Returns this property's type. The return value is one of the values of the QVariant::Type enumeration.

See also userType(), typeName(), and name().

pub unsafe fn type_name(&self) -> Ptr<c_char>[src]

Returns the name of this property's type.

Calls C++ function: const char* QMetaProperty::typeName() const.

C++ documentation:

Returns the name of this property's type.

See also type() and name().

pub unsafe fn user_type(&self) -> c_int[src]

Returns this property's user type. The return value is one of the values that are registered with QMetaType, or QMetaType::UnknownType if the type is not registered.

Calls C++ function: int QMetaProperty::userType() const.

C++ documentation:

Returns this property's user type. The return value is one of the values that are registered with QMetaType, or QMetaType::UnknownType if the type is not registered.

This function was introduced in Qt 4.2.

See also type(), QMetaType, and typeName().

pub unsafe fn write(
    &self,
    obj: impl CastInto<MutPtr<QObject>>,
    value: impl CastInto<Ref<QVariant>>
) -> bool
[src]

Writes value as the property's value to the given object. Returns true if the write succeeded; otherwise returns false.

Calls C++ function: bool QMetaProperty::write(QObject* obj, const QVariant& value) const.

C++ documentation:

Writes value as the property's value to the given object. Returns true if the write succeeded; otherwise returns false.

If value is not of the same type type as the property, a conversion is attempted. An empty QVariant() is equivalent to a call to reset() if this property is resetable, or setting a default-constructed object otherwise.

See also read(), reset(), and isWritable().

pub unsafe fn write_on_gadget(
    &self,
    gadget: impl CastInto<MutPtr<c_void>>,
    value: impl CastInto<Ref<QVariant>>
) -> bool
[src]

Writes value as the property's value to the given gadget. Returns true if the write succeeded; otherwise returns false.

Calls C++ function: bool QMetaProperty::writeOnGadget(void* gadget, const QVariant& value) const.

C++ documentation:

Writes value as the property's value to the given gadget. Returns true if the write succeeded; otherwise returns false.

This function should only be used if this is a property of a Q_GADGET

This function was introduced in Qt 5.5.

Trait Implementations

impl CppDeletable for QMetaProperty[src]

unsafe fn delete(&mut self)[src]

The QMetaProperty class provides meta-data about a property.

Calls C++ function: [destructor] void QMetaProperty::~QMetaProperty().

C++ documentation:

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.

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]