Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QQmlOpenMetaObject Class Reference

#include <qqmlopenmetaobject_p.h>

+ Inheritance diagram for QQmlOpenMetaObject:
+ Collaboration diagram for QQmlOpenMetaObject:

Public Member Functions

 QQmlOpenMetaObject (QObject *, const QMetaObject *=nullptr)
 
 QQmlOpenMetaObject (QObject *, const QQmlRefPointer< QQmlOpenMetaObjectType > &)
 
 ~QQmlOpenMetaObject () override
 
QVariant value (const QByteArray &) const
 
bool setValue (const QByteArray &, const QVariant &, bool force=false)
 
void setValues (const QHash< QByteArray, QVariant > &, bool force=false)
 
QVariant value (int) const
 
void setValue (int, const QVariant &)
 
QVariantvalueRef (const QByteArray &)
 
bool hasValue (int) const
 
int count () const
 
QByteArray name (int) const
 
QObjectobject () const
 
virtual QVariant initialValue (int)
 
void setCached (bool)
 
bool autoCreatesProperties () const
 
void setAutoCreatesProperties (bool autoCreate)
 
QQmlOpenMetaObjectTypetype () const
 
void emitPropertyNotification (const QByteArray &propertyName)
 
void unparent ()
 
- Public Member Functions inherited from QAbstractDynamicMetaObject
 ~QAbstractDynamicMetaObject ()
 
QMetaObjecttoDynamicMetaObject (QObject *) override
 
virtual int metaCall (QMetaObject::Call, int _id, void **)
 
- Public Member Functions inherited from QDynamicMetaObjectData
virtual ~QDynamicMetaObjectData ()
 
virtual void objectDestroyed (QObject *)
 
- Public Member Functions inherited from QMetaObject
const char * className () const
 Returns the class name.
 
const QMetaObjectsuperClass () const
 Returns the meta-object of the superclass, or \nullptr if there is no such object.
 
bool inherits (const QMetaObject *metaObject) const noexcept
 Returns true if the class described by this QMetaObject inherits the type described by metaObject; otherwise returns false.
 
QObjectcast (QObject *obj) const
 
const QObjectcast (const QObject *obj) const
 
QString tr (const char *s, const char *c, int n=-1) const
 
QMetaType metaType () const
 
int methodOffset () const
 Returns the method offset for this class; i.e.
 
int enumeratorOffset () const
 Returns the enumerator offset for this class; i.e.
 
int propertyOffset () const
 Returns the property offset for this class; i.e.
 
int classInfoOffset () const
 Returns the class information offset for this class; i.e.
 
int constructorCount () const
 
int methodCount () const
 Returns the number of methods in this class, including the number of methods provided by each base class.
 
int enumeratorCount () const
 Returns the number of enumerators in this class.
 
int propertyCount () const
 Returns the number of properties in this class, including the number of properties provided by each base class.
 
int classInfoCount () const
 Returns the number of items of class information in this class.
 
int indexOfConstructor (const char *constructor) const
 
int indexOfMethod (const char *method) const
 Finds method and returns its index; otherwise returns -1.
 
int indexOfSignal (const char *signal) const
 Finds signal and returns its index; otherwise returns -1.
 
int indexOfSlot (const char *slot) const
 Finds slot and returns its index; otherwise returns -1.
 
int indexOfEnumerator (const char *name) const
 Finds enumerator name and returns its index; otherwise returns -1.
 
int indexOfProperty (const char *name) const
 Finds property name and returns its index; otherwise returns -1.
 
int indexOfClassInfo (const char *name) const
 Finds class information item name and returns its index; otherwise returns -1.
 
QMetaMethod constructor (int index) const
 
QMetaMethod method (int index) const
 Returns the meta-data for the method with the given index.
 
QMetaEnum enumerator (int index) const
 Returns the meta-data for the enumerator with the given index.
 
QMetaProperty property (int index) const
 Returns the meta-data for the property with the given index.
 
QMetaClassInfo classInfo (int index) const
 Returns the meta-data for the item of class information with the given index.
 
