io.qt.gui.QGuiApplication Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.gui;
import io.qt.*;
/**
* Manages the GUI application's control flow and main settings
* Java wrapper for Qt class QGuiApplication
*/
public class QGuiApplication extends io.qt.core.QCoreApplication
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* This variable stores the meta-object for the class.
*/
public static final io.qt.core.@NonNull QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QGuiApplication.class);
/**
* See QGuiApplication:: applicationDisplayNameChanged()
*/
@QtPropertyNotify(name="applicationDisplayName")
public final @NonNull Signal0 applicationDisplayNameChanged = new Signal0();
/**
* See QGuiApplication:: applicationStateChanged(Qt::ApplicationState)
*/
public final @NonNull Signal1 applicationStateChanged = new Signal1<>();
/**
* See QGuiApplication:: commitDataRequest(QSessionManager&)
*/
public final @NonNull Signal1 commitDataRequest = new Signal1<>();
/**
* See QGuiApplication:: focusObjectChanged(QObject*)
*/
public final @NonNull Signal1 focusObjectChanged = new Signal1<>();
/**
* See QGuiApplication:: focusWindowChanged(QWindow*)
*/
public final @NonNull Signal1 focusWindowChanged = new Signal1<>();
/**
* See QGuiApplication:: fontChanged(QFont)
*/
public final @NonNull Signal1 fontChanged = new Signal1<>();
/**
* See QGuiApplication:: fontDatabaseChanged()
*/
public final @NonNull Signal0 fontDatabaseChanged = new Signal0();
/**
* See QGuiApplication:: lastWindowClosed()
*/
public final @NonNull Signal0 lastWindowClosed = new Signal0();
/**
* See QGuiApplication:: layoutDirectionChanged(Qt::LayoutDirection)
*/
@QtPropertyNotify(name="layoutDirection")
public final @NonNull Signal1 layoutDirectionChanged = new Signal1<>();
/**
* See QGuiApplication:: paletteChanged(QPalette)
*/
public final @NonNull Signal1 paletteChanged = new Signal1<>();
/**
* See QGuiApplication:: primaryScreenChanged(QScreen*)
*/
@QtPropertyNotify(name="primaryScreen")
public final @NonNull Signal1 primaryScreenChanged = new Signal1<>();
/**
* See QGuiApplication:: saveStateRequest(QSessionManager&)
*/
public final @NonNull Signal1 saveStateRequest = new Signal1<>();
/**
* See QGuiApplication:: screenAdded(QScreen*)
*/
public final @NonNull Signal1 screenAdded = new Signal1<>();
/**
* See QGuiApplication:: screenRemoved(QScreen*)
*/
public final @NonNull Signal1 screenRemoved = new Signal1<>();
/**
* See QGuiApplication:: QGuiApplication(int&, char**, int)
*/
protected QGuiApplication(java.lang.String[] argv){
super((QPrivateConstructor)null);
initialize_native(this, argv);
}
private native static void initialize_native(QGuiApplication instance, java.lang.String[] argv);
/**
* See QGuiApplication:: devicePixelRatio()const
*/
@QtUninvokable
public final double devicePixelRatio(){
return devicePixelRatio_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native double devicePixelRatio_native_constfct(long __this__nativeId);
/**
* See QGuiApplication:: isSavingSession()const
*/
@QtUninvokable
public final boolean isSavingSession(){
return isSavingSession_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean isSavingSession_native_constfct(long __this__nativeId);
/**
* See QGuiApplication:: isSessionRestored()const
*/
@QtUninvokable
public final boolean isSessionRestored(){
return isSessionRestored_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean isSessionRestored_native_constfct(long __this__nativeId);
/**
* See QCoreApplication:: resolveInterface(const char*, int)const
*/
@QtUninvokable
private final QNativeInterface resolveInterface(java.lang.@NonNull Class name){
return resolveInterface_native_const_char_ptr_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), name);
}
@QtUninvokable
private native QNativeInterface resolveInterface_native_const_char_ptr_int_constfct(long __this__nativeId, java.lang.Class name);
/**
* See QGuiApplication:: sessionId()const
*/
@QtUninvokable
public final java.lang.@NonNull String sessionId(){
return sessionId_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String sessionId_native_constfct(long __this__nativeId);
/**
* See QGuiApplication:: sessionKey()const
*/
@QtUninvokable
public final java.lang.@NonNull String sessionKey(){
return sessionKey_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String sessionKey_native_constfct(long __this__nativeId);
/**
* See QGuiApplication:: setBadgeNumber(qint64)
* This function was introduced in Qt 6.5.
*/
public final void setBadgeNumber(long number){
setBadgeNumber_native_qint64(QtJambi_LibraryUtilities.internal.nativeId(this), number);
}
private native void setBadgeNumber_native_qint64(long __this__nativeId, long number);
/**
*
*/
@QtUninvokable
@Override
public boolean event(io.qt.core.@Nullable QEvent arg__1){
java.util.Objects.requireNonNull(arg__1, "Argument 'arg__1': null not expected.");
return event_native_QEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@QtUninvokable
private native boolean event_native_QEvent_ptr(long __this__nativeId, long arg__1);
/**
* See QCoreApplication:: notify(QObject*, QEvent*)
*/
@QtUninvokable
@Override
public boolean notify(io.qt.core.@Nullable QObject arg__1, io.qt.core.@Nullable QEvent arg__2){
return notify_native_QObject_ptr_QEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__2));
}
@QtUninvokable
private native boolean notify_native_QObject_ptr_QEvent_ptr(long __this__nativeId, long arg__1, long arg__2);
/**
* See QGuiApplication:: allWindows()
*/
public native static io.qt.core.@NonNull QList allWindows();
/**
* See QGuiApplication:: applicationDisplayName()
*/
@QtPropertyReader(name="applicationDisplayName")
public native static java.lang.@NonNull String applicationDisplayName();
/**
* See QGuiApplication:: applicationState()
*/
public static io.qt.core.Qt.@NonNull ApplicationState applicationState(){
return io.qt.core.Qt.ApplicationState.resolve(applicationState_native());
}
private native static int applicationState_native();
/**
* See QGuiApplication:: changeOverrideCursor(QCursor)
*/
public static void changeOverrideCursor(io.qt.gui.@NonNull QCursor arg__1){
changeOverrideCursor_native_cref_QCursor(QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
private native static void changeOverrideCursor_native_cref_QCursor(long arg__1);
/**
* See QGuiApplication:: clipboard()
*/
public native static io.qt.gui.@Nullable QClipboard clipboard();
/**
* See QGuiApplication:: desktopFileName()
*/
@QtPropertyReader(name="desktopFileName")
public native static java.lang.@NonNull String desktopFileName();
/**
* See QGuiApplication:: desktopSettingsAware()
*/
public native static boolean desktopSettingsAware();
/**
*
*/
public native static int exec();
/**
* See QGuiApplication:: focusObject()
*/
public native static io.qt.core.@Nullable QObject focusObject();
/**
* See QGuiApplication:: focusWindow()
*/
public native static io.qt.gui.@Nullable QWindow focusWindow();
/**
*
*/
public native static io.qt.gui.@NonNull QFont font();
/**
* See QGuiApplication:: highDpiScaleFactorRoundingPolicy()
*/
public static io.qt.core.Qt.@NonNull HighDpiScaleFactorRoundingPolicy highDpiScaleFactorRoundingPolicy(){
return io.qt.core.Qt.HighDpiScaleFactorRoundingPolicy.resolve(highDpiScaleFactorRoundingPolicy_native());
}
private native static int highDpiScaleFactorRoundingPolicy_native();
/**
* See QGuiApplication:: inputMethod()
*/
public native static io.qt.gui.@Nullable QInputMethod inputMethod();
/**
* See QGuiApplication:: isLeftToRight()
*/
public native static boolean isLeftToRight();
/**
* See QGuiApplication:: isRightToLeft()
*/
public native static boolean isRightToLeft();
/**
* See QGuiApplication:: keyboardModifiers()
*/
public static io.qt.core.Qt.@NonNull KeyboardModifiers keyboardModifiers(){
return new io.qt.core.Qt.KeyboardModifiers(keyboardModifiers_native());
}
private native static int keyboardModifiers_native();
/**
* See QGuiApplication:: layoutDirection()
*/
@QtPropertyReader(name="layoutDirection")
public static io.qt.core.Qt.@NonNull LayoutDirection layoutDirection(){
return io.qt.core.Qt.LayoutDirection.resolve(layoutDirection_native());
}
private native static int layoutDirection_native();
/**
* See QGuiApplication:: modalWindow()
*/
public native static io.qt.gui.@Nullable QWindow modalWindow();
/**
* See QGuiApplication:: mouseButtons()
*/
public static io.qt.core.Qt.@NonNull MouseButtons mouseButtons(){
return new io.qt.core.Qt.MouseButtons(mouseButtons_native());
}
private native static int mouseButtons_native();
/**
* See QGuiApplication:: overrideCursor()
*/
public native static io.qt.gui.@Nullable QCursor overrideCursor();
/**
* See QGuiApplication:: palette()
*/
public native static io.qt.gui.@NonNull QPalette palette();
/**
* See QGuiApplication:: platformFunction(QByteArray)
*/
public static io.qt.core.@Nullable QFunctionPointer platformFunction(io.qt.core.@NonNull QByteArray function){
return platformFunction_native_cref_QByteArray(QtJambi_LibraryUtilities.internal.checkedNativeId(function));
}
private native static io.qt.core.QFunctionPointer platformFunction_native_cref_QByteArray(long function);
/**
* See QGuiApplication:: platformName()
*/
@QtPropertyReader(name="platformName")
@QtPropertyStored("false")
@QtPropertyConstant
public native static java.lang.@NonNull String platformName();
/**
* See QGuiApplication:: primaryScreen()
*/
@QtPropertyReader(name="primaryScreen")
@QtPropertyStored("false")
public native static io.qt.gui.@Nullable QScreen primaryScreen();
/**
* See QGuiApplication:: queryKeyboardModifiers()
*/
public static io.qt.core.Qt.@NonNull KeyboardModifiers queryKeyboardModifiers(){
return new io.qt.core.Qt.KeyboardModifiers(queryKeyboardModifiers_native());
}
private native static int queryKeyboardModifiers_native();
/**
* See QGuiApplication:: quitOnLastWindowClosed()
*/
@QtPropertyReader(name="quitOnLastWindowClosed")
public native static boolean quitOnLastWindowClosed();
/**
* See QGuiApplication:: restoreOverrideCursor()
*/
public native static void restoreOverrideCursor();
/**
* See QGuiApplication:: screenAt(QPoint)
*/
public static io.qt.gui.@Nullable QScreen screenAt(io.qt.core.@NonNull QPoint point){
return screenAt_native_cref_QPoint(QtJambi_LibraryUtilities.internal.checkedNativeId(point));
}
private native static io.qt.gui.QScreen screenAt_native_cref_QPoint(long point);
/**
* See QGuiApplication:: screens()
*/
public native static io.qt.core.@NonNull QList screens();
/**
* See QGuiApplication:: setApplicationDisplayName(QString)
*/
@QtPropertyWriter(name="applicationDisplayName")
public native static void setApplicationDisplayName(java.lang.@NonNull String name);
/**
* See QGuiApplication:: setDesktopFileName(QString)
*/
@QtPropertyWriter(name="desktopFileName")
public native static void setDesktopFileName(java.lang.@NonNull String name);
/**
* See QGuiApplication:: setDesktopSettingsAware(bool)
*/
public native static void setDesktopSettingsAware(boolean on);
/**
* See QGuiApplication:: setFont(QFont)
*/
public static void setFont(io.qt.gui.@NonNull QFont arg__1){
setFont_native_cref_QFont(QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
private native static void setFont_native_cref_QFont(long arg__1);
/**
* See QGuiApplication:: setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy)
*/
public static void setHighDpiScaleFactorRoundingPolicy(io.qt.core.Qt.@NonNull HighDpiScaleFactorRoundingPolicy policy){
setHighDpiScaleFactorRoundingPolicy_native_Qt_HighDpiScaleFactorRoundingPolicy(policy.value());
}
private native static void setHighDpiScaleFactorRoundingPolicy_native_Qt_HighDpiScaleFactorRoundingPolicy(int policy);
/**
* See QGuiApplication:: setLayoutDirection(Qt::LayoutDirection)
*/
@QtPropertyWriter(name="layoutDirection")
public static void setLayoutDirection(io.qt.core.Qt.@NonNull LayoutDirection direction){
setLayoutDirection_native_Qt_LayoutDirection(direction.value());
}
private native static void setLayoutDirection_native_Qt_LayoutDirection(int direction);
/**
* See QGuiApplication:: setOverrideCursor(QCursor)
*/
public static void setOverrideCursor(io.qt.gui.@NonNull QCursor arg__1){
setOverrideCursor_native_cref_QCursor(QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
private native static void setOverrideCursor_native_cref_QCursor(long arg__1);
/**
* See QGuiApplication:: setPalette(QPalette)
*/
public static void setPalette(io.qt.gui.@NonNull QPalette pal){
setPalette_native_cref_QPalette(QtJambi_LibraryUtilities.internal.checkedNativeId(pal));
}
private native static void setPalette_native_cref_QPalette(long pal);
/**
* See QGuiApplication:: setQuitOnLastWindowClosed(bool)
*/
@QtPropertyWriter(name="quitOnLastWindowClosed")
public native static void setQuitOnLastWindowClosed(boolean quit);
/**
* See QGuiApplication:: setWindowIcon(QIcon)
*/
@QtPropertyWriter(name="windowIcon")
public static void setWindowIcon(io.qt.gui.@NonNull QIcon icon){
setWindowIcon_native_cref_QIcon(QtJambi_LibraryUtilities.internal.checkedNativeId(icon));
}
private native static void setWindowIcon_native_cref_QIcon(long icon);
/**
* See QGuiApplication:: styleHints()
*/
public native static io.qt.gui.@Nullable QStyleHints styleHints();
/**
*
*/
public native static void sync();
/**
* See QGuiApplication:: topLevelAt(QPoint)
*/
public static io.qt.gui.@Nullable QWindow topLevelWindowAt(io.qt.core.@NonNull QPoint pos){
return topLevelWindowAt_native_cref_QPoint(QtJambi_LibraryUtilities.internal.checkedNativeId(pos));
}
private native static io.qt.gui.QWindow topLevelWindowAt_native_cref_QPoint(long pos);
/**
* See QGuiApplication:: topLevelWindows()
*/
public native static io.qt.core.@NonNull QList topLevelWindows();
/**
* See QGuiApplication:: windowIcon()
*/
@QtPropertyReader(name="windowIcon")
public native static io.qt.gui.@NonNull QIcon windowIcon();
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QGuiApplication(QPrivateConstructor p) { super(p); }
public static @NonNull QGuiApplication initialize(String args @StrictNonNull[]) {
return io.qt.core.QCoreApplication.initialize(null, args, QGuiApplication::new);
}
public static @NonNull QGuiApplication initialize(String applicationName, String args @StrictNonNull[]) {
return io.qt.core.QCoreApplication.initialize(applicationName, args, QGuiApplication::new);
}
public static void shutdown() {
io.qt.core.QCoreApplication.shutdown();
}
public static @Nullable QGuiApplication instance() {
io.qt.core.QCoreApplication app = io.qt.core.QCoreApplication.instance();
if (app instanceof QGuiApplication)
return (QGuiApplication) app;
return null;
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #applicationDisplayName()} instead.
*/
@QtPropertyReader(enabled=false)
public static java.lang.@NonNull String getApplicationDisplayName() {
return applicationDisplayName();
}
/**
* Overloaded function for {@link #changeOverrideCursor(io.qt.gui.QCursor)}.
*/
public static void changeOverrideCursor(io.qt.core.Qt.@NonNull CursorShape arg__1) {
changeOverrideCursor(new io.qt.gui.QCursor(arg__1));
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #desktopFileName()} instead.
*/
@QtPropertyReader(enabled=false)
public static java.lang.@NonNull String getDesktopFileName() {
return desktopFileName();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #layoutDirection()} instead.
*/
@QtPropertyReader(enabled=false)
public static io.qt.core.Qt.@NonNull LayoutDirection getLayoutDirection() {
return layoutDirection();
}
/**
* Overloaded function for {@link #platformFunction(io.qt.core.QByteArray)}.
*/
public static io.qt.core.@Nullable QFunctionPointer platformFunction(byte @NonNull[] function) {
return platformFunction(new io.qt.core.QByteArray(function));
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #platformName()} instead.
*/
@QtPropertyReader(enabled=false)
public static java.lang.@NonNull String getPlatformName() {
return platformName();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #primaryScreen()} instead.
*/
@QtPropertyReader(enabled=false)
public static io.qt.gui.@Nullable QScreen getPrimaryScreen() {
return primaryScreen();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #quitOnLastWindowClosed()} instead.
*/
@QtPropertyReader(enabled=false)
public static boolean getQuitOnLastWindowClosed() {
return quitOnLastWindowClosed();
}
/**
* Overloaded function for {@link #setFont(io.qt.gui.QFont)}.
*/
public static void setFont(java.lang.@NonNull String arg__1) {
setFont(new io.qt.gui.QFont(arg__1));
}
/**
* Overloaded function for {@link #setOverrideCursor(io.qt.gui.QCursor)}.
*/
public static void setOverrideCursor(io.qt.core.Qt.@NonNull CursorShape arg__1) {
setOverrideCursor(new io.qt.gui.QCursor(arg__1));
}
/**
* Overloaded function for {@link #setWindowIcon(io.qt.gui.QIcon)}.
*/
public static void setWindowIcon(io.qt.gui.@NonNull QPixmap icon) {
setWindowIcon(new io.qt.gui.QIcon(icon));
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #windowIcon()} instead.
*/
@QtPropertyReader(enabled=false)
public static io.qt.gui.@NonNull QIcon getWindowIcon() {
return windowIcon();
}
}