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
QMetaObjectBuilder Class Reference

\inmodule QtCore More...

#include <qmetaobjectbuilder_p.h>

+ Collaboration diagram for QMetaObjectBuilder:

Public Types

enum  AddMember {
  ClassName = 0x00000001 , SuperClass = 0x00000002 , Methods = 0x00000004 , Signals = 0x00000008 ,
  Slots = 0x00000010 , Constructors = 0x00000020 , Properties = 0x00000040 , Enumerators = 0x00000080 ,
  ClassInfos = 0x00000100 , RelatedMetaObjects = 0x00000200 , StaticMetacall = 0x00000400 , PublicMethods = 0x00000800 ,
  ProtectedMethods = 0x00001000 , PrivateMethods = 0x00002000 , AllMembers = 0x7FFFFFFF , AllPrimaryMembers = 0x7FFFFBFC
}
 This enum defines which members of QMetaObject should be copied by QMetaObjectBuilder::addMetaObject() More...
 
typedef void(* StaticMetacallFunction) (QObject *, QMetaObject::Call, int, void **)
 Typedef for static metacall functions.
 

Public Member Functions

 QMetaObjectBuilder ()
 Constructs a new QMetaObjectBuilder.
 
 QMetaObjectBuilder (const QMetaObject *prototype, QMetaObjectBuilder::AddMembers members=AllMembers)
 Constructs a new QMetaObjectBuilder which is a copy of the meta object information in prototype.
 
virtual ~QMetaObjectBuilder ()
 Destroys this meta object builder.
 
QByteArray className () const
 Returns the name of the class being constructed by this meta object builder.
 
void setClassName (const QByteArray &name)
 Sets the name of the class being constructed by this meta object builder.
 
const QMetaObjectsuperClass () const
 Returns the superclass meta object of the class being constructed by this meta object builder.
 
void setSuperClass (const QMetaObject *meta)
 Sets the superclass meta object of the class being constructed by this meta object builder to meta.
 
MetaObjectFlags flags () const
 Returns the flags of the class being constructed by this meta object builder.
 
void setFlags (MetaObjectFlags)
 Sets the flags of the class being constructed by this meta object builder.
 
int methodCount () const
 Returns the number of methods in this class, excluding the number of methods in the base class.
 
int constructorCount () const
 Returns the number of constructors in this class.
 
int propertyCount () const
 Returns the number of properties in this class, excluding the number of properties in the base class.
 
int enumeratorCount () const
 Returns the number of enumerators in this class, excluding the number of enumerators in the base class.
 
int classInfoCount () const
 Returns the number of items of class information in this class, exclusing the number of items of class information in the base class.
 
int relatedMetaObjectCount () const
 Returns the number of related meta objects that are associated with this class.
 
QMetaMethodBuilder addMethod (const QByteArray &signature)
 Adds a new public method to this class with the specified signature.
 
QMetaMethodBuilder addMethod (const QByteArray &signature, const QByteArray &returnType)
 Adds a new public method to this class with the specified signature and returnType.
 
QMetaMethodBuilder addMethod (const QMetaMethod &prototype)
 Adds a new public method to this class that has the same information as prototype.
 
QMetaMethodBuilder addSlot (const QByteArray &signature)
 Adds a new public slot to this class with the specified signature.
 
QMetaMethodBuilder addSignal (const QByteArray &signature)
 Adds a new signal to this class with the specified signature.
 
QMetaMethodBuilder addConstructor (const QByteArray &signature)
 Adds a new constructor to this class with the specified signature.
 
QMetaMethodBuilder addConstructor (const QMetaMethod &prototype)
 Adds a new constructor to this class that has the same information as prototype.
 
QMetaPropertyBuilder addProperty (const QByteArray &name, const QByteArray &type, int notifierId=-1)
 Adds a new readable/writable property to this class with the specified name and type.
 
QMetaPropertyBuilder addProperty (const QByteArray &name, const QByteArray &type, QMetaType metaType, int notifierId=-1)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
QMetaPropertyBuilder addProperty (const QMetaProperty &prototype)
 Adds a new property to this class that has the same information as prototype.
 
QMetaEnumBuilder addEnumerator (const QByteArray &name)
 Adds a new enumerator to this class with the specified name.
 
QMetaEnumBuilder addEnumerator (const QMetaEnum &prototype)
 Adds a new enumerator to this class that has the same information as prototype.
 
int addClassInfo (const QByteArray &name, const QByteArray &value)
 Adds name and value as an item of class information to this class.
 
int addRelatedMetaObject (const QMetaObject *meta)
 Adds meta to this class as a related meta object.
 
