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 interface
Convert value of T1 into T2static interface
Writes a value to data stream.static interface
Reads a value from data stream.static interface
Writes a value to debug stream.static final class
This class represents a QMetaType-registered but Java-unknown 8 Bit enumerator.static final class
This class represents a QMetaType-registered but Java-unknown 32 Bit enumerator.static final class
This class represents a QMetaType-registered but Java-unknown enumerator type which can be used in QFlags.static final class
This class represents a QMetaType-registered but Java-unknown QFlags type.static final class
This class represents a QMetaType-registered but Java-unknown gadget type.static final class
This class represents a QMetaType-registered but Java-unknown 64 Bit enumerator.static final class
This class represents a QMetaType-registered but Java-unknown object type.static final class
This class represents a QMetaType-registered but Java-unknown 16 Bit enumerator.static interface
Interface super type for all generic classes representing a QMetaType-registered but Java-unknown value type.static final class
This class represents a QMetaType-registered but Java-unknown value type.static enum
Java wrapper for Qt enumQMetaType::Type
static enum
Java wrapper for Qt enumQMetaType::TypeFlag
static final class
QFlags
type 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 OptionalInt
final Object
create()
Overloaded function forcreate(java.lang.Object)
withcopy = null
.static Object
create
(int type) Overloaded function forcreate(int, java.lang.Object)
withcopy = null
.static Object
final Object
static boolean
debugStream
(QDebug dbg, Object rhs, int typeId) final boolean
Seeoperator==(QMetaType,
QMetaType) static OptionalInt
boolean
Seeoperator==(QMetaType,
QMetaType) final QMetaType.TypeFlags
flags()
static QMetaType
fromObject
(Object obj) static QMetaType
int
hashCode()
Returns the objects's hash code computed byqHash(QMetaType)
.static boolean
hasRegisteredComparators
(int typeId) static boolean
hasRegisteredConverterFunction
(int fromTypeId, int toTypeId) static boolean
hasRegisteredDebugStreamOperator
(int typeId) final int
id()
final boolean
static boolean
isRegistered
(int type) final boolean
isValid()
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 QMetaObject
static QMetaObject
metaObjectForType
(int type) static int
metaTypeId
(Class<?> clazz, QMetaType ... instantiations) Deprecated.final QByteArray
name()
static int
qMetaTypeId
(Class<?> clazz, QMetaType... instantiations) SeeqMetaTypeId<T>()
static int
qRegisterMetaType
(Class<?> clazz, QMetaType... instantiations) static <T1,
T2> boolean registerConverter
(QMetaType.ConverterFn<T1, T2> converterFn) Registers debug stream operator for meta typeT
.static <T> int
registerDataStreamOperators
(QMetaType.DataStreamInFn<T> datastreamInFn, QMetaType.DataStreamOutFn<T> datastreamOutFn) Registers datastream operators for meta typeT
.static <T> int
registerDebugStreamOperator
(QMetaType.DebugStreamFn<T> debugstreamFn) Registers debug stream operator for meta typeT
.static int
registerMetaType
(Class<?> clazz, QMetaType ... instantiations) Deprecated.UseqRegisterMetaType(Class, QMetaType...)
instead.static boolean
save
(QDataStream stream, int type, Object data) final int
sizeOf()
static int
sizeOf
(int type) final String
toString()
Returns the type name associated with thisQMetaType
asString
.static int
type
(byte [] typeName) Overloaded function fortype(io.qt.core.QByteArray)
.static int
type
(QByteArray typeName) static int
static QMetaType.TypeFlags
typeFlags
(int type) static String
typeName
(int type) static boolean
unregisterType
(int type) SeeQMetaType::
unregisterType(int) Methods inherited from class io.qt.QtObject
dispose, isDisposed
-
Constructor Details
-
QMetaType
public QMetaType(int type) -
QMetaType
Overloaded constructor forQMetaType(int)
.- Parameters:
type
-
-
QMetaType
public QMetaType()Overloaded constructor for
QMetaType(int)
withtype = 0
.
-
-
Method Details
-
create
-
flags
-
id
-
isRegistered
-
isValid
-
metaObject
-
name
-
equals
See
operator==(QMetaType,
QMetaType) -
sizeOf
-
compare
-
convert
-
create
-
debugStream
-
equals
-
fromType
-
hasRegisteredComparators
public static boolean hasRegisteredComparators(int typeId) -
hasRegisteredConverterFunction
public static boolean hasRegisteredConverterFunction(int fromTypeId, int toTypeId) -
hasRegisteredDebugStreamOperator
public static boolean hasRegisteredDebugStreamOperator(int typeId) -
isRegistered
public static boolean isRegistered(int type) -
load
-
metaObjectForType
-
qMetaTypeId
See
qMetaTypeId<T>()
-
qRegisterMetaType
-
save
-
sizeOf
public static int sizeOf(int type) -
type
-
type
-
typeFlags
-
typeName
-
unregisterType
public static boolean unregisterType(int type) See
QMetaType::
unregisterType(int) -
equals
See
operator==(QMetaType,
QMetaType) -
hashCode
Returns the objects's hash code computed byqHash(QMetaType)
. -
registerMetaType
Deprecated.UseqRegisterMetaType(Class, QMetaType...)
instead. -
metaTypeId
Deprecated.UseqMetaTypeId(Class, QMetaType...)
instead. -
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
-
registerConverter
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 thisQMetaType
asString
. -
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
. -
type
public static int type(byte [] typeName) Overloaded function for
type(io.qt.core.QByteArray)
.
-
qMetaTypeId(Class, QMetaType...)
instead.