Module qtjambi
Package io.qt

Class QtUtilities

java.lang.Object
io.qt.QtUtilities

public final class QtUtilities extends Object
This class contains static members that gives information and performs QtJambi related tasks.
  • Method Details

    • isAvailableQtLibrary

      public static boolean isAvailableQtLibrary(String library)
    • isAvailableUtilityLibrary

      public static boolean isAvailableUtilityLibrary(String library)
    • isAvailableUtilityLibrary

      public static boolean isAvailableUtilityLibrary(String library, String versionString)
    • loadQtLibrary

      public static void loadQtLibrary(String library)
    • loadQtLibrary

      public static void loadQtLibrary(String library, QtUtilities.LibraryRequirementMode mode, String... platforms)
    • loadUtilityLibrary

      public static void loadUtilityLibrary(String library)
    • loadUtilityLibrary

      public static void loadUtilityLibrary(String library, QtUtilities.LibraryRequirementMode mode, String... platforms)
    • loadUtilityLibrary

      public static void loadUtilityLibrary(String library, String version)
    • loadUtilityLibrary

      public static void loadUtilityLibrary(String library, String version, QtUtilities.LibraryRequirementMode mode, String... platforms)
    • loadQtJambiLibrary

      public static void loadQtJambiLibrary(String library)
    • loadJambiLibrary

      public static void loadJambiLibrary(String library)
    • loadLibrary

      public static void loadLibrary(String lib)
    • useAsGadget

      public static void useAsGadget(Class<?> clazz)
      Use a class (e.g. from third party library) as gadget.
      See Also:
    • usePackageContentAsGadgets

      public static void usePackageContentAsGadgets(String _package)
      Define a package (e.g. from third party library) to let all its classes considered to be gadgets.
      See Also:
    • jambiDeploymentDir

      public static File jambiDeploymentDir()
    • jambiTempDir

      @Deprecated public static File jambiTempDir()
      Deprecated.
      Returns:
    • initializePackage

      public static boolean initializePackage(String packagePath)
    • initializePackage

      public static boolean initializePackage(Package pkg)
    • initializePackage

      public static boolean initializePackage(Class<?> cls)
    • getSignalOnDispose

      public static QMetaObject.DisposedSignal getSignalOnDispose(QtObjectInterface object)
    • initializeNativeObject

      public static void initializeNativeObject(QtObjectInterface object)
    • initializeNativeObject

      public static void initializeNativeObject(QtObjectInterface object, QtArgument.Stream arguments)
    • putenv

      public static boolean putenv(String varName, String value)
      This function sets the value of the environment variable named varName.
      Parameters:
      varName -
      value -
    • unsetenv

      public static boolean unsetenv(String varName)
      This function deletes the variable varName from the environment.
      Parameters:
      varName -
    • getenv

      public static String getenv(String varName)
      This function gets the value of the environment variable named varName.
      Parameters:
      varName -
      Returns:
      value
    • reinstallEventNotifyCallback

      public static boolean reinstallEventNotifyCallback()
      This method allows to reinstall the QtJambi event notify callback as the last callback. If other libraries register their event notify callback to Qt, it is necessary to make sure QtJambi's callback is called at last. This method can only be called from inside the main thread and before calling QCoreApplication.exec().
    • saveUnixSignalHandlers

      public static boolean saveUnixSignalHandlers()
      Third-party libraries must not overwrite Java's installed signal handlers. Several of these signal handlers are crucial for JVM to work. This method saves the installed signal handlers for later restoring by restoreUnixSignalHandlers().
    • restoreUnixSignalHandlers

      public static boolean restoreUnixSignalHandlers()
      Third-party libraries must not overwrite Java's installed signal handlers. Several of these signal handlers are crucial for JVM to work. This method restores the signal handlers previously saved by saveUnixSignalHandlers().
    • qtjambiVersion

      public static QVersionNumber qtjambiVersion()
      Return the version of QtJambi
      Returns:
      qtjambi version
    • uiThreadCheck

      public static void uiThreadCheck() throws QThreadAffinityException
      Checks if the current thread is UI thread and throws QThreadAffinityException otherwise.
      Throws:
      QThreadAffinityException
    • threadCheck

      public static void threadCheck(QObject object) throws QThreadAffinityException
      Checks if the current thread is the given object's thread and throws QThreadAffinityException otherwise.
      Throws:
      QThreadAffinityException