Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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

typedef void(* QMetaObjectBuilder::StaticMetacallFunction) (QObject *, QMetaObject::Call, int, void **)

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 203 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 219 of file qmetaobjectbuilder.cpp.

◆ ~QMetaObjectBuilder()

QMetaObjectBuilder::~QMetaObjectBuilder ( )
virtual

Destroys this meta object builder.

Definition at line 229 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 616 of file qmetaobjectbuilder.cpp.

◆ 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 480 of file qmetaobjectbuilder.cpp.

◆ 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 499 of file qmetaobjectbuilder.cpp.

◆ 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 578 of file qmetaobjectbuilder.cpp.

◆ 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 594 of file qmetaobjectbuilder.cpp.

◆ 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 650 of file qmetaobjectbuilder.cpp.

◆ 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 384 of file qmetaobjectbuilder.cpp.

◆ 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 400 of file qmetaobjectbuilder.cpp.

◆ 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 419 of file qmetaobjectbuilder.cpp.

◆ 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 520 of file qmetaobjectbuilder.cpp.

◆ 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 529 of file qmetaobjectbuilder.cpp.

◆ 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 544 of file qmetaobjectbuilder.cpp.

◆ 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 635 of file qmetaobjectbuilder.cpp.

◆ 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 463 of file qmetaobjectbuilder.cpp.

◆ 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 448 of file qmetaobjectbuilder.cpp.

◆ 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 355 of file qmetaobjectbuilder.cpp.

◆ 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 803 of file qmetaobjectbuilder.cpp.

◆ 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 818 of file qmetaobjectbuilder.cpp.

◆ 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 240 of file qmetaobjectbuilder.cpp.

◆ constructor()

QMetaMethodBuilder QMetaObjectBuilder::constructor ( int index) const

Returns the constructor at index in this class.

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

Definition at line 743 of file qmetaobjectbuilder.cpp.

◆ constructorCount()

int QMetaObjectBuilder::constructorCount ( ) const

Returns the number of constructors in this class.

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

Definition at line 320 of file qmetaobjectbuilder.cpp.

◆ enumerator()

QMetaEnumBuilder QMetaObjectBuilder::enumerator ( int index) const

Returns the enumerator at index in this class.

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

Definition at line 770 of file qmetaobjectbuilder.cpp.

◆ 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 343 of file qmetaobjectbuilder.cpp.

◆ flags()

MetaObjectFlags QMetaObjectBuilder::flags ( ) const

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

See also
setFlags()

Definition at line 287 of file qmetaobjectbuilder.cpp.

◆ 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 1020 of file qmetaobjectbuilder.cpp.

◆ 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 973 of file qmetaobjectbuilder.cpp.

◆ 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 1004 of file qmetaobjectbuilder.cpp.

◆ 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 925 of file qmetaobjectbuilder.cpp.

◆ 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 989 of file qmetaobjectbuilder.cpp.

◆ 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 941 of file qmetaobjectbuilder.cpp.

◆ 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 957 of file qmetaobjectbuilder.cpp.

◆ method()

QMetaMethodBuilder QMetaObjectBuilder::method ( int index) const

Returns the method at index in this class.

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

Definition at line 730 of file qmetaobjectbuilder.cpp.

◆ 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 310 of file qmetaobjectbuilder.cpp.

◆ property()

QMetaPropertyBuilder QMetaObjectBuilder::property ( int index) const

Returns the property at index in this class.

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

Definition at line 756 of file qmetaobjectbuilder.cpp.

◆ 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 331 of file qmetaobjectbuilder.cpp.

◆ 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 788 of file qmetaobjectbuilder.cpp.

◆ 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 371 of file qmetaobjectbuilder.cpp.

◆ 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 893 of file qmetaobjectbuilder.cpp.

◆ 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 855 of file qmetaobjectbuilder.cpp.

◆ 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 880 of file qmetaobjectbuilder.cpp.

◆ 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 834 of file qmetaobjectbuilder.cpp.

◆ 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 867 of file qmetaobjectbuilder.cpp.

◆ 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 913 of file qmetaobjectbuilder.cpp.

◆ 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 251 of file qmetaobjectbuilder.cpp.

◆ 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 298 of file qmetaobjectbuilder.cpp.

◆ 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 1511 of file qmetaobjectbuilder.cpp.

◆ 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 275 of file qmetaobjectbuilder.cpp.

◆ 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 1500 of file qmetaobjectbuilder.cpp.

◆ 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 263 of file qmetaobjectbuilder.cpp.

◆ 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 1478 of file qmetaobjectbuilder.cpp.

Friends And Related Symbol Documentation

◆ QMetaEnumBuilder

friend class QMetaEnumBuilder
friend

Definition at line 142 of file qmetaobjectbuilder_p.h.

◆ QMetaMethodBuilder

friend class QMetaMethodBuilder
friend

Definition at line 140 of file qmetaobjectbuilder_p.h.

◆ QMetaPropertyBuilder

friend class QMetaPropertyBuilder
friend

Definition at line 141 of file qmetaobjectbuilder_p.h.


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