void addMetaObject (const QMetaObject *prototype, QMetaObjectBuilder::AddMembers members=AllMembers)
 Adds the contents of prototype to this meta object builder.
 
QMetaMethodBuilder method (int index) const
 Returns the method at index in this class.
 
QMetaMethodBuilder constructor (int index) const
 Returns the constructor at index in this class.
 
QMetaPropertyBuilder property (int index) const
 Returns the property at index in this class.
 
QMetaEnumBuilder enumerator (int index) const
 Returns the enumerator at index in this class.
 
const QMetaObjectrelatedMetaObject (int index) const
 Returns the related meta object at index in this class.
 
QByteArray classInfoName (int index) const
 Returns the name of the item of class information at index in this class.
 
QByteArray classInfoValue (int index) const
 Returns the value of the item of class information at index in this class.
 
void removeMethod (int index)
 Removes the method at index from this class.
 
void removeConstructor (int index)
 Removes the constructor at index from this class.
 
void removeProperty (int index)
 Removes the property at index from this class.
 
void removeEnumerator (int index)
 Removes the enumerator at index from this class.
 
void removeClassInfo (int index)
 Removes the item of class information at index from this class.
 
void removeRelatedMetaObject (int index)
 Removes the related meta object at index from this class.
 
int indexOfMethod (const QByteArray &signature)
 Finds a method with the specified signature and returns its index; otherwise returns -1.
 
int indexOfSignal (const QByteArray &signature)
 Finds a signal with the specified signature and returns its index; otherwise returns -1.
 
int indexOfSlot (const QByteArray &signature)
 Finds a slot with the specified signature and returns its index; otherwise returns -1.
 
int indexOfConstructor (const QByteArray &signature)
 Finds a constructor with the specified signature and returns its index; otherwise returns -1.
 
int indexOfProperty (const QByteArray &name)
 Finds a property with the specified name and returns its index; otherwise returns -1.
 
int indexOfEnumerator (const QByteArray &name)
 Finds an enumerator with the specified name and returns its index; otherwise returns -1.
 
int indexOfClassInfo (const QByteArray &name)
 Finds an item of class information with the specified name and returns its index; otherwise returns -1.
 
QMetaObjectBuilder::StaticMetacallFunction staticMetacallFunction () const
 Returns the static metacall function to use to construct objects of this class.
 
void setStaticMetacallFunction (QMetaObjectBuilder::StaticMetacallFunction value)
 Sets the static metacall function to use to construct objects of this class to value.
 
QMetaObjecttoMetaObject () const
 Converts this meta object builder into a concrete QMetaObject.
 

Friends

class QMetaMethodBuilder
 
class QMetaPropertyBuilder
 
class QMetaEnumBuilder
 

Detailed Description

\inmodule QtCore

The QMetaObjectBuilder class supports building QMetaObject objects at runtime.

Definition at line 37 of file qmetaobjectbuilder_p.h.

Member Typedef Documentation

◆ StaticMetacallFunction

QMetaObjectBuilder::StaticMetacallFunction

Typedef for static metacall functions.

The three parameters are the call type value, the constructor index, and the array of parameters.

Definition at line 128 of file qmetaobjectbuilder_p.h.

Member Enumeration Documentation

◆ AddMember

This enum defines which members of QMetaObject should be copied by QMetaObjectBuilder::addMetaObject()

\value ClassName Add the class name. \value SuperClass Add the super class. \value Methods Add methods that aren't signals or slots. \value Signals Add signals. \value Slots Add slots. \value Constructors Add constructors. \value Properties Add properties. \value Enumerators Add enumerators. \value ClassInfos Add items of class information. \value RelatedMetaObjects Add related meta objects. \value StaticMetacall Add the static metacall function. \value PublicMethods Add public methods (ignored for signals). \value ProtectedMethods Add protected methods (ignored for signals). \value PrivateMethods All private methods (ignored for signals). \value AllMembers Add all members. \value AllPrimaryMembers Add everything except the class name, super class, and static metacall function.

Enumerator
ClassName 
SuperClass 
Methods 
Signals 
Slots 
Constructors 
Properties 
Enumerators 
ClassInfos 
RelatedMetaObjects 
StaticMetacall 
PublicMethods 
ProtectedMethods 
PrivateMethods 
AllMembers 
AllPrimaryMembers 

Definition at line 40 of file qmetaobjectbuilder_p.h.

Constructor & Destructor Documentation

◆ QMetaObjectBuilder() [1/2]

QMetaObjectBuilder::QMetaObjectBuilder ( )

Constructs a new QMetaObjectBuilder.

Definition at line 207 of file qmetaobjectbuilder.cpp.

◆ QMetaObjectBuilder() [2/2]

