- All Implemented Interfaces:
QtObjectInterface,Cloneable
Manages named types in the meta-object system
Java wrapper for Qt class QMetaType
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceWrites a value to data stream.static interfaceReads a value from data stream.static interfaceWrites a value to debug stream.static final classThis class represents a QMetaType-registered but Java-unknown 8 Bit enumerator.static final classThis class represents a QMetaType-registered but Java-unknown 32 Bit enumerator.static final classThis class represents a QMetaType-registered but Java-unknown enumerator type which can be used in QFlags.static final classThis class represents a QMetaType-registered but Java-unknown QFlags type.static final classThis class represents a QMetaType-registered but Java-unknown gadget type.static final classThis class represents a QMetaType-registered but Java-unknown 64 Bit enumerator.static final classThis class represents a QMetaType-registered but Java-unknown object type.static final classThis class represents a QMetaType-registered but Java-unknown 16 Bit enumerator.static interfaceInterface super type for all generic classes representing a QMetaType-registered but Java-unknown value type.static final classThis class represents a QMetaType-registered but Java-unknown value type.static enumJava wrapper for Qt enum QMetaType::Typestatic enumJava wrapper for Qt enum QMetaType::TypeFlagstatic final classQFlags type for enumQMetaType.TypeFlagNested classes/interfaces inherited from class io.qt.QtObject
QtObject.QPrivateConstructor -
Constructor Summary
ConstructorsModifierConstructorDescriptionQMetaType(int type) QMetaType(QMetaType.Type type) Overloaded constructor forQMetaType(int).protectedConstructor for internal use only. -
Method Summary
Modifier and TypeMethodDescriptionfinal longalignOf()static booleancanConvert(QMetaType fromType, QMetaType toType) static booleanclone()final Objectcreate()Overloaded function forcreate(Object)withcopy = null.final ObjectReturns a copy of copy, assuming it is of the type that thisQMetaTypeinstance was created for.booleanUsed to check if this object shares native resources with the other object if the other object is a subtype of QtJambiInterface.final QMetaType.TypeFlagsflags()static QMetaTypefromName(byte[] name) static QMetaTypefromName(QByteArray name) static QMetaTypefromName(QByteArrayView name) static QMetaTypestatic QMetaTypeReturns theQMetaTypecorresponding to the given class.inthashCode()final booleanfinal intid()Overloaded function forid(int)witharg__1 = 0.final intid(int arg__1) final booleanfinal booleanfinal booleanstatic booleanisRegistered(int type) final booleanisValid()final Class<?>javaType()Returns the Java class for this meta type.static Class<?>javaType(int metaTypeId) Returns the Java class for the given meta type ID.static QMetaObjectmetaObjectForType(int type) Deprecated.static intmetaTypeId(Class<?> clazz, QMetaType... instantiations) Returns the meta type id of goven class at compile time.final Stringname()static <T> intregisterDataStreamOperators(QMetaType.DataStreamInFn<T> datastreamInFn, QMetaType.DataStreamOutFn<T> datastreamOutFn) Registers datastream operators for meta typeT.static <T> intregisterDebugStreamOperator(QMetaType.DebugStreamFn<T> debugstreamFn) Registers debug stream operator for meta typeT.static intregisterMetaType(Class<?> clazz, QMetaType... instantiations) Registers the given class as meta type.final longsizeOf()static intsizeOf(int type) Deprecated.final StringtoString()Returns the type name associated with thisQMetaTypeasString.static inttype(QByteArray typeName) Deprecated.static intDeprecated.static QMetaType.TypeFlagstypeFlags(int type) Deprecated.static StringtypeName(int type) Deprecated.static voidunregisterMetaType(QMetaType type) Methods inherited from class io.qt.QtObject
dispose, isDisposed
-
Constructor Details
-
QMetaType
public QMetaType() -
QMetaType
public QMetaType(int type) -
QMetaType
Constructor for internal use only.- Parameters:
p- expected to benull.
-
QMetaType
Overloaded constructor forQMetaType(int).- Parameters:
type-
-
-
Method Details
-
alignOf
-
flags
-
hasRegisteredDataStreamOperators
-
id
Overloaded function for
id(int)witharg__1 = 0. -
id
-
isEqualityComparable
-
isOrdered
-
isRegistered
-
isValid
-
name
-
sizeOf
-
canConvert
-
canView
-
fromName
-
isRegistered
public static boolean isRegistered(int type) -
metaObjectForType
Deprecated. -
sizeOf
Deprecated. -
type
Deprecated. -
type
Deprecated. -
typeFlags
Deprecated. -
typeName
Deprecated. -
unregisterMetaType
-
equals
Description copied from class:QtObjectUsed to check if this object shares native resources with the other object if the other object is a subtype of QtJambiInterface. Otherwise it will return the result of calling the super class implementation. -
hashCode
-
create
Overloaded function for
create(Object)withcopy = null.- Returns:
- new instance
-
create
Returns a copy of copy, assuming it is of the type that this
QMetaTypeinstance was created for.If copy is
null, creates a default constructed instance.- Parameters:
copy-- Returns:
- new instance
-
toString
Returns the type name associated with thisQMetaTypeasString. -
fromType
Returns the
QMetaTypecorresponding to the given class.If the class has never been registered as meta type
UnknownTypeis returned.If given class is generic (e.g.
QList,QPair,QMap) specify the template instantiations to be used in the registered template type.- Parameters:
clazz- the class to be registeredinstantiations- optional instantiations for generics (templates)- Returns:
- meta type ID
-
registerMetaType
Registers the given class as meta type. Returns the internal ID used by
QMetaType.After a type has been registered, you can create and destroy objects of that type dynamically at run-time.
If given class is generic (e.g.
QList,QPair,QMap) specify the template instantiations to be used in the registered template type.- Parameters:
clazz- the class to be registeredinstantiations- optional instantiations for generics (templates)- Returns:
- meta type ID
-
registerDataStreamOperators
public static <T> int registerDataStreamOperators(QMetaType.DataStreamInFn<T> datastreamInFn, QMetaType.DataStreamOutFn<T> datastreamOutFn) Registers datastream operators for meta typeT.- Parameters:
datastreamInFn- (only lambda expressions allowed)datastreamOutFn- (only lambda expressions allowed)- Returns:
- the registered meta type
-
registerDebugStreamOperator
Registers debug stream operator for meta typeT.- Parameters:
debugstreamFn- (only lambda expressions allowed)- Returns:
- the registered meta type
-
metaTypeId
Returns the meta type id of goven class at compile time.
If the class has never been registered as meta type
UnknownTypeis returned.If given class is generic (e.g.
QList,QPair,QMap) specify the template instantiations to be used in the registered template type.See qMetaTypeId<T>()
- Parameters:
clazz- the class to be registeredinstantiations- optional instantiations for generics (templates)- Returns:
- meta type ID
-
javaType
Returns the Java class for this meta type.- Returns:
- java class
-
javaType
Returns the Java class for the given meta type ID.- Returns:
- java class
-
fromName
-
fromName
-
fromName
-
clone
-