java.lang.Object
io.qt.core.QGenericArgument
Specifies a function pointer's argument type and value.
Qt's object types are represented by pointers, value types by values, e.g.:
Java class QWidget
leads to QWidget*
function return type,
Java class QColor
leads to QColor
function return type (as value).
Use asRef()
to call values and objects by reference type (e.g. QColor&
, QObject&
).
Use asConstRef()
to call values and objects by const reference (e.g. const QColor&
).
Use asPointer()
to call values by pointers (e.g. QColor*
).
-
Method Summary
Modifier and TypeMethodDescriptionCall java object as specified type.as
(QMetaType.Type type) Call java object as specified type.<T> QGenericArgument
Call java object as specified type.Call value or object by const reference (e.g.Call value by pointer (e.g.asRef()
Call value or object by reference (e.g.static QGenericArgument
Create generic argument with default value of given type.static QGenericArgument
defaultOf
(QMetaType.Type type) Create generic argument with default value of given type.static QGenericArgument
Create generic argument with default value of given type.static QGenericArgument
Call java object.static <T> QGenericReturnType<T>
Create generic return type from meta type.static <T> QGenericReturnType<T>
returning
(QMetaType.Type type) Create generic return type from meta type.static <T> QGenericReturnType<T>
Create generic return type from class type.
-
Method Details
-
asPointer
Call value by pointer (e.g.
QColor*
).- Returns:
- new instance
-
asRef
Call value or object by reference (e.g.
QColor&
,QObject&
).- Returns:
- new instance
-
asConstRef
Call value or object by const reference (e.g.
const QColor&
).- Returns:
- new instance
-
as
Call java object as specified type.- Type Parameters:
T
-- Parameters:
classType
-instantiations
-- Returns:
- new instance
-
as
Call java object as specified type.- Parameters:
metaType
-- Returns:
- new instance
-
as
Call java object as specified type.- Parameters:
type
-- Returns:
- new instance
-
of
Call java object.- Parameters:
value
-- Returns:
- instance
-
defaultOf
Create generic argument with default value of given type.- Parameters:
classType
-instantiations
-- Returns:
- instance
-
defaultOf
Create generic argument with default value of given type.- Parameters:
metaType
-- Returns:
- instance
-
defaultOf
Create generic argument with default value of given type.- Parameters:
type
-- Returns:
- instance
-
returning
Create generic return type from class type.- Type Parameters:
T
-- Parameters:
classType
-instantiations
- only useful to specify template types like QList<T>.- Returns:
- new instance
-
returning
Create generic return type from meta type.- Type Parameters:
T
-- Parameters:
metaType
-- Returns:
- new instance
-
returning
Create generic return type from meta type.- Type Parameters:
T
-- Parameters:
type
-- Returns:
- new instance
-