Module qtjambi
Package io.qt.core

Class QGenericArgument

java.lang.Object
io.qt.core.QGenericArgument
Type Parameters:
T -

public final class QGenericArgument extends Object

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 Details

    • asPointer

      public QGenericArgument asPointer()

      Call value by pointer (e.g. QColor*).

      Returns:
      new instance
    • asRef

      public QGenericArgument asRef()

      Call value or object by reference (e.g. QColor&, QObject&).

      Returns:
      new instance
    • asConstRef

      public QGenericArgument asConstRef()

      Call value or object by const reference (e.g. const QColor&).

      Returns:
      new instance
    • as

      public <T> QGenericArgument as(Class<? super T> classType, QMetaType... instantiations)
      Call java object as specified type.
      Parameters:
      classType -
      instantiations -
      Returns:
      new instance
    • as

      public QGenericArgument as(QMetaType metaType)
      Call java object as specified type.
      Parameters:
      classType -
      instantiations -
      Returns:
      new instance
    • as

      public QGenericArgument as(QMetaType.Type type)
      Call java object as specified type.
      Parameters:
      classType -
      instantiations -
      Returns:
      new instance
    • of

      public static QGenericArgument of(Object value)
      Call java object.
      Parameters:
      value -
      Returns:
      instance
    • defaultOf

      public static QGenericArgument defaultOf(Class<?> classType, QMetaType... instantiations)
      Create generic argument with default value of given type.
      Parameters:
      classType -
      instantiations -
      Returns:
      instance
    • defaultOf

      public static QGenericArgument defaultOf(QMetaType metaType)
      Create generic argument with default value of given type.
      Parameters:
      metaType -
      Returns:
      instance
    • defaultOf

      public static QGenericArgument defaultOf(QMetaType.Type type)
      Create generic argument with default value of given type.
      Parameters:
      type -
      Returns:
      instance
    • returning

      public static <T> QGenericReturnType<T> returning(Class<T> classType, QMetaType... instantiations)
      Create generic return type from class type.
      Parameters:
      classType -
      instantiations - only useful to specify template types like QList<T>.
      Returns:
      new instance
    • returning

      public static <T> QGenericReturnType<T> returning(QMetaType metaType)
      Create generic return type from meta type.
      Parameters:
      metaType -
      Returns:
      new instance
    • returning

      public static <T> QGenericReturnType<T> returning(QMetaType.Type type)
      Create generic return type from meta type.
      Parameters:
      metaType -
      Returns:
      new instance