QMetaObjectBuilder::QMetaObjectBuilder ( const QMetaObject * prototype,
QMetaObjectBuilder::AddMembers members = AllMembers )
explicit

Constructs a new QMetaObjectBuilder which is a copy of the meta object information in prototype.

Note: the super class contents for prototype are not copied, only the immediate class that is defined by prototype.

The members parameter indicates which members of prototype should be added. The default is AllMembers.

See also
addMetaObject()

Definition at line 223 of file qmetaobjectbuilder.cpp.

References addMetaObject(), and members().

+ Here is the call graph for this function:

◆ ~QMetaObjectBuilder()

QMetaObjectBuilder::~QMetaObjectBuilder ( )
virtual

Destroys this meta object builder.

Definition at line 233 of file qmetaobjectbuilder.cpp.

Member Function Documentation

◆ addClassInfo()

int QMetaObjectBuilder::addClassInfo ( const QByteArray & name,
const QByteArray & value )

Adds name and value as an item of class information to this class.

Returns the index of the new item of class information.

See also
classInfoCount(), classInfoName(), classInfoValue(), removeClassInfo()
indexOfClassInfo()

Definition at line 617 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::classInfoNames, QMetaObjectBuilderPrivate::classInfoValues, and QList< T >::size().

Referenced by addMetaObject(), QQmlMetaType::clone(), and QQmlPropertyCache::toMetaObjectBuilder().

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

◆ addConstructor() [1/2]

QMetaMethodBuilder QMetaObjectBuilder::addConstructor ( const QByteArray & signature)

Adds a new constructor to this class with the specified signature.

Returns an object that can be used to adjust the other attributes of the constructor. The signature will be normalized before it is added to the class.

See also
constructor(), constructorCount(), removeConstructor()
indexOfConstructor()

Definition at line 483 of file qmetaobjectbuilder.cpp.

References QMetaMethod::Constructor, QMetaObjectBuilderPrivate::constructors, QByteArray(), and QMetaMethodBuilder.

Referenced by addConstructor(), addMetaObject(), and addMethod().

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

◆ addConstructor() [2/2]

QMetaMethodBuilder QMetaObjectBuilder::addConstructor ( const QMetaMethod & prototype)

Adds a new constructor to this class that has the same information as prototype.

This is used to clone the constructors of an existing QMetaObject. Returns an object that can be used to adjust the attributes of the constructor.

This function requires that prototype be a constructor.

See also
constructor(), constructorCount(), removeConstructor()
indexOfConstructor()

Definition at line 502 of file qmetaobjectbuilder.cpp.

References QMetaMethod::access(), addConstructor(), QMetaMethod::attributes(), QMetaMethod::Constructor, QMetaMethod::methodSignature(), QMetaMethod::methodType(), QMetaMethod::parameterNames(), Q_ASSERT, QMetaMethod::tag(), and QMetaMethod::typeName().

+ Here is the call graph for this function:

◆ addEnumerator() [1/2]

QMetaEnumBuilder QMetaObjectBuilder::addEnumerator ( const QByteArray & name)

Adds a new enumerator to this class with the specified name.

Returns an object that can be used to adjust the other attributes of the enumerator.

See also
enumerator(), enumeratorCount(), removeEnumerator()
indexOfEnumerator()

Definition at line 581 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::enumerators, and QMetaEnumBuilder.

Referenced by addEnumerator(), addMetaObject(), QQmlMetaType::clone(), and QQmlPropertyCache::toMetaObjectBuilder().

+ Here is the caller graph for this function:

◆ addEnumerator() [2/2]

QMetaEnumBuilder QMetaObjectBuilder::addEnumerator ( const QMetaEnum & prototype)

Adds a new enumerator to this class that has the same information as prototype.

This is used to clone the enumerators of an existing QMetaObject. Returns an object that can be used to adjust the attributes of the enumerator.

See also
enumerator(), enumeratorCount(), removeEnumerator()
indexOfEnumerator()

Definition at line 597 of file qmetaobjectbuilder.cpp.

References addEnumerator(), QMetaEnum::enumName(), QMetaEnum::isFlag(), QMetaEnum::isScoped(), QMetaEnum::key(), QMetaEnum::keyCount(), QMetaEnum::metaType(), QMetaEnum::name(), and QMetaEnum::value().

+ Here is the call graph for this function:

◆ addMetaObject()

void QMetaObjectBuilder::addMetaObject ( const QMetaObject * prototype,
QMetaObjectBuilder::AddMembers members = AllMembers )

Adds the contents of prototype to this meta object builder.

This function is useful for cloning the contents of an existing QMetaObject.

The members parameter indicates which members of prototype should be added. The default is AllMembers.

Definition at line 651 of file qmetaobjectbuilder.cpp.

