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

#include <qqmltype_p.h>

Collaboration diagram for QQmlType:

Classes

struct  SingletonInstanceInfo

Public Types

enum  RegistrationType {
  CppType = 0 , SingletonType = 1 , InterfaceType = 2 , CompositeType = 3 ,
  CompositeSingletonType = 4 , InlineComponentType = 5 , SequentialContainerType = 6 , JavaScriptType = 7 ,
  AnyRegistrationType = 255
}
typedef QVariant(* CreateValueTypeFunc) (const QJSValue &)
typedef void(* CreateFunc) (void *, void *)
typedef QObject *(* ExtensionFunc) (QObject *)

Public Member Functions

 QQmlType ()
 QQmlType (const QQmlType &other)
 QQmlType (QQmlType &&other)
QQmlTypeoperator= (const QQmlType &other)
QQmlTypeoperator= (QQmlType &&other)
 QQmlType (const QQmlTypePrivate *priv)
 ~QQmlType ()
bool isValid () const
QByteArray typeName () const
QString qmlTypeName () const
QString elementName () const
QHashedString module () const
QTypeRevision version () const
bool availableInVersion (QTypeRevision version) const
bool availableInVersion (const QHashedStringRef &module, QTypeRevision version) const
CreateValueTypeFunc createValueTypeFunction () const
bool canConstructValueType () const
bool canPopulateValueType () const
QObjectcreate () const
QObjectcreate (void **, size_t) const
 Like create without arguments, but allocates some extra space after the object.
QObjectcreateWithQQmlData () const
CreateFunc createFunction () const
QQmlCustomParsercustomParser () const
bool isCreatable () const
ExtensionFunc extensionFunction () const
const QMetaObjectextensionMetaObject () const
bool isExtendedType () const
QString noCreationReason () const
bool isSingleton () const
bool isInterface () const
bool isComposite () const
bool isCompositeSingleton () const
bool isQObjectSingleton () const
bool isQJSValueSingleton () const
bool isSequentialContainer () const
bool isValueType () const
QMetaType typeId () const
QMetaType qListTypeId () const
QMetaSequence listMetaSequence () const
const QMetaObjectmetaObject () const
const QMetaObjectmetaObjectForValueType () const
const QMetaObjectbaseMetaObject () const
QTypeRevision metaObjectRevision () const
bool containsRevisionedAttributes () const
QQmlAttachedPropertiesFunc attachedPropertiesFunction (QQmlTypeLoader *typeLoader) const
const QMetaObjectattachedPropertiesType (QQmlTypeLoader *typeLoader) const
int parserStatusCast () const
const char * interfaceIId () const
int propertyValueSourceCast () const
int propertyValueInterceptorCast () const
int finalizerCast () const
int index () const
bool isInlineComponentType () const
SingletonInstanceInfo::ConstPtr singletonInstanceInfo () const
QUrl sourceUrl () const
int enumValue (QQmlTypeLoader *typeLoader, const QHashedStringRef &, bool *ok) const
int enumValue (QQmlTypeLoader *typeLoader, const QHashedCStringRef &, bool *ok) const
int enumValue (QQmlTypeLoader *typeLoader, const QV4::String *, bool *ok) const
int scopedEnumIndex (QQmlTypeLoader *typeLoader, const QV4::String *, bool *ok) const
int scopedEnumIndex (QQmlTypeLoader *typeLoader, const QString &, bool *ok) const
int unscopedEnumIndex (QQmlTypeLoader *typeLoader, const QV4::String *, bool *ok) const
int unscopedEnumIndex (QQmlTypeLoader *typeLoader, const QString &, bool *ok) const
int scopedEnumValue (QQmlTypeLoader *typeLoader, int index, const QV4::String *, bool *ok) const
int scopedEnumValue (QQmlTypeLoader *typeLoader, int index, const QString &, bool *ok) const
int scopedEnumValue (QQmlTypeLoader *typeLoader, const QHashedStringRef &, const QHashedStringRef &, bool *ok) const
int unscopedEnumValue (QQmlTypeLoader *typeLoader, int index, const QV4::String *, bool *ok) const
int unscopedEnumValue (QQmlTypeLoader *typeLoader, int index, const QString &, bool *ok) const
int unscopedEnumValue (QQmlTypeLoader *typeLoader, const QHashedStringRef &, const QHashedStringRef &, bool *ok) const
QString scopedEnumKey (QQmlTypeLoader *typeLoader, int index, int value, bool *ok) const
QStringList scopedEnumKeys (QQmlTypeLoader *typeLoader, int index, int value, bool *ok) const
QString unscopedEnumKey (QQmlTypeLoader *typeLoader, int index, int value, bool *ok) const
QStringList unscopedEnumKeys (QQmlTypeLoader *typeLoader, int index, int value, bool *ok) const
const QQmlTypePrivatepriv () const
void createProxy (QObject *instance) const