QMetaProperty userProperty () const
 
template<typename... Args>
QtPrivate::Invoke::IfNotOldStyleArgs< QObject *, Args... > newInstance (Args &&... arguments) const
 
int static_metacall (Call, int, void **) const
 
 ~Connection ()
 
 Connection ()
 
 Connection (const Connection &other)
 
Connectionoperator= (const Connection &other)
 
 operator RestrictedBool () const
 
 Connection (Connection &&other) noexcept
 
void swap (Connection &other) noexcept
 

Protected Member Functions

int metaCall (QObject *o, QMetaObject::Call _c, int _id, void **_a) override
 
int createProperty (const char *, const char *) override
 
virtual void propertyRead (int)
 
virtual void propertyWrite (int)
 
virtual QVariant propertyWriteValue (int, const QVariant &)
 
virtual void propertyWritten (int)
 
virtual void propertyCreated (int, QMetaPropertyBuilder &)
 
QDynamicMetaObjectDataparent () const
 
bool checkedSetValue (int index, const QVariant &value, bool force)
 

Friends

class QQmlOpenMetaObjectType
 

Additional Inherited Members

- Public Types inherited from QMetaObject
enum  Call {
  InvokeMetaMethod , ReadProperty , WriteProperty , ResetProperty ,
  CreateInstance , IndexOfMethod , RegisterPropertyMetaType , RegisterMethodArgumentMetaType ,
  BindableProperty , CustomCall , ConstructInPlace
}
 
typedef void *Connection::* RestrictedBool
 
- Static Public Member Functions inherited from QMetaObject
static bool checkConnectArgs (const char *signal, const char *method)
 Returns true if the signal and method arguments are compatible; otherwise returns false.
 
static bool checkConnectArgs (const QMetaMethod &signal, const QMetaMethod &method)
 
static QByteArray normalizedSignature (const char *method)
 Normalizes the signature of the given method.
 
static QByteArray normalizedType (const char *type)
 
static Connection connect (const QObject *sender, int signal_index, const QObject *receiver, int method_index, int type=0, int *types=nullptr)
 
static bool disconnect (const QObject *sender, int signal_index, const QObject *receiver, int method_index)
 
static bool disconnectOne (const QObject *sender, int signal_index, const QObject *receiver, int method_index)
 
static void connectSlotsByName (QObject *o)
 Searches recursively for all child objects of the given object, and connects matching signals from them to slots of object that follow the following form:
 
static void activate (QObject *sender, int signal_index, void **argv)
 
static void activate (QObject *sender, const QMetaObject *, int local_signal_index, void **argv)
 
static void activate (QObject *sender, int signal_offset, int local_signal_index, void **argv)
 
static bool invokeMethod (QObject *obj, const char *member, Qt::ConnectionType, QGenericReturnArgument ret, QGenericArgument val0=QGenericArgument(nullptr), QGenericArgument val1=QGenericArgument(), QGenericArgument val2=QGenericArgument(), QGenericArgument val3=QGenericArgument(), QGenericArgument val4=QGenericArgument(), QGenericArgument val5=QGenericArgument(), QGenericArgument val6=QGenericArgument(), QGenericArgument val7=QGenericArgument(), QGenericArgument val8=QGenericArgument(), QGenericArgument val9=QGenericArgument())
 \threadsafe This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. \obsolete [6.5] Please use the variadic overload of this function
 
static bool invokeMethod (QObject *obj, const char *member, QGenericReturnArgument ret, QGenericArgument val0=QGenericArgument(nullptr), QGenericArgument val1=QGenericArgument(), QGenericArgument val2=QGenericArgument(), QGenericArgument val3=QGenericArgument(), QGenericArgument val4=QGenericArgument(), QGenericArgument val5=QGenericArgument(), QGenericArgument val6=QGenericArgument(), QGenericArgument val7=QGenericArgument(), QGenericArgument val8=QGenericArgument(), QGenericArgument val9=QGenericArgument())
 