References addClassInfo(), addConstructor(), addEnumerator(), addMethod(), addProperty(), addRelatedMetaObject(), QMetaObject::classInfo(), QMetaObject::classInfoCount(), QMetaObject::classInfoOffset(), ClassInfos, QMetaObjectBuilderPrivate::className, ClassName, QMetaObject::className(), QMetaObject::constructor(), QMetaObject::constructorCount(), Constructors, QMetaObject::d, QMetaObject::enumerator(), QMetaObject::enumeratorCount(), QMetaObject::enumeratorOffset(), Enumerators, members(), QMetaMethod::Method, QMetaObject::method(), method, QMetaObject::methodCount(), QMetaObject::methodOffset(), Methods, QMetaMethod::Private, PrivateMethods, Properties, QMetaObject::property(), QMetaObject::propertyCount(), QMetaObject::propertyOffset(), QMetaMethod::Protected, ProtectedMethods, QMetaMethod::Public, PublicMethods, Q_ASSERT, qmobPriv(), RelatedMetaObjects, setStaticMetacallFunction(), QMetaMethod::Signal, Signals, QMetaMethod::Slot, Slots, StaticMetacall, QMetaObjectBuilderPrivate::superClass, and QMetaObject::superClass().

Referenced by QMetaObjectBuilder().

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

◆ addMethod() [1/3]

QMetaMethodBuilder QMetaObjectBuilder::addMethod ( const QByteArray & signature)

Adds a new public method to this class with the specified signature.

Returns an object that can be used to adjust the other attributes of the method. The signature will be normalized before it is added to the class.

See also
method(), methodCount(), removeMethod(), indexOfMethod()

Definition at line 388 of file qmetaobjectbuilder.cpp.

References QMetaMethod::Method, QMetaObjectBuilderPrivate::methods, and QMetaMethodBuilder.

Referenced by addMetaObject(), addMethod(), addProperty(), and QQmlMetaType::clone().

+ Here is the caller graph for this function:

◆ addMethod() [2/3]

QMetaMethodBuilder QMetaObjectBuilder::addMethod ( const QByteArray & signature,
const QByteArray & returnType )

Adds a new public method to this class with the specified signature and returnType.

Returns an object that can be used to adjust the other attributes of the method. The signature and returnType will be normalized before they are added to the class.

See also
method(), methodCount(), removeMethod(), indexOfMethod()

Definition at line 404 of file qmetaobjectbuilder.cpp.

References QMetaMethod::Method, QMetaObjectBuilderPrivate::methods, and QMetaMethodBuilder.

◆ addMethod() [3/3]

QMetaMethodBuilder QMetaObjectBuilder::addMethod ( const QMetaMethod & prototype)

Adds a new public method to this class that has the same information as prototype.

This is used to clone the methods of an existing QMetaObject. Returns an object that can be used to adjust the attributes of the method.

This function will detect if prototype is an ordinary method, signal, slot, or constructor and act accordingly.

See also
method(), methodCount(), removeMethod(), indexOfMethod()

Definition at line 423 of file qmetaobjectbuilder.cpp.

References QMetaMethod::access(), addConstructor(), addMethod(), addSignal(), addSlot(), QMetaMethod::attributes(), QMetaMethod::Constructor, QMetaMethod::Method, method, QMetaMethod::methodSignature(), QMetaMethod::methodType(), QMetaMethod::parameterNames(), QMetaMethod::revision(), QMetaMethod::Signal, QMetaMethod::Slot, QMetaMethod::tag(), and QMetaMethod::typeName().

+ Here is the call graph for this function:

◆ addProperty() [1/3]

QMetaPropertyBuilder QMetaObjectBuilder::addProperty ( const QByteArray & name,
const QByteArray & type,
int notifierId = -1 )

Adds a new readable/writable property to this class with the specified name and type.

Returns an object that can be used to adjust the other attributes of the property. The type will be normalized before it is added to the class. notifierId will be registered as the property's notify signal.

See also
property(), propertyCount(), removeProperty(), indexOfProperty()

Definition at line 523 of file qmetaobjectbuilder.cpp.

References addProperty(), and QMetaType::fromName().

Referenced by addMetaObject(), addProperty(), addProperty(), QQmlAdaptorModelEngineData::addProperty(), QQmlMetaType::clone(), QQmlOpenMetaObjectType::createProperties(), QQmlDMObjectDataMetaObject::createProperty(), QQmlOpenMetaObjectType::createProperty(), QQmlDelegateModelItemMetaType::initializeMetaObject(), and QQmlPropertyCache::toMetaObjectBuilder().

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

◆ addProperty() [2/3]

