io.qt.widgets.QApplication Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.widgets;
import io.qt.*;
/**
* Manages the GUI application's control flow and main settings
* Java wrapper for Qt class QApplication
*/
public class QApplication extends io.qt.gui.QGuiApplication
{
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(QApplication.class);
/**
* See QApplication:: focusChanged(QWidget*, QWidget*)
*/
public final @NonNull Signal2 focusChanged = new Signal2<>();
/**
* See QApplication:: QApplication(int&, char**, int)
*/
protected QApplication(java.lang.@Nullable String @Nullable[] argv){
super((QPrivateConstructor)null);
initialize_native(this, argv);
}
private native static void initialize_native(QApplication instance, java.lang.String[] argv);
/**
* See QApplication:: autoSipEnabled()const
*/
@QtPropertyReader(name="autoSipEnabled")
@QtUninvokable
public final boolean autoSipEnabled(){
return autoSipEnabled_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean autoSipEnabled_native_constfct(long __this__nativeId);
/**
* See QCoreApplication:: resolveInterface(const char*, int)const
*/
@QtUninvokable
private final QNativeInterface resolveInterface(java.lang.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 QApplication:: setAutoSipEnabled(bool)
*/
@QtPropertyWriter(name="autoSipEnabled")
public final void setAutoSipEnabled(boolean enabled){
setAutoSipEnabled_native_const_bool(QtJambi_LibraryUtilities.internal.nativeId(this), enabled);
}
private native void setAutoSipEnabled_native_const_bool(long __this__nativeId, boolean enabled);
/**
* See QApplication:: setStyleSheet(QString)
*/
@QtPropertyWriter(name="styleSheet")
public final void setStyleSheet(java.lang.@NonNull String sheet){
setStyleSheet_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), sheet);
}
private native void setStyleSheet_native_cref_QString(long __this__nativeId, java.lang.String sheet);
/**
* See QApplication:: styleSheet()const
*/
@QtPropertyReader(name="styleSheet")
@QtUninvokable
public final java.lang.@NonNull String styleSheet(){
return styleSheet_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String styleSheet_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
@Override
public boolean event(io.qt.core.@Nullable QEvent arg__1){
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);
/**
*
*/
public native static void aboutQt();
/**
* See QApplication:: activeModalWidget()
*/
public native static io.qt.widgets.@Nullable QWidget activeModalWidget();
/**
* See QApplication:: activePopupWidget()
*/
public native static io.qt.widgets.@Nullable QWidget activePopupWidget();
/**
* See QApplication:: activeWindow()
*/
public native static io.qt.widgets.@Nullable QWidget activeWindow();
/**
* See QApplication:: alert(QWidget*, int)
*/
public static void alert(io.qt.widgets.@Nullable QWidget widget, int duration){
alert_native_QWidget_ptr_int(QtJambi_LibraryUtilities.internal.checkedNativeId(widget), duration);
}
private native static void alert_native_QWidget_ptr_int(long widget, int duration);
/**
* See QApplication:: allWidgets()
*/
public native static io.qt.core.@NonNull QList allWidgets();
/**
*
*/
public native static void beep();
/**
* See QApplication:: closeAllWindows()
*/
public native static void closeAllWindows();
/**
* See QApplication:: cursorFlashTime()
*/
@QtPropertyReader(name="cursorFlashTime")
public native static int cursorFlashTime();
/**
* See QApplication:: doubleClickInterval()
*/
@QtPropertyReader(name="doubleClickInterval")
public native static int doubleClickInterval();
/**
*
*/
public native static int exec();
/**
* See QApplication:: focusWidget()
*/
public native static io.qt.widgets.@Nullable QWidget focusWidget();
/**
*
*/
public native static io.qt.gui.@NonNull QFont font();
/**
* See QApplication:: font(const QWidget*)
*/
public static io.qt.gui.@NonNull QFont font(io.qt.widgets.@Nullable QWidget arg__1){
return font_native_const_QWidget_ptr(QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
private native static io.qt.gui.QFont font_native_const_QWidget_ptr(long arg__1);
/**
* See QApplication:: font(const char*)
*/
public native static io.qt.gui.@NonNull QFont font(java.lang.@Nullable String className);
/**
* See QApplication:: fontMetrics()
*/
public native static io.qt.gui.@NonNull QFontMetrics fontMetrics();
/**
* See QApplication:: isEffectEnabled(Qt::UIEffect)
*/
public static boolean isEffectEnabled(io.qt.core.Qt.@NonNull UIEffect arg__1){
return isEffectEnabled_native_Qt_UIEffect(arg__1.value());
}
private native static boolean isEffectEnabled_native_Qt_UIEffect(int arg__1);
/**
* See QApplication:: keyboardInputInterval()
*/
@QtPropertyReader(name="keyboardInputInterval")
public native static int keyboardInputInterval();
/**
* See QApplication:: navigationMode()
*/
public static io.qt.core.Qt.@NonNull NavigationMode navigationMode(){
return io.qt.core.Qt.NavigationMode.resolve(navigationMode_native());
}
private native static int navigationMode_native();
/**
* See QApplication:: palette(const QWidget*)
*/
public static io.qt.gui.@NonNull QPalette palette(io.qt.widgets.@Nullable QWidget arg__1){
return palette_native_const_QWidget_ptr(QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
private native static io.qt.gui.QPalette palette_native_const_QWidget_ptr(long arg__1);
/**
* See QApplication:: palette(const char*)
*/
public native static io.qt.gui.@NonNull QPalette palette(java.lang.@Nullable String className);
/**
* See QApplication:: setActiveWindow(QWidget*)
*/
public static void setActiveWindow(io.qt.widgets.@Nullable QWidget act){
setActiveWindow_native_QWidget_ptr(QtJambi_LibraryUtilities.internal.checkedNativeId(act));
}
private native static void setActiveWindow_native_QWidget_ptr(long act);
/**
* See QApplication:: setCursorFlashTime(int)
*/
@QtPropertyWriter(name="cursorFlashTime")
public native static void setCursorFlashTime(int arg__1);
/**
* See QApplication:: setDoubleClickInterval(int)
*/
@QtPropertyWriter(name="doubleClickInterval")
public native static void setDoubleClickInterval(int arg__1);
/**
* See QApplication:: setEffectEnabled(Qt::UIEffect, bool)
*/
public static void setEffectEnabled(io.qt.core.Qt.@NonNull UIEffect arg__1, boolean enable){
setEffectEnabled_native_Qt_UIEffect_bool(arg__1.value(), enable);
}
private native static void setEffectEnabled_native_Qt_UIEffect_bool(int arg__1, boolean enable);
/**
* See QApplication:: setFont(QFont, const char*)
*/
public static void setFont(io.qt.gui.@NonNull QFont arg__1, java.lang.@Nullable String className){
setFont_native_cref_QFont_const_char_ptr(QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1), className);
}
private native static void setFont_native_cref_QFont_const_char_ptr(long arg__1, java.lang.String className);
/**
* See QApplication:: setKeyboardInputInterval(int)
*/
@QtPropertyWriter(name="keyboardInputInterval")
public native static void setKeyboardInputInterval(int arg__1);
/**
* See QApplication:: setNavigationMode(Qt::NavigationMode)
*/
public static void setNavigationMode(io.qt.core.Qt.@NonNull NavigationMode mode){
setNavigationMode_native_Qt_NavigationMode(mode.value());
}
private native static void setNavigationMode_native_Qt_NavigationMode(int mode);
/**
* See QApplication:: setPalette(QPalette, const char*)
*/
public static void setPalette(io.qt.gui.@NonNull QPalette arg__1, java.lang.@Nullable String className){
setPalette_native_cref_QPalette_const_char_ptr(QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1), className);
}
private native static void setPalette_native_cref_QPalette_const_char_ptr(long arg__1, java.lang.String className);
/**
* See QApplication:: setStartDragDistance(int)
*/
@QtPropertyWriter(name="startDragDistance")
public native static void setStartDragDistance(int l);
/**
* See QApplication:: setStartDragTime(int)
*/
@QtPropertyWriter(name="startDragTime")
public native static void setStartDragTime(int ms);
/**
* See QApplication:: setStyle(QString)
*/
public native static io.qt.widgets.@Nullable QStyle setStyle(java.lang.@NonNull String arg__1);
/**
* See QApplication:: setStyle(QStyle*)
*/
public static void setStyle(io.qt.widgets.@Nullable QStyle arg__1){
setStyle_native_QStyle_ptr(QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
private native static void setStyle_native_QStyle_ptr(long arg__1);
/**
* See QApplication:: setWheelScrollLines(int)
*/
@QtPropertyWriter(name="wheelScrollLines")
public native static void setWheelScrollLines(int arg__1);
/**
* See QApplication:: startDragDistance()
*/
@QtPropertyReader(name="startDragDistance")
public native static int startDragDistance();
/**
* See QApplication:: startDragTime()
*/
@QtPropertyReader(name="startDragTime")
public native static int startDragTime();
/**
*
*/
public native static io.qt.widgets.@Nullable QStyle style();
/**
* See QApplication:: topLevelAt(QPoint)
*/
public static io.qt.widgets.@Nullable QWidget topLevelWidgetAt(io.qt.core.@NonNull QPoint p){
return topLevelWidgetAt_native_cref_QPoint(QtJambi_LibraryUtilities.internal.checkedNativeId(p));
}
private native static io.qt.widgets.QWidget topLevelWidgetAt_native_cref_QPoint(long p);
/**
* See QApplication:: topLevelAt(int, int)
*/
public native static io.qt.widgets.@Nullable QWidget topLevelWidgetAt(int x, int y);
/**
* See QApplication:: topLevelWidgets()
*/
public native static io.qt.core.@NonNull QList topLevelWidgets();
/**
* See QApplication:: wheelScrollLines()
*/
@QtPropertyReader(name="wheelScrollLines")
public native static int wheelScrollLines();
/**
* See QApplication:: widgetAt(QPoint)
*/
public static io.qt.widgets.@Nullable QWidget widgetAt(io.qt.core.@NonNull QPoint p){
return widgetAt_native_cref_QPoint(QtJambi_LibraryUtilities.internal.checkedNativeId(p));
}
private native static io.qt.widgets.QWidget widgetAt_native_cref_QPoint(long p);
/**
* See QApplication:: widgetAt(int, int)
*/
public native static io.qt.widgets.@Nullable QWidget widgetAt(int x, int y);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QApplication(QPrivateConstructor p) { super(p); }
public static @NonNull QApplication initialize(String args @StrictNonNull[]) {
return io.qt.core.QCoreApplication.initialize(null, args, QApplication::new);
}
public static @NonNull QApplication initialize(String applicationName, String args @StrictNonNull[]) {
return io.qt.core.QCoreApplication.initialize(applicationName, args, QApplication::new);
}
public static void shutdown() {
io.qt.core.QCoreApplication.shutdown();
}
public static @Nullable QApplication instance() {
io.qt.core.QCoreApplication app = io.qt.core.QCoreApplication.instance();
if (app instanceof QApplication)
return (QApplication) app;
return null;
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #autoSipEnabled()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final boolean getAutoSipEnabled() {
return autoSipEnabled();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #styleSheet()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final java.lang.@NonNull String getStyleSheet() {
return styleSheet();
}
/**
* Overloaded function for {@link #alert(io.qt.widgets.QWidget, int)}
* with duration = 0
.
*/
public static void alert(io.qt.widgets.@Nullable QWidget widget) {
alert(widget, (int)0);
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #cursorFlashTime()} instead.
*/
@QtPropertyReader(enabled=false)
public static int getCursorFlashTime() {
return cursorFlashTime();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #doubleClickInterval()} instead.
*/
@QtPropertyReader(enabled=false)
public static int getDoubleClickInterval() {
return doubleClickInterval();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #keyboardInputInterval()} instead.
*/
@QtPropertyReader(enabled=false)
public static int getKeyboardInputInterval() {
return keyboardInputInterval();
}
/**
* Overloaded function for {@link #setEffectEnabled(io.qt.core.Qt.UIEffect, boolean)}
* with enable = true
.
*/
public static void setEffectEnabled(io.qt.core.Qt.@NonNull UIEffect arg__1) {
setEffectEnabled(arg__1, (boolean)true);
}
/**
* Overloaded function for {@link #setFont(io.qt.gui.QFont, java.lang.String)}.
*/
public static void setFont(java.lang.@NonNull String arg__1, java.lang.@Nullable String className) {
setFont(new io.qt.gui.QFont(arg__1), className);
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #startDragDistance()} instead.
*/
@QtPropertyReader(enabled=false)
public static int getStartDragDistance() {
return startDragDistance();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #startDragTime()} instead.
*/
@QtPropertyReader(enabled=false)
public static int getStartDragTime() {
return startDragTime();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #wheelScrollLines()} instead.
*/
@QtPropertyReader(enabled=false)
public static int getWheelScrollLines() {
return wheelScrollLines();
}
}