static bool invokeMethod (QObject *obj, const char *member, Qt::ConnectionType type, QGenericArgument val0, QGenericArgument val1=QGenericArgument(), QGenericArgument val2=QGenericArgument(), QGenericArgument val3=QGenericArgument(), QGenericArgument val4=QGenericArgument(), QGenericArgument val5=QGenericArgument(), QGenericArgument val6=QGenericArgument(), QGenericArgument val7=QGenericArgument(), QGenericArgument val8=QGenericArgument(), QGenericArgument val9=QGenericArgument())
 
static bool invokeMethod (QObject *obj, const char *member, QGenericArgument val0, QGenericArgument val1=QGenericArgument(), QGenericArgument val2=QGenericArgument(), QGenericArgument val3=QGenericArgument(), QGenericArgument val4=QGenericArgument(), QGenericArgument val5=QGenericArgument(), QGenericArgument val6=QGenericArgument(), QGenericArgument val7=QGenericArgument(), QGenericArgument val8=QGenericArgument(), QGenericArgument val9=QGenericArgument())
 
template<typename ReturnArg , typename... Args>
static QtPrivate::Invoke::IfNotOldStyleArgs< bool, Args... > invokeMethod (QObject *obj, const char *member, Qt::ConnectionType c, QTemplatedMetaMethodReturnArgument< ReturnArg > r, Args &&... arguments)
 
template<typename... Args>
static QtPrivate::Invoke::IfNotOldStyleArgs< bool, Args... > invokeMethod (QObject *obj, const char *member, Qt::ConnectionType c, Args &&... arguments)
 
template<typename ReturnArg , typename... Args>
static QtPrivate::Invoke::IfNotOldStyleArgs< bool, Args... > invokeMethod (QObject *obj, const char *member, QTemplatedMetaMethodReturnArgument< ReturnArg > r, Args &&... arguments)
 
template<typename... Args>
static QtPrivate::Invoke::IfNotOldStyleArgs< bool, Args... > invokeMethod (QObject *obj, const char *member, Args &&... arguments)
 
template<typename Func >
static std::enable_if_t<!std::disjunction_v< std::is_convertible< Func, const char * >, QtPrivate::Invoke::AreOldStyleArgs< Func > >, bool > invokeMethod (typename QtPrivate::ContextTypeForFunctor< Func >::ContextType *object, Func &&function, Qt::ConnectionType type, typename QtPrivate::Callable< Func >::ReturnType *ret)
 
template<typename Func >
static std::enable_if_t<!std::disjunction_v< std::is_convertible< Func, const char * >, QtPrivate::Invoke::AreOldStyleArgs< Func > >, bool > invokeMethod (typename QtPrivate::ContextTypeForFunctor< Func >::ContextType *object, Func &&function, typename QtPrivate::Callable< Func >::ReturnType *ret)
 
template<typename Func , typename... Args>
static std::enable_if_t<!std::disjunction_v< std::is_convertible< Func, const char * >, QtPrivate::Invoke::AreOldStyleArgs< Args... > >, bool > invokeMethod (typename QtPrivate::ContextTypeForFunctor< Func >::ContextType *object, Func &&function, Qt::ConnectionType type, QTemplatedMetaMethodReturnArgument< typename QtPrivate::Callable< Func, Args... >::ReturnType > ret, Args &&...args)
 
template<typename Func , typename... Args>
static std::enable_if_t<!std::disjunction_v< std::is_convertible< Func, const char * >, QtPrivate::Invoke::AreOldStyleArgs< Args... > >, bool > invokeMethod (typename QtPrivate::ContextTypeForFunctor< Func >::ContextType *object, Func &&function, Qt::ConnectionType type, Args &&...args)
 
template<typename Func , typename... Args>
static std::enable_if_t<!std::disjunction_v< std::is_convertible< Func, const char * >, QtPrivate::Invoke::AreOldStyleArgs< Args... > >, bool > invokeMethod (typename QtPrivate::ContextTypeForFunctor< Func >::ContextType *object, Func &&function, QTemplatedMetaMethodReturnArgument< typename QtPrivate::Callable< Func, Args... >::ReturnType > ret, Args &&...args)
 