Static Public Member Functions

static void refHandle (const QQmlTypePrivate *priv)
static void derefHandle (const QQmlTypePrivate *priv)
static int refCount (const QQmlTypePrivate *priv)

Friends

class QQmlTypePrivate
size_t qHash (const QQmlType &t, size_t seed=0)
bool operator== (const QQmlType &a, const QQmlType &b) noexcept
bool operator!= (const QQmlType &a, const QQmlType &b) noexcept

Detailed Description

Definition at line 45 of file qqmltype_p.h.

Member Typedef Documentation

◆ CreateFunc

typedef void(* QQmlType::CreateFunc) (void *, void *)

Definition at line 78 of file qqmltype_p.h.

◆ CreateValueTypeFunc

typedef QVariant(* QQmlType::CreateValueTypeFunc) (const QJSValue &)

Definition at line 68 of file qqmltype_p.h.

◆ ExtensionFunc

typedef QObject *(* QQmlType::ExtensionFunc) (QObject *)

Definition at line 84 of file qqmltype_p.h.

Member Enumeration Documentation

◆ RegistrationType

Enumerator
CppType 
SingletonType 
InterfaceType 
CompositeType 
CompositeSingletonType 
InlineComponentType 
SequentialContainerType 
JavaScriptType 
AnyRegistrationType 

Definition at line 174 of file qqmltype_p.h.

Constructor & Destructor Documentation

◆ QQmlType() [1/4]

QQmlType::QQmlType ( )
default

◆ QQmlType() [2/4]

QQmlType::QQmlType ( const QQmlType & other)
default

◆ QQmlType() [3/4]

QQmlType::QQmlType ( QQmlType && other)
default

◆ QQmlType() [4/4]

QQmlType::QQmlType ( const QQmlTypePrivate * priv)
explicit

Definition at line 104 of file qqmltype.cpp.

◆ ~QQmlType()

QQmlType::~QQmlType ( )
default

Member Function Documentation

◆ attachedPropertiesFunction()

QQmlAttachedPropertiesFunc QQmlType::attachedPropertiesFunction ( QQmlTypeLoader * typeLoader) const

Definition at line 714 of file qqmltype.cpp.

◆ attachedPropertiesType()

const QMetaObject * QQmlType::attachedPropertiesType ( QQmlTypeLoader * typeLoader) const

Definition at line 721 of file qqmltype.cpp.

◆ availableInVersion() [1/2]

bool QQmlType::availableInVersion ( const QHashedStringRef & module,
QTypeRevision version ) const

Definition at line 135 of file qqmltype.cpp.

◆ availableInVersion() [2/2]

bool QQmlType::availableInVersion ( QTypeRevision version) const

Definition at line 121 of file qqmltype.cpp.

◆ baseMetaObject()

const QMetaObject * QQmlType::baseMetaObject ( ) const

Definition at line 699 of file qqmltype.cpp.

◆ canConstructValueType()

bool QQmlType::canConstructValueType ( ) const

Definition at line 561 of file qqmltype.cpp.

◆ canPopulateValueType()