QMetaPropertyBuilder QMetaObjectBuilder::addProperty ( const QByteArray & name,
const QByteArray & type,
QMetaType metaType,
int notifierId = -1 )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 532 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::properties, and QMetaPropertyBuilder.

◆ addProperty() [3/3]

QMetaPropertyBuilder QMetaObjectBuilder::addProperty ( const QMetaProperty & prototype)

Adds a new property to this class that has the same information as prototype.

This is used to clone the properties of an existing QMetaObject. Returns an object that can be used to adjust the attributes of the property.

See also
property(), propertyCount(), removeProperty(), indexOfProperty()

Definition at line 547 of file qmetaobjectbuilder.cpp.

References addMethod(), addProperty(), QMetaProperty::hasNotifySignal(), QMetaProperty::hasStdCppSet(), QMetaMethodBuilder::index(), indexOfMethod(), QMetaProperty::isConstant(), QMetaProperty::isDesignable(), QMetaProperty::isEnumType(), QMetaProperty::isFinal(), QMetaProperty::isReadable(), QMetaProperty::isResettable(), QMetaProperty::isScriptable(), QMetaProperty::isStored(), QMetaProperty::isUser(), QMetaProperty::isWritable(), QMetaProperty::metaType(), method, QMetaProperty::name(), QMetaProperty::notifySignal(), QMetaObjectBuilderPrivate::properties, property, QMetaProperty::revision(), and QMetaProperty::typeName().

+ Here is the call graph for this function:

◆ addRelatedMetaObject()

int QMetaObjectBuilder::addRelatedMetaObject ( const QMetaObject * meta)

Adds meta to this class as a related meta object.

Returns the index of the new related meta object entry.

Related meta objects are used when resolving the enumerated type associated with a property, where the enumerated type is in a different class from the property.

See also
relatedMetaObjectCount(), relatedMetaObject()
removeRelatedMetaObject()

Definition at line 636 of file qmetaobjectbuilder.cpp.

References QList< T >::append(), Q_ASSERT, QMetaObjectBuilderPrivate::relatedMetaObjects, and QList< T >::size().

Referenced by addMetaObject().

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

◆ addSignal()

QMetaMethodBuilder QMetaObjectBuilder::addSignal ( const QByteArray & signature)

Adds a new signal to this class with the specified signature.

Returns an object that can be used to adjust the other attributes of the signal. The signature will be normalized before it is added to the class.

See also
addMethod(), addSlot(), indexOfSignal()

Definition at line 466 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::methods, QMetaMethod::Public, QByteArray(), QMetaMethodBuilder, and QMetaMethod::Signal.

Referenced by addMethod(), QQmlAdaptorModelEngineData::addProperty(), QQmlOpenMetaObjectType::createProperties(), QQmlDMObjectDataMetaObject::createProperty(), QQmlOpenMetaObjectType::createProperty(), QQmlDelegateModelItemMetaType::initializeMetaObject(), and QQmlPropertyCache::toMetaObjectBuilder().

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

◆ addSlot()

QMetaMethodBuilder QMetaObjectBuilder::addSlot ( const QByteArray & signature)

Adds a new public slot to this class with the specified signature.

Returns an object that can be used to adjust the other attributes of the slot. The signature will be normalized before it is added to the class.

See also
addMethod(), addSignal(), indexOfSlot()

Definition at line 451 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::methods, QMetaMethodBuilder, and QMetaMethod::Slot.

Referenced by addMethod(), and QQmlPropertyCache::toMetaObjectBuilder().

+ Here is the caller graph for this function:

◆ classInfoCount()

int QMetaObjectBuilder::classInfoCount ( ) const

Returns the number of items of class information in this class, exclusing the number of items of class information in the base class.

See also
addClassInfo(), classInfoName(), classInfoValue(), removeClassInfo()
indexOfClassInfo()

Definition at line 359 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::classInfoNames, and QList< T >::size().

+ Here is the call graph for this function:

◆ classInfoName()

QByteArray QMetaObjectBuilder::classInfoName ( int index) const

Returns the name of the item of class information at index in this class.

See also
classInfoCount(), addClassInfo(), classInfoValue(), removeClassInfo()
indexOfClassInfo()

Definition at line 804 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::classInfoNames, and QByteArray().

+ Here is the call graph for this function:

◆ classInfoValue()

QByteArray QMetaObjectBuilder::classInfoValue ( int index) const

Returns the value of the item of class information at index in this class.

See also
classInfoCount(), addClassInfo(), classInfoName(), removeClassInfo()
indexOfClassInfo()

Definition at line 819 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::classInfoValues, and QByteArray().

+ Here is the call graph for this function:

◆ className()

QByteArray QMetaObjectBuilder::className ( ) const