template<typename Func , typename... Args>
static std::enable_if_t<!std::disjunction_v< std::is_convertible< Func, const char * >, QtPrivate::Invoke::AreOldStyleArgs< Args... > >, bool > invokeMethod (typename QtPrivate::ContextTypeForFunctor< Func >::ContextType *object, Func &&function, Args &&...args)
 
static int metacall (QObject *, Call, int, void **)
 
template<const QMetaObject & MO>
static constexpr const QMetaObjectstaticMetaObject ()
 
- Public Attributes inherited from QMetaObject
struct QMetaObject::Data d
 

Detailed Description

Definition at line 57 of file qqmlopenmetaobject_p.h.

Constructor & Destructor Documentation

◆ QQmlOpenMetaObject() [1/2]

QQmlOpenMetaObject::QQmlOpenMetaObject ( QObject * obj,
const QMetaObject * base = nullptr )

Definition at line 213 of file qqmlopenmetaobject.cpp.

References QQmlRefPointer< T >::adopt(), base, QObjectPrivate::get(), QSet< T >::insert(), QQmlOpenMetaObjectTypePrivate::mem, QObjectData::metaObject, QQmlOpenMetaObjectPrivate::parent, QQmlOpenMetaObjectType, QQmlOpenMetaObjectTypePrivate::referers, and QQmlOpenMetaObjectPrivate::type.

+ Here is the call graph for this function:

◆ QQmlOpenMetaObject() [2/2]

QQmlOpenMetaObject::QQmlOpenMetaObject ( QObject * obj,
const QQmlRefPointer< QQmlOpenMetaObjectType > & type )

Definition at line 225 of file qqmlopenmetaobject.cpp.

References QObjectPrivate::get(), QSet< T >::insert(), QQmlOpenMetaObjectTypePrivate::mem, QObjectData::metaObject, QQmlOpenMetaObjectPrivate::parent, QQmlOpenMetaObjectTypePrivate::referers, QQmlOpenMetaObjectPrivate::type, and type().

+ Here is the call graph for this function:

◆ ~QQmlOpenMetaObject()

QQmlOpenMetaObject::~QQmlOpenMetaObject ( )
override

Definition at line 238 of file qqmlopenmetaobject.cpp.

References QQmlOpenMetaObjectPrivate::parent, QQmlOpenMetaObjectTypePrivate::referers, QSet< T >::remove(), and QQmlOpenMetaObjectPrivate::type.

+ Here is the call graph for this function:

Member Function Documentation

◆ autoCreatesProperties()

bool QQmlOpenMetaObject::autoCreatesProperties ( ) const

Definition at line 411 of file qqmlopenmetaobject.cpp.

References QQmlOpenMetaObjectPrivate::autoCreate.

◆ checkedSetValue()

bool QQmlOpenMetaObject::checkedSetValue ( int index,
const QVariant & value,
bool force )
protected

Definition at line 296 of file qqmlopenmetaobject.cpp.

References QMetaObject::activate(), QQmlOpenMetaObjectPrivate::object, QQmlOpenMetaObjectPrivate::propertyValue(), QQmlOpenMetaObjectPrivate::setPropertyValue(), QQmlOpenMetaObjectTypePrivate::signalOffset, and QQmlOpenMetaObjectPrivate::type.

Referenced by setValue(), and setValues().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ count()

int QQmlOpenMetaObject::count ( ) const

Definition at line 464 of file qqmlopenmetaobject.cpp.

References QQmlOpenMetaObjectTypePrivate::names, QHash< Key, T >::size(), and QQmlOpenMetaObjectPrivate::type.

Referenced by DynamicRoleModelNodeMetaObject::~DynamicRoleModelNodeMetaObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createProperty()

int QQmlOpenMetaObject::createProperty ( const char * name,
const char *  )
overrideprotectedvirtual

Reimplemented from QAbstractDynamicMetaObject.

Definition at line 422 of file qqmlopenmetaobject.cpp.