bool QQmlType::canPopulateValueType ( ) const

Definition at line 568 of file qqmltype.cpp.

◆ containsRevisionedAttributes()

bool QQmlType::containsRevisionedAttributes ( ) const

Definition at line 704 of file qqmltype.cpp.

◆ create() [1/2]

QObject * QQmlType::create ( ) const

Allocates and initializes an object if the type is creatable. Returns a pointer to the object, or nullptr if the type was not creatable.

Definition at line 487 of file qqmltype.cpp.

◆ create() [2/2]

QObject * QQmlType::create ( void ** memory,
size_t additionalMemory ) const

Like create without arguments, but allocates some extra space after the object.

Parameters
memoryAn out-only argument. *memory will point to the start of the additionally allocated memory.
additionalMemoryThe amount of extra memory in bytes that shoudld be allocated.
Note
This function is used to allocate the QQmlData next to the object in the QQmlObjectCreator.

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 505 of file qqmltype.cpp.

◆ createFunction()

QQmlType::CreateFunc QQmlType::createFunction ( ) const

Definition at line 575 of file qqmltype.cpp.

◆ createProxy()

void QQmlType::createProxy ( QObject * instance) const

Definition at line 897 of file qqmltype.cpp.

◆ createValueTypeFunction()

QQmlType::CreateValueTypeFunc QQmlType::createValueTypeFunction ( ) const

Definition at line 554 of file qqmltype.cpp.

◆ createWithQQmlData()

QObject * QQmlType::createWithQQmlData ( ) const

Like create, but also allocates memory behind the object, constructs a QQmlData there and lets the objects declarativeData point to the newly created QQmlData.

Definition at line 523 of file qqmltype.cpp.

◆ customParser()

QQmlCustomParser * QQmlType::customParser ( ) const

Definition at line 545 of file qqmltype.cpp.

◆ derefHandle()

void QQmlType::derefHandle ( const QQmlTypePrivate * priv)
static

Definition at line 884 of file qqmltype.cpp.

◆ elementName()

QString QQmlType::elementName ( ) const

Definition at line 467 of file qqmltype.cpp.

◆ enumValue() [1/3]

int QQmlType::enumValue ( QQmlTypeLoader * typeLoader,
const QHashedCStringRef & name,
bool * ok ) const

Definition at line 782 of file qqmltype.cpp.

◆ enumValue() [2/3]

int QQmlType::enumValue ( QQmlTypeLoader * typeLoader,
const QHashedStringRef & name,
bool * ok ) const

Definition at line 777 of file qqmltype.cpp.

◆ enumValue() [3/3]

int QQmlType::enumValue ( QQmlTypeLoader * typeLoader,
const QV4::String * name,
bool * ok ) const

Definition at line 787 of file qqmltype.cpp.

◆ extensionFunction()

QQmlType::ExtensionFunc QQmlType::extensionFunction ( ) const

Definition at line 594 of file qqmltype.cpp.

◆ extensionMetaObject()

const QMetaObject * QQmlType::extensionMetaObject ( ) const

Definition at line 609 of file qqmltype.cpp.

◆ finalizerCast()

int QQmlType::finalizerCast ( ) const

Definition at line 749 of file qqmltype.cpp.

◆ index()

int QQmlType::index ( ) const

Definition at line 763 of file qqmltype.cpp.

◆ interfaceIId()

const char * QQmlType::interfaceIId ( ) const

Definition at line 756 of file qqmltype.cpp.

◆ isComposite()

bool QQmlType::isComposite ( ) const

Definition at line 639 of file qqmltype.cpp.

◆ isCompositeSingleton()

bool QQmlType::isCompositeSingleton ( ) const

Definition at line 644 of file qqmltype.cpp.

◆ isCreatable()

bool QQmlType::isCreatable ( ) const

Definition at line 589 of file qqmltype.cpp.

◆ isExtendedType()

bool QQmlType::isExtendedType ( ) const

Definition at line 624 of file qqmltype.cpp.

◆ isInlineComponentType()

bool QQmlType::isInlineComponentType ( ) const

Definition at line 768 of file qqmltype.cpp.

◆ isInterface()

bool QQmlType::isInterface ( ) const

Definition at line 634 of file qqmltype.cpp.

◆ isQJSValueSingleton()

bool QQmlType::isQJSValueSingleton ( ) const

Definition at line 658 of file qqmltype.cpp.

◆ isQObjectSingleton()

bool QQmlType::isQObjectSingleton ( ) const

Definition at line 653 of file qqmltype.cpp.

◆ isSequentialContainer()

bool QQmlType::isSequentialContainer ( ) const

Definition at line 663 of file qqmltype.cpp.

◆ isSingleton()

bool QQmlType::isSingleton ( ) const

Definition at line 629 of file qqmltype.cpp.

◆ isValid()

bool QQmlType::isValid ( ) const
inline

Definition at line 56 of file qqmltype_p.h.

◆ isValueType()

bool QQmlType::isValueType ( ) const

Definition at line 668 of file qqmltype.cpp.

◆ listMetaSequence()

QMetaSequence QQmlType::listMetaSequence ( ) const

Definition at line 683 of file qqmltype.cpp.

◆ metaObject()

const QMetaObject * QQmlType::metaObject ( ) const

Definition at line 688 of file qqmltype.cpp.

◆ metaObjectForValueType()

const QMetaObject * QQmlType::metaObjectForValueType ( ) const

Definition at line 693 of file qqmltype.cpp.

◆ metaObjectRevision()

QTypeRevision QQmlType::metaObjectRevision ( ) const

Definition at line 709 of file qqmltype.cpp.

◆ module()

QHashedString QQmlType::module ( ) const

Definition at line 107 of file qqmltype.cpp.

◆ noCreationReason()

QString QQmlType::noCreationReason ( ) const

Definition at line 582 of file qqmltype.cpp.

◆ operator=() [1/2]

QQmlType & QQmlType::operator= ( const QQmlType & other)
default

◆ operator=() [2/2]

QQmlType & QQmlType::operator= ( QQmlType && other)
default

◆ parserStatusCast()

int QQmlType::parserStatusCast ( ) const

Definition at line 728 of file qqmltype.cpp.

◆ priv()

const QQmlTypePrivate * QQmlType::priv ( ) const
inline

Definition at line 169 of file qqmltype_p.h.

◆ propertyValueInterceptorCast()

int QQmlType::propertyValueInterceptorCast ( ) const

Definition at line 742 of file qqmltype.cpp.

◆ propertyValueSourceCast()

int QQmlType::propertyValueSourceCast ( ) const

Definition at line 735 of file qqmltype.cpp.

◆ qListTypeId()

QMetaType QQmlType::qListTypeId ( ) const

Definition at line 678 of file qqmltype.cpp.

◆ qmlTypeName()

QString QQmlType::qmlTypeName ( ) const

Definition at line 474 of file qqmltype.cpp.

◆ refCount()

int QQmlType::refCount ( const QQmlTypePrivate * priv)
static

Definition at line 890 of file qqmltype.cpp.

◆ refHandle()

void QQmlType::refHandle ( const QQmlTypePrivate * priv)
static

Definition at line 878 of file qqmltype.cpp.

◆ scopedEnumIndex() [1/2]

int QQmlType::scopedEnumIndex ( QQmlTypeLoader * typeLoader,
const QString & name,
bool * ok ) const

Definition at line 798 of file qqmltype.cpp.

◆ scopedEnumIndex() [2/2]

int QQmlType::scopedEnumIndex ( QQmlTypeLoader * typeLoader,
const QV4::String * name,
bool * ok ) const

Definition at line 792 of file qqmltype.cpp.

◆ scopedEnumKey()

QString QQmlType::scopedEnumKey ( QQmlTypeLoader * typeLoader,
int index,
int value,
bool * ok ) const

Definition at line 852 of file qqmltype.cpp.

◆ scopedEnumKeys()

QStringList QQmlType::scopedEnumKeys ( QQmlTypeLoader * typeLoader,
int index,
int value,
bool * ok ) const

Definition at line 858 of file qqmltype.cpp.

◆ scopedEnumValue() [1/3]

int QQmlType::scopedEnumValue ( QQmlTypeLoader * typeLoader,
const QHashedStringRef & scopedEnumName,
const QHashedStringRef & name,
bool * ok ) const

Definition at line 828 of file qqmltype.cpp.

◆ scopedEnumValue() [2/3]

int QQmlType::scopedEnumValue ( QQmlTypeLoader * typeLoader,
int index,
const QString & name,
bool * ok ) const

Definition at line 822 of file qqmltype.cpp.

◆ scopedEnumValue() [3/3]

int QQmlType::scopedEnumValue ( QQmlTypeLoader * typeLoader,
int index,
const QV4::String * name,
bool * ok ) const

Definition at line 816 of file qqmltype.cpp.

◆ singletonInstanceInfo()

QQmlType::SingletonInstanceInfo::ConstPtr QQmlType::singletonInstanceInfo ( ) const

Definition at line 536 of file qqmltype.cpp.

◆ sourceUrl()

QUrl QQmlType::sourceUrl ( ) const

Definition at line 772 of file qqmltype.cpp.

◆ typeId()

QMetaType QQmlType::typeId ( ) const

Definition at line 673 of file qqmltype.cpp.

◆ typeName()

QByteArray QQmlType::typeName ( ) const

Definition at line 456 of file qqmltype.cpp.

◆ unscopedEnumIndex() [1/2]

int QQmlType::unscopedEnumIndex ( QQmlTypeLoader * typeLoader,
const QString & name,
bool * ok ) const

Definition at line 810 of file qqmltype.cpp.

◆ unscopedEnumIndex() [2/2]

int QQmlType::unscopedEnumIndex ( QQmlTypeLoader * typeLoader,
const QV4::String * name,
bool * ok ) const

Definition at line 804 of file qqmltype.cpp.

◆ unscopedEnumKey()

QString QQmlType::unscopedEnumKey ( QQmlTypeLoader * typeLoader,
int index,
int value,
bool * ok ) const

Definition at line 864 of file qqmltype.cpp.

◆ unscopedEnumKeys()

QStringList QQmlType::unscopedEnumKeys ( QQmlTypeLoader * typeLoader,
int index,
int value,
bool * ok ) const

Definition at line 870 of file qqmltype.cpp.

◆ unscopedEnumValue() [1/3]

int QQmlType::unscopedEnumValue ( QQmlTypeLoader * typeLoader,
const QHashedStringRef & scopedEnumName,
const QHashedStringRef & name,
bool * ok ) const

Definition at line 846 of file qqmltype.cpp.

◆ unscopedEnumValue() [2/3]

int QQmlType::unscopedEnumValue ( QQmlTypeLoader * typeLoader,
int index,
const QString & name,
bool * ok ) const

Definition at line 840 of file qqmltype.cpp.

◆ unscopedEnumValue() [3/3]

int QQmlType::unscopedEnumValue ( QQmlTypeLoader * typeLoader,
int index,
const QV4::String * name,
bool * ok ) const

Definition at line 834 of file qqmltype.cpp.

◆ version()

QTypeRevision QQmlType::version ( ) const

Definition at line 114 of file qqmltype.cpp.

◆ operator!=

bool operator!= ( const QQmlType & a,
const QQmlType & b )
friend

Definition at line 195 of file qqmltype_p.h.

◆ operator==

bool operator== ( const QQmlType & a,
const QQmlType & b )
friend

Definition at line 191 of file qqmltype_p.h.

◆ qHash

size_t qHash ( const QQmlType & t,
size_t seed = 0 )
friend

Definition at line 203 of file qqmltype_p.h.

◆ QQmlTypePrivate

friend class QQmlTypePrivate
friend

Definition at line 189 of file qqmltype_p.h.


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