Returns the name of the class being constructed by this meta object builder.

The default value is an empty QByteArray.

See also
setClassName(), superClass()

Definition at line 244 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::className.

◆ constructor()

QMetaMethodBuilder QMetaObjectBuilder::constructor ( int index) const

Returns the constructor at index in this class.

See also
methodCount(), addMethod(), removeMethod(), indexOfConstructor()

Definition at line 744 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::constructors, and QMetaMethodBuilder.

Referenced by indexOfConstructor().

+ Here is the caller graph for this function:

◆ constructorCount()

int QMetaObjectBuilder::constructorCount ( ) const

Returns the number of constructors in this class.

See also
addConstructor(), constructor(), removeConstructor(), indexOfConstructor()

Definition at line 324 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::constructors.

◆ enumerator()

QMetaEnumBuilder QMetaObjectBuilder::enumerator ( int index) const

Returns the enumerator at index in this class.

See also
enumeratorCount(), addEnumerator(), removeEnumerator()
indexOfEnumerator()

Definition at line 771 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::enumerators, and QMetaEnumBuilder.

Referenced by indexOfEnumerator().

+ Here is the caller graph for this function:

◆ enumeratorCount()

int QMetaObjectBuilder::enumeratorCount ( ) const

Returns the number of enumerators in this class, excluding the number of enumerators in the base class.

See also
addEnumerator(), enumerator(), removeEnumerator()
indexOfEnumerator()

Definition at line 347 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::enumerators.

◆ flags()

MetaObjectFlags QMetaObjectBuilder::flags ( ) const

Returns the flags of the class being constructed by this meta object builder.

See also
setFlags()

Definition at line 291 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::flags.

Referenced by setFlags().

+ Here is the caller graph for this function:

◆ indexOfClassInfo()

int QMetaObjectBuilder::indexOfClassInfo ( const QByteArray & name)

Finds an item of class information with the specified name and returns its index; otherwise returns -1.

See also
classInfoName(), classInfoValue(), classInfoCount(), addClassInfo()
removeClassInfo()

Definition at line 1021 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::classInfoNames, and QList< T >::size().

+ Here is the call graph for this function:

◆ indexOfConstructor()

int QMetaObjectBuilder::indexOfConstructor ( const QByteArray & signature)

Finds a constructor with the specified signature and returns its index; otherwise returns -1.

The signature will be normalized by this method.

See also
constructor(), constructorCount(), addConstructor(), removeConstructor()

Definition at line 974 of file qmetaobjectbuilder.cpp.

References constructor(), QMetaObjectBuilderPrivate::constructors, QMetaObject::normalizedSignature(), and QMetaMethodBuilder::signature().

+ Here is the call graph for this function:

◆ indexOfEnumerator()

int QMetaObjectBuilder::indexOfEnumerator ( const QByteArray & name)

Finds an enumerator with the specified name and returns its index; otherwise returns -1.

See also
enumertor(), enumeratorCount(), addEnumerator(), removeEnumerator()

Definition at line 1005 of file qmetaobjectbuilder.cpp.

References enumerator(), QMetaObjectBuilderPrivate::enumerators, and QMetaEnumBuilder::name().

+ Here is the call graph for this function:

◆ indexOfMethod()

int QMetaObjectBuilder::indexOfMethod ( const QByteArray & signature)

Finds a method with the specified signature and returns its index; otherwise returns -1.

The signature will be normalized by this method.

See also
method(), methodCount(), addMethod(), removeMethod()

Definition at line 926 of file qmetaobjectbuilder.cpp.

References method, QMetaObjectBuilderPrivate::methods, and QMetaObject::normalizedSignature().

Referenced by addProperty().

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

◆ indexOfProperty()

int QMetaObjectBuilder::indexOfProperty ( const QByteArray & name)

Finds a property with the specified name and returns its index; otherwise returns -1.

See also
property(), propertyCount(), addProperty(), removeProperty()

Definition at line 990 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::properties, and property.

◆ indexOfSignal()

int QMetaObjectBuilder::indexOfSignal ( const QByteArray & signature)

Finds a signal with the specified signature and returns its index; otherwise returns -1.

The signature will be normalized by this method.

See also
indexOfMethod(), indexOfSlot()

Definition at line 942 of file qmetaobjectbuilder.cpp.

References method, QMetaObjectBuilderPrivate::methods, QMetaObject::normalizedSignature(), and QMetaMethod::Signal.

+ Here is the call graph for this function:

◆ indexOfSlot()

int QMetaObjectBuilder::indexOfSlot ( const QByteArray & signature)

Finds a slot with the specified signature and returns its index; otherwise returns -1.

The signature will be normalized by this method.

See also
indexOfMethod(), indexOfSignal()

Definition at line 958 of file qmetaobjectbuilder.cpp.

References method, QMetaObjectBuilderPrivate::methods, QMetaObject::normalizedSignature(), and QMetaMethod::Slot.

+ Here is the call graph for this function:

◆ method()

QMetaMethodBuilder QMetaObjectBuilder::method ( int index) const

Returns the method at index in this class.

See also
methodCount(), addMethod(), removeMethod(), indexOfMethod()

Definition at line 731 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::methods, and QMetaMethodBuilder.

◆ methodCount()

int QMetaObjectBuilder::methodCount ( ) const

Returns the number of methods in this class, excluding the number of methods in the base class.

These include signals and slots as well as normal member functions.

See also
addMethod(), method(), removeMethod(), indexOfMethod()

Definition at line 314 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::methods.

◆ property()

QMetaPropertyBuilder QMetaObjectBuilder::property ( int index) const

Returns the property at index in this class.

See also
methodCount(), addMethod(), removeMethod(), indexOfProperty()

Definition at line 757 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::properties, and QMetaPropertyBuilder.

Referenced by QQmlOpenMetaObject::name(), and QQmlOpenMetaObjectType::propertyName().

+ Here is the caller graph for this function:

◆ propertyCount()

int QMetaObjectBuilder::propertyCount ( ) const

Returns the number of properties in this class, excluding the number of properties in the base class.

See also
addProperty(), property(), removeProperty(), indexOfProperty()

Definition at line 335 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::properties.

Referenced by QQmlOpenMetaObjectType::createProperties(), and QQmlOpenMetaObjectType::createProperty().

+ Here is the caller graph for this function:

◆ relatedMetaObject()

const QMetaObject * QMetaObjectBuilder::relatedMetaObject ( int index) const

Returns the related meta object at index in this class.

Related meta objects are used when resolving the enumerated type associated with a property, where the enumerated type is in a different class from the property.

See also
relatedMetaObjectCount(), addRelatedMetaObject()
removeRelatedMetaObject()

Definition at line 789 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::relatedMetaObjects.

◆ relatedMetaObjectCount()

int QMetaObjectBuilder::relatedMetaObjectCount ( ) const

Returns the number of related meta objects that are associated with this class.

Related meta objects are used when resolving the enumerated type associated with a property, where the enumerated type is in a different class from the property.

See also
addRelatedMetaObject(), relatedMetaObject()
removeRelatedMetaObject()

Definition at line 375 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::relatedMetaObjects, and QList< T >::size().

+ Here is the call graph for this function:

◆ removeClassInfo()

void QMetaObjectBuilder::removeClassInfo ( int index)

Removes the item of class information at index from this class.

The indices of all following items will be adjusted downwards by 1.

See also
classInfoCount(), addClassInfo(), classInfoName(), classInfoValue()
indexOfClassInfo()

Definition at line 894 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::classInfoNames, QMetaObjectBuilderPrivate::classInfoValues, and QList< T >::removeAt().

+ Here is the call graph for this function:

◆ removeConstructor()

void QMetaObjectBuilder::removeConstructor ( int index)

Removes the constructor at index from this class.

The indices of all following constructors will be adjusted downwards by 1.

See also
constructorCount(), addConstructor(), constructor()
indexOfConstructor()

Definition at line 856 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::constructors.

◆ removeEnumerator()

void QMetaObjectBuilder::removeEnumerator ( int index)

Removes the enumerator at index from this class.

The indices of all following enumerators will be adjusted downwards by 1.

See also
enumertorCount(), addEnumerator(), enumerator()
indexOfEnumerator()

Definition at line 881 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::enumerators.

◆ removeMethod()

void QMetaObjectBuilder::removeMethod ( int index)

Removes the method at index from this class.

The indices of all following methods will be adjusted downwards by 1. If the method is registered as a notify signal on a property, then the notify signal will be removed from the property.

See also
methodCount(), addMethod(), method(), indexOfMethod()

Definition at line 835 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::methods, QMetaObjectBuilderPrivate::properties, and property.

◆ removeProperty()

void QMetaObjectBuilder::removeProperty ( int index)

Removes the property at index from this class.

The indices of all following properties will be adjusted downwards by 1.

See also
propertyCount(), addProperty(), property(), indexOfProperty()

Definition at line 868 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::properties.

◆ removeRelatedMetaObject()

void QMetaObjectBuilder::removeRelatedMetaObject ( int index)

Removes the related meta object at index from this class.

The indices of all following related meta objects will be adjusted downwards by 1.

Related meta objects are used when resolving the enumerated type associated with a property, where the enumerated type is in a different class from the property.

See also
relatedMetaObjectCount(), addRelatedMetaObject()
relatedMetaObject()

Definition at line 914 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::relatedMetaObjects, and QList< T >::removeAt().

+ Here is the call graph for this function:

◆ setClassName()

void QMetaObjectBuilder::setClassName ( const QByteArray & name)

Sets the name of the class being constructed by this meta object builder.

See also
className(), setSuperClass()

Definition at line 255 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::className.

Referenced by QQmlMetaType::clone(), QQmlOpenMetaObjectTypePrivate::init(), QQmlDelegateModelItemMetaType::initializeMetaObject(), QQmlAdaptorModelEngineData::setModelDataType(), and QQmlPropertyCache::toMetaObjectBuilder().

+ Here is the caller graph for this function:

◆ setFlags()

void QMetaObjectBuilder::setFlags ( MetaObjectFlags flags)

Sets the flags of the class being constructed by this meta object builder.

See also
flags()

Definition at line 302 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::flags, and flags().

Referenced by VDMObjectDelegateDataType::VDMObjectDelegateDataType(), QQmlOpenMetaObjectTypePrivate::init(), QQmlDelegateModelItemMetaType::initializeMetaObject(), and QQmlAdaptorModelEngineData::setModelDataType().

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

◆ setStaticMetacallFunction()

void QMetaObjectBuilder::setStaticMetacallFunction ( QMetaObjectBuilder::StaticMetacallFunction value)

Sets the static metacall function to use to construct objects of this class to value.

The default value is null.

See also
staticMetacallFunction()

Definition at line 1495 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::staticMetacallFunction.

Referenced by addMetaObject().

+ Here is the caller graph for this function:

◆ setSuperClass()

void QMetaObjectBuilder::setSuperClass ( const QMetaObject * meta)

Sets the superclass meta object of the class being constructed by this meta object builder to meta.

The meta parameter must not be null.

See also
superClass(), setClassName()

Definition at line 279 of file qmetaobjectbuilder.cpp.

References Q_ASSERT, and QMetaObjectBuilderPrivate::superClass.

Referenced by QQmlPropertyCache::createMetaObject(), QQmlOpenMetaObjectTypePrivate::init(), QQmlDelegateModelItemMetaType::initializeMetaObject(), and QQmlAdaptorModelEngineData::setModelDataType().

+ Here is the caller graph for this function:

◆ staticMetacallFunction()

QMetaObjectBuilder::StaticMetacallFunction QMetaObjectBuilder::staticMetacallFunction ( ) const

Returns the static metacall function to use to construct objects of this class.

The default value is null.

See also
setStaticMetacallFunction()

Definition at line 1484 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::staticMetacallFunction.

◆ superClass()

const QMetaObject * QMetaObjectBuilder::superClass ( ) const

Returns the superclass meta object of the class being constructed by this meta object builder.

The default value is the meta object for QObject.

See also
setSuperClass(), className()

Definition at line 267 of file qmetaobjectbuilder.cpp.

References QMetaObjectBuilderPrivate::superClass.

◆ toMetaObject()

QMetaObject * QMetaObjectBuilder::toMetaObject ( ) const

Converts this meta object builder into a concrete QMetaObject.

The return value should be deallocated using free() once it is no longer needed.

The returned meta object is a snapshot of the state of the QMetaObjectBuilder. Any further modifications to the QMetaObjectBuilder will not be reflected in previous meta objects returned by this method.

Definition at line 1461 of file qmetaobjectbuilder.cpp.

Referenced by VDMListDelegateDataType::VDMListDelegateDataType(), QQmlPropertyCache::createMetaObject(), QQmlOpenMetaObjectType::createProperties(), VDMListDelegateDataType::createProperty(), QQmlDMObjectDataMetaObject::createProperty(), QQmlOpenMetaObjectType::createProperty(), QQmlTypePrivate::init(), QQmlOpenMetaObjectTypePrivate::init(), QQmlDelegateModelItemMetaType::initializeMetaObject(), VDMAbstractItemModelDataType::initializeMetaType(), VDMObjectDelegateDataType::initializeMetaType(), QQmlMetaType::proxyData(), and QQmlValueType::toDynamicMetaObject().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ QMetaEnumBuilder

friend class QMetaEnumBuilder
friend

Definition at line 142 of file qmetaobjectbuilder_p.h.

Referenced by addEnumerator(), and enumerator().

◆ QMetaMethodBuilder

friend class QMetaMethodBuilder
friend

◆ QMetaPropertyBuilder

friend class QMetaPropertyBuilder
friend

Definition at line 141 of file qmetaobjectbuilder_p.h.

Referenced by addProperty(), and property().


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