References QQmlOpenMetaObjectPrivate::autoCreate, QQmlOpenMetaObjectType::createProperty(), QQmlOpenMetaObjectPrivate::deferredPropertyNames, QQmlOpenMetaObjectPrivate::dropPropertyCache(), and QQmlOpenMetaObjectPrivate::type.

Referenced by setValue(), and setValues().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ emitPropertyNotification()

void QQmlOpenMetaObject::emitPropertyNotification ( const QByteArray & propertyName)

Definition at line 251 of file qqmlopenmetaobject.cpp.

References QMetaObject::activate(), QHash< Key, T >::constEnd(), QHash< Key, T >::constFind(), iter, QQmlOpenMetaObjectTypePrivate::names, QQmlOpenMetaObjectPrivate::object, QQmlOpenMetaObjectTypePrivate::signalOffset, and QQmlOpenMetaObjectPrivate::type.

+ Here is the call graph for this function:

◆ hasValue()

bool QQmlOpenMetaObject::hasValue ( int id) const

Definition at line 385 of file qqmlopenmetaobject.cpp.

References QQmlOpenMetaObjectPrivate::hasProperty().

+ Here is the call graph for this function:

◆ initialValue()

QVariant QQmlOpenMetaObject::initialValue ( int )
virtual

Reimplemented in QQmlDelegateModelPartsMetaObject.

Definition at line 459 of file qqmlopenmetaobject.cpp.

◆ metaCall()

◆ name()

QByteArray QQmlOpenMetaObject::name ( int idx) const

Definition at line 469 of file qqmlopenmetaobject.cpp.

References QQmlOpenMetaObjectTypePrivate::mob, QMetaPropertyBuilder::name(), QMetaObjectBuilder::property(), Q_ASSERT, and QQmlOpenMetaObjectPrivate::type.

+ Here is the call graph for this function:

◆ object()

QObject * QQmlOpenMetaObject::object ( ) const

Definition at line 476 of file qqmlopenmetaobject.cpp.

References QQmlOpenMetaObjectPrivate::object.

Referenced by QQmlDelegateModelPartsMetaObject::initialValue().

+ Here is the caller graph for this function:

◆ parent()

QDynamicMetaObjectData * QQmlOpenMetaObject::parent ( ) const
protected

Definition at line 291 of file qqmlopenmetaobject.cpp.

References QQmlOpenMetaObjectPrivate::parent.

◆ propertyCreated()

void QQmlOpenMetaObject::propertyCreated ( int ,
QMetaPropertyBuilder &  )
protectedvirtual

Reimplemented in QQmlPropertyMapMetaObject, and QQmlDelegateModelPartsMetaObject.

Definition at line 455 of file qqmlopenmetaobject.cpp.

◆ propertyRead()

void QQmlOpenMetaObject::propertyRead ( int )
protectedvirtual

Definition at line 438 of file qqmlopenmetaobject.cpp.

Referenced by metaCall().

+ Here is the caller graph for this function:

◆ propertyWrite()

void QQmlOpenMetaObject::propertyWrite ( int )
protectedvirtual

Reimplemented in DynamicRoleModelNodeMetaObject.

Definition at line 442 of file qqmlopenmetaobject.cpp.

Referenced by metaCall().

+ Here is the caller graph for this function:

◆ propertyWriteValue()

QVariant QQmlOpenMetaObject::propertyWriteValue ( int ,
const QVariant & value )
protectedvirtual

Reimplemented in QQmlPropertyMapMetaObject.

Definition at line 446 of file qqmlopenmetaobject.cpp.

Referenced by metaCall(), and setValue().

+ Here is the caller graph for this function:

◆ propertyWritten()

void QQmlOpenMetaObject::propertyWritten ( int )
protectedvirtual

Reimplemented in QQmlPropertyMapMetaObject, DynamicRoleModelNodeMetaObject, and ModelNodeMetaObject.

Definition at line 451 of file qqmlopenmetaobject.cpp.

Referenced by metaCall().

+ Here is the caller graph for this function:

◆ setAutoCreatesProperties()

void QQmlOpenMetaObject::setAutoCreatesProperties ( bool autoCreate)

