All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.qt.widgets.QSystemTrayIcon Maven / Gradle / Ivy

There is a newer version: 6.8.0
Show newest version
package io.qt.widgets;

import io.qt.*;


/**
 * 

Icon for an application in the system tray

*

Java wrapper for Qt class QSystemTrayIcon

*/ public class QSystemTrayIcon extends io.qt.core.QObject { static { QtJambi_LibraryUtilities.initialize(); } @QtPropertyMember(enabled=false) private Object __rcContextMenu = null; /** * This variable stores the meta-object for the class. */ public static final io.qt.core.@NonNull QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QSystemTrayIcon.class); /** *

Java wrapper for Qt enum QSystemTrayIcon::ActivationReason

*/ @QtUnlistedEnum public enum ActivationReason implements QtEnumerator { /** *

Representing QSystemTrayIcon::Unknown

*/ Unknown(0), /** *

Representing QSystemTrayIcon::Context

*/ Context(1), /** *

Representing QSystemTrayIcon::DoubleClick

*/ DoubleClick(2), /** *

Representing QSystemTrayIcon::Trigger

*/ Trigger(3), /** *

Representing QSystemTrayIcon::MiddleClick

*/ MiddleClick(4); static { QtJambi_LibraryUtilities.initialize(); } private ActivationReason(int value) { this.value = value; } /** * {@inheritDoc} */ public int value() { return value; } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static @NonNull ActivationReason resolve(int value) { switch (value) { case 0: return Unknown; case 1: return Context; case 2: return DoubleClick; case 3: return Trigger; case 4: return MiddleClick; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** *

Java wrapper for Qt enum QSystemTrayIcon::MessageIcon

*/ @QtUnlistedEnum public enum MessageIcon implements QtEnumerator { /** *

Representing QSystemTrayIcon::NoIcon

*/ NoIcon(0), /** *

Representing QSystemTrayIcon::Information

*/ Information(1), /** *

Representing QSystemTrayIcon::Warning

*/ Warning(2), /** *

Representing QSystemTrayIcon::Critical

*/ Critical(3); static { QtJambi_LibraryUtilities.initialize(); } private MessageIcon(int value) { this.value = value; } /** * {@inheritDoc} */ public int value() { return value; } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static @NonNull MessageIcon resolve(int value) { switch (value) { case 0: return NoIcon; case 1: return Information; case 2: return Warning; case 3: return Critical; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** *

See QSystemTrayIcon::activated(QSystemTrayIcon::ActivationReason)

*/ public final @NonNull Signal1 activated = new Signal1<>(); /** *

See QSystemTrayIcon::messageClicked()

*/ public final @NonNull Signal0 messageClicked = new Signal0(); /** *

See QSystemTrayIcon::QSystemTrayIcon(QIcon,QObject*)

*/ public QSystemTrayIcon(io.qt.gui.@NonNull QIcon icon, io.qt.core.@Nullable QObject parent){ super((QPrivateConstructor)null); initialize_native(this, icon, parent); } private native static void initialize_native(QSystemTrayIcon instance, io.qt.gui.QIcon icon, io.qt.core.QObject parent); /** *

See QSystemTrayIcon::QSystemTrayIcon(QObject*)

*/ public QSystemTrayIcon(io.qt.core.@Nullable QObject parent){ super((QPrivateConstructor)null); initialize_native(this, parent); } private native static void initialize_native(QSystemTrayIcon instance, io.qt.core.QObject parent); /** *

See QSystemTrayIcon::contextMenu()const

*/ @QtUninvokable public final io.qt.widgets.@Nullable QMenu contextMenu(){ return contextMenu_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.widgets.QMenu contextMenu_native_constfct(long __this__nativeId); /** *

See QSystemTrayIcon::geometry()const

*/ @QtUninvokable public final io.qt.core.@NonNull QRect geometry(){ return geometry_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QRect geometry_native_constfct(long __this__nativeId); /** *

See QSystemTrayIcon::hide()

*/ public final void hide(){ hide_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } private native void hide_native(long __this__nativeId); /** *

See QSystemTrayIcon::icon()const

*/ @QtPropertyReader(name="icon") @QtUninvokable public final io.qt.gui.@NonNull QIcon icon(){ return icon_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.gui.QIcon icon_native_constfct(long __this__nativeId); /** *

See QSystemTrayIcon::isVisible()const

*/ @QtPropertyReader(name="visible") @QtPropertyDesignable("false") @QtUninvokable public final boolean isVisible(){ return isVisible_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isVisible_native_constfct(long __this__nativeId); /** *

See QSystemTrayIcon::setContextMenu(QMenu*)

*/ @QtUninvokable public final void setContextMenu(io.qt.widgets.@Nullable QMenu menu){ setContextMenu_native_QMenu_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(menu)); __rcContextMenu = menu; } @QtUninvokable private native void setContextMenu_native_QMenu_ptr(long __this__nativeId, long menu); /** *

See QSystemTrayIcon::setIcon(QIcon)

*/ @QtPropertyWriter(name="icon") @QtUninvokable public final void setIcon(io.qt.gui.@NonNull QIcon icon){ setIcon_native_cref_QIcon(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(icon)); } @QtUninvokable private native void setIcon_native_cref_QIcon(long __this__nativeId, long icon); /** *

See QSystemTrayIcon::setToolTip(QString)

*/ @QtPropertyWriter(name="toolTip") @QtUninvokable public final void setToolTip(java.lang.@NonNull String tip){ setToolTip_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), tip); } @QtUninvokable private native void setToolTip_native_cref_QString(long __this__nativeId, java.lang.String tip); /** *

See QSystemTrayIcon::setVisible(bool)

*/ @QtPropertyWriter(name="visible") public final void setVisible(boolean visible){ setVisible_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), visible); } private native void setVisible_native_bool(long __this__nativeId, boolean visible); /** *

See QSystemTrayIcon::show()

*/ public final void show(){ show_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } private native void show_native(long __this__nativeId); /** *

See QSystemTrayIcon::showMessage(QString,QString,QIcon,int)

*/ public final void showMessage(java.lang.@NonNull String title, java.lang.@NonNull String msg, io.qt.gui.@NonNull QIcon icon, int msecs){ showMessage_native_cref_QString_cref_QString_cref_QIcon_int(QtJambi_LibraryUtilities.internal.nativeId(this), title, msg, QtJambi_LibraryUtilities.internal.checkedNativeId(icon), msecs); } private native void showMessage_native_cref_QString_cref_QString_cref_QIcon_int(long __this__nativeId, java.lang.String title, java.lang.String msg, long icon, int msecs); /** *

See QSystemTrayIcon::showMessage(QString,QString,QSystemTrayIcon::MessageIcon,int)

*/ public final void showMessage(java.lang.@NonNull String title, java.lang.@NonNull String msg, io.qt.widgets.QSystemTrayIcon.@NonNull MessageIcon icon, int msecs){ showMessage_native_cref_QString_cref_QString_QSystemTrayIcon_MessageIcon_int(QtJambi_LibraryUtilities.internal.nativeId(this), title, msg, icon.value(), msecs); } private native void showMessage_native_cref_QString_cref_QString_QSystemTrayIcon_MessageIcon_int(long __this__nativeId, java.lang.String title, java.lang.String msg, int icon, int msecs); /** *

See QSystemTrayIcon::toolTip()const

*/ @QtPropertyReader(name="toolTip") @QtUninvokable public final java.lang.@NonNull String toolTip(){ return toolTip_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native java.lang.String toolTip_native_constfct(long __this__nativeId); /** *

See QObject::event(QEvent*)

*/ @QtUninvokable @Override public boolean event(io.qt.core.@Nullable QEvent event){ return event_native_QEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(event)); } @QtUninvokable private native boolean event_native_QEvent_ptr(long __this__nativeId, long event); /** *

See QSystemTrayIcon::isSystemTrayAvailable()

*/ public native static boolean isSystemTrayAvailable(); /** *

See QSystemTrayIcon::supportsMessages()

*/ public native static boolean supportsMessages(); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QSystemTrayIcon(QPrivateConstructor p) { super(p); } /** * Constructor for internal use only. * It is not allowed to call the declarative constructor from inside Java. * @hidden */ @NativeAccess protected QSystemTrayIcon(QDeclarativeConstructor constructor) { super((QPrivateConstructor)null); initialize_native(this, constructor); } @QtUninvokable private static native void initialize_native(QSystemTrayIcon instance, QDeclarativeConstructor constructor); /** *

Overloaded constructor for {@link #QSystemTrayIcon(io.qt.gui.QIcon, io.qt.core.QObject)} * with parent = null.

*/ public QSystemTrayIcon(io.qt.gui.@NonNull QIcon icon) { this(icon, (io.qt.core.QObject)null); } /** *

Overloaded constructor for {@link #QSystemTrayIcon(io.qt.gui.QPixmap, io.qt.core.QObject)} * with parent = null.

*/ public QSystemTrayIcon(io.qt.gui.@NonNull QPixmap icon) { this(icon, (io.qt.core.QObject)null); } /** *

Overloaded constructor for {@link #QSystemTrayIcon(io.qt.gui.QIcon, io.qt.core.QObject)}.

*/ public QSystemTrayIcon(io.qt.gui.@NonNull QPixmap icon, io.qt.core.@Nullable QObject parent) { this(new io.qt.gui.QIcon(icon), parent); } /** *

Overloaded constructor for {@link #QSystemTrayIcon(io.qt.core.QObject)} * with parent = null.

*/ public QSystemTrayIcon() { this((io.qt.core.QObject)null); } /** * @hidden *

Kotlin property getter. In Java use {@link #icon()} instead.

*/ @QtPropertyReader(enabled=false) @QtUninvokable public final io.qt.gui.@NonNull QIcon getIcon() { return icon(); } /** * @hidden *

Kotlin property getter. In Java use {@link #isVisible()} instead.

*/ @QtPropertyReader(enabled=false) @QtUninvokable public final boolean getVisible() { return isVisible(); } /** *

Overloaded function for {@link #setIcon(io.qt.gui.QIcon)}.

*/ @QtUninvokable public final void setIcon(io.qt.gui.@NonNull QPixmap icon) { setIcon(new io.qt.gui.QIcon(icon)); } /** *

Overloaded function for {@link #showMessage(java.lang.String, java.lang.String, io.qt.gui.QIcon, int)} * with msecs = 10000.

*/ public final void showMessage(java.lang.@NonNull String title, java.lang.@NonNull String msg, io.qt.gui.@NonNull QIcon icon) { showMessage(title, msg, icon, (int)10000); } /** *

Overloaded function for {@link #showMessage(java.lang.String, java.lang.String, io.qt.gui.QPixmap, int)} * with msecs = 10000.

*/ public final void showMessage(java.lang.@NonNull String title, java.lang.@NonNull String msg, io.qt.gui.@NonNull QPixmap icon) { showMessage(title, msg, icon, (int)10000); } /** *

Overloaded function for {@link #showMessage(java.lang.String, java.lang.String, io.qt.gui.QIcon, int)}.

*/ public final void showMessage(java.lang.@NonNull String title, java.lang.@NonNull String msg, io.qt.gui.@NonNull QPixmap icon, int msecs) { showMessage(title, msg, new io.qt.gui.QIcon(icon), msecs); } /** *

Overloaded function for {@link #showMessage(java.lang.String, java.lang.String, io.qt.widgets.QSystemTrayIcon.MessageIcon, int)} * with msecs = 10000.

*/ public final void showMessage(java.lang.@NonNull String title, java.lang.@NonNull String msg, io.qt.widgets.QSystemTrayIcon.@NonNull MessageIcon icon) { showMessage(title, msg, icon, (int)10000); } /** *

Overloaded function for {@link #showMessage(java.lang.String, java.lang.String, io.qt.widgets.QSystemTrayIcon.MessageIcon, int)}

*

with:

    *
  • icon = io.qt.widgets.QSystemTrayIcon.MessageIcon.Information
  • *
  • msecs = 10000
  • *
*/ public final void showMessage(java.lang.@NonNull String title, java.lang.@NonNull String msg) { showMessage(title, msg, io.qt.widgets.QSystemTrayIcon.MessageIcon.Information, (int)10000); } /** * @hidden *

Kotlin property getter. In Java use {@link #toolTip()} instead.

*/ @QtPropertyReader(enabled=false) @QtUninvokable public final java.lang.@NonNull String getToolTip() { return toolTip(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy