java.lang.Object
io.qt.QtObject
io.qt.core.QMetaType
- 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 interfaceConvert value of T1 into T2static 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 enumQMetaType::Typestatic enumJava wrapper for Qt enumQMetaType::TypeFlagstatic final classQFlagstype for enumQMetaType.TypeFlag -
Constructor Summary
ConstructorsConstructorDescriptionOverloaded constructor forQMetaType(int)withtype = 0.QMetaType(int type) QMetaType(QMetaType.Type type) Overloaded constructor forQMetaType(int). -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates and returns a copy of this object.static OptionalIntfinal Objectcreate()Overloaded function forcreate(java.lang.Object)withcopy = null.static Objectcreate(int type) Overloaded function forcreate(int, java.lang.Object)withcopy = null.static Objectfinal Objectstatic booleandebugStream(QDebug dbg, Object rhs, int typeId) final booleanSeeoperator==(QMetaType,QMetaType) static OptionalIntbooleanSeeoperator==(QMetaType,QMetaType) final QMetaType.TypeFlagsflags()static QMetaTypefromObject(Object obj) static QMetaTypeinthashCode()Returns the objects's hash code computed byqHash(QMetaType).static booleanhasRegisteredComparators(int typeId) static booleanhasRegisteredConverterFunction(int fromTypeId, int toTypeId) static booleanhasRegisteredDebugStreamOperator(int typeId) final intid()final 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.load(QDataStream stream, int type) final QMetaObjectstatic QMetaObjectmetaObjectForType(int type) static intmetaTypeId(Class<?> clazz, QMetaType ... instantiations) Deprecated.final QByteArrayname()static intqMetaTypeId(Class<?> clazz, QMetaType ... instantiations) SeeqMetaTypeId<T>()static intqRegisterMetaType(Class<?> clazz, QMetaType ... instantiations) static <T1,T2> boolean registerConverter(QMetaType.ConverterFn<T1, T2> converterFn) Registers debug stream operator for meta typeT.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) Deprecated.static booleansave(QDataStream stream, int type, Object data) final intsizeOf()static intsizeOf(int type) final StringtoString()Returns the type name associated with thisQMetaTypeasString.static inttype(byte [] typeName) Overloaded function fortype(io.qt.core.QByteArray).static inttype(QByteArray typeName) static intstatic QMetaType.TypeFlagstypeFlags(int type) static StringtypeName(int type) static booleanunregisterType(int type) SeeQMetaType::unregisterType(int) Methods inherited from class io.qt.QtObject
dispose, isDisposed
-
Constructor Details
-
QMetaType
public QMetaType(int type) - Parameters:
type-- Since:
- This function was introduced in Qt 5.0.
-
QMetaType
Overloaded constructor forQMetaType(int).- Parameters:
type-
-
QMetaType
public QMetaType()Overloaded constructor for
QMetaType(int)withtype = 0.
-
-
Method Details
-
create
- Parameters:
copy-- Returns:
- Since:
- This function was introduced in Qt 5.0.
-
flags
- Returns:
- Since:
- This function was introduced in Qt 5.0.
-
id
- Returns:
- Since:
- This function was introduced in Qt 5.13.
-
isRegistered
- Returns:
- Since:
- This function was introduced in Qt 5.0.
-
isValid
- Returns:
- Since:
- This function was introduced in Qt 5.0.
-
metaObject
- Returns:
- Since:
- This function was introduced in Qt 5.5.
-
name
- Returns:
- Since:
- This function was introduced in Qt 5.15.
-
equals
See
operator==(QMetaType,QMetaType) - Parameters:
b-- Returns:
-
sizeOf
- Returns:
- Since:
- This function was introduced in Qt 5.0.
-
compare
- Parameters:
lhs-rhs-typeId-- Returns:
- Since:
- This function was introduced in Qt 5.2.
-
convert
- Parameters:
from-fromTypeId-toTypeId-- Returns:
- Since:
- This function was introduced in Qt 5.2.
-
create
- Parameters:
type-copy-- Returns:
-
debugStream
- Parameters:
dbg-rhs-typeId-- Returns:
- Since:
- This function was introduced in Qt 5.2.
-
equals
- Parameters:
lhs-rhs-typeId-- Returns:
- Since:
- This function was introduced in Qt 5.5.
-
fromType
- Parameters:
clazz- Java class of the meta typeinstantiations- only required for generic container types- Returns:
- Since:
- This function was introduced in Qt 5.15.
-
hasRegisteredComparators
public static boolean hasRegisteredComparators(int typeId) - Parameters:
typeId-- Returns:
- Since:
- This function was introduced in Qt 5.2.
-
hasRegisteredConverterFunction
public static boolean hasRegisteredConverterFunction(int fromTypeId, int toTypeId) - Parameters:
fromTypeId-toTypeId-- Returns:
- Since:
- This function was introduced in Qt 5.2.
-
hasRegisteredDebugStreamOperator
public static boolean hasRegisteredDebugStreamOperator(int typeId) - Parameters:
typeId-- Returns:
- Since:
- This function was introduced in Qt 5.2.
-
isRegistered
public static boolean isRegistered(int type) - Parameters:
type-- Returns:
-
load
- Parameters:
stream-type-- Returns:
-
metaObjectForType
- Parameters:
type-- Returns:
- Since:
- This function was introduced in Qt 5.0.
-
qMetaTypeId
See
qMetaTypeId<T>()- Parameters:
clazz- Java class of the meta typeinstantiations- only required for generic container types- Returns:
- Since:
- This function was introduced in Qt 4.1.
-
qRegisterMetaType
- Parameters:
clazz- Java class to be registeredinstantiations- only required for generic container types- Returns:
- Since:
- This function was introduced in Qt 4.2.
-
save
- Parameters:
stream-type-data-- Returns:
-
sizeOf
public static int sizeOf(int type) - Parameters:
type-- Returns:
- Since:
- This function was introduced in Qt 5.0.
-
type
- Parameters:
typeName-- Returns:
- Since:
- This function was introduced in Qt 5.5.
-
type
- Parameters:
typeName-- Returns:
-
typeFlags
- Parameters:
type-- Returns:
- Since:
- This function was introduced in Qt 5.0.
-
typeName
- Parameters:
type-- Returns:
-
unregisterType
public static boolean unregisterType(int type) See
QMetaType::unregisterType(int) - Parameters:
type-- Returns:
-
equals
See
operator==(QMetaType,QMetaType) -
hashCode
Returns the objects's hash code computed byqHash(QMetaType). -
registerDataStreamOperators
@QtUninvokable 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
@QtUninvokable public static <T> int registerDebugStreamOperator(QMetaType.DebugStreamFn<T> debugstreamFn) Registers debug stream operator for meta typeT.- Parameters:
debugstreamFn- (only lambda expressions allowed)- Returns:
- the registered meta type
-
registerConverter
@QtUninvokable public static <T1,T2> boolean registerConverter(QMetaType.ConverterFn<T1, T2> converterFn) Registers debug stream operator for meta typeT.- Parameters:
converterFn- (only lambda expressions allowed)- Returns:
- the registered meta type
-
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
-
fromObject
-
toString
Returns the type name associated with thisQMetaTypeasString. -
clone
Creates and returns a copy of this object.
-
create
Overloaded function for
create(java.lang.Object)withcopy = null. -
create
Overloaded function for
create(int, java.lang.Object)withcopy = null. -
metaTypeId
Deprecated.UseqMetaTypeId(java.lang.Class, io.qt.core.QMetaType[])instead. -
registerMetaType
Deprecated. -
type
public static int type(byte [] typeName) Overloaded function for
type(io.qt.core.QByteArray).
-
qMetaTypeId(java.lang.Class, io.qt.core.QMetaType[])instead.