Definition at line 416 of file qqmlopenmetaobject.cpp.

References QQmlOpenMetaObjectPrivate::autoCreate.

◆ setCached()

void QQmlOpenMetaObject::setCached ( bool c)

Definition at line 390 of file qqmlopenmetaobject.cpp.

References QQmlOpenMetaObjectTypePrivate::cache, QQmlOpenMetaObjectPrivate::cacheProperties, QQmlPropertyCache::createStandalone(), QQmlData::get(), QQmlOpenMetaObjectPrivate::object, QQmlRefPointer< T >::reset(), and QQmlOpenMetaObjectPrivate::type.

+ Here is the call graph for this function:

◆ setValue() [1/2]

bool QQmlOpenMetaObject::setValue ( const QByteArray & name,
const QVariant & val,
bool force = false )

Definition at line 334 of file qqmlopenmetaobject.cpp.

References QHash< Key, T >::cend(), checkedSetValue(), QHash< Key, T >::constFind(), createProperty(), iter, QQmlOpenMetaObjectTypePrivate::names, QQmlOpenMetaObjectTypePrivate::propertyOffset, and QQmlOpenMetaObjectPrivate::type.

Referenced by DynamicRoleModelNodeMetaObject::propertyWritten(), DynamicRoleModelNode::setValue(), QQuickPathViewAttached::setValue(), and DynamicRoleModelNode::updateValues().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setValue() [2/2]

void QQmlOpenMetaObject::setValue ( int id,
const QVariant & value )

Definition at line 311 of file qqmlopenmetaobject.cpp.

References QMetaObject::activate(), QQmlOpenMetaObjectPrivate::object, propertyWriteValue(), QQmlOpenMetaObjectPrivate::setPropertyValue(), QQmlOpenMetaObjectTypePrivate::signalOffset, and QQmlOpenMetaObjectPrivate::type.

+ Here is the call graph for this function:

◆ setValues()

void QQmlOpenMetaObject::setValues ( const QHash< QByteArray, QVariant > & values,
bool force = false )

◆ type()

QQmlOpenMetaObjectType * QQmlOpenMetaObject::type ( ) const

Definition at line 246 of file qqmlopenmetaobject.cpp.

References QQmlRefPointer< T >::data(), and QQmlOpenMetaObjectPrivate::type.

Referenced by QQmlOpenMetaObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unparent()

void QQmlOpenMetaObject::unparent ( )

Definition at line 259 of file qqmlopenmetaobject.cpp.

References QQmlOpenMetaObjectPrivate::parent.

◆ value() [1/2]

QVariant QQmlOpenMetaObject::value ( const QByteArray & name) const

Definition at line 317 of file qqmlopenmetaobject.cpp.

References QHash< Key, T >::cend(), QHash< Key, T >::constFind(), iter, QQmlOpenMetaObjectTypePrivate::names, QQmlOpenMetaObjectPrivate::propertyValue(), and QQmlOpenMetaObjectPrivate::type.

Referenced by DynamicRoleModelNode::getValue(), DynamicRoleModelNode::updateValues(), and QQuickPathViewAttached::value().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ value() [2/2]

QVariant QQmlOpenMetaObject::value ( int id) const

Definition at line 306 of file qqmlopenmetaobject.cpp.

References QQmlOpenMetaObjectPrivate::propertyValue().

+ Here is the call graph for this function:

◆ valueRef()

QVariant & QQmlOpenMetaObject::valueRef ( const QByteArray & name)

Definition at line 326 of file qqmlopenmetaobject.cpp.

References QHash< Key, T >::cend(), QHash< Key, T >::constFind(), iter, QQmlOpenMetaObjectTypePrivate::names, QQmlOpenMetaObjectPrivate::propertyValueRef(), Q_ASSERT, and QQmlOpenMetaObjectPrivate::type.

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ QQmlOpenMetaObjectType

friend class QQmlOpenMetaObjectType
friend

Definition at line 106 of file qqmlopenmetaobject_p.h.

Referenced by QQmlOpenMetaObject().


The documentation for this class was generated from the following files: