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

io.qt.gui.QShortcut Maven / Gradle / Ivy

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

import io.qt.*;


/**
 * 

Used to create keyboard shortcuts

*

Java wrapper for Qt class QShortcut

*/ public class QShortcut extends io.qt.core.QObject { 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(QShortcut.class); /** *

See QShortcut::activated()

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

See QShortcut::activatedAmbiguously()

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

See QShortcut::QShortcut(QKeySequence,QObject*,const char*,const char*,Qt::ShortcutContext)

*/ private QShortcut(io.qt.gui.@NonNull QKeySequence key, io.qt.core.@StrictNonNull QObject parent, java.lang.Object member, java.lang.Object ambiguousMember, io.qt.core.Qt.@NonNull ShortcutContext context){ super((QPrivateConstructor)null); java.util.Objects.requireNonNull(parent, "Argument 'parent': null not expected."); initialize_native(this, key, parent, member, ambiguousMember, context); } private native static void initialize_native(QShortcut instance, io.qt.gui.QKeySequence key, io.qt.core.QObject parent, java.lang.Object member, java.lang.Object ambiguousMember, io.qt.core.Qt.ShortcutContext context); /** *

See QShortcut::QShortcut(QKeySequence::StandardKey,QObject*,const char*,const char*,Qt::ShortcutContext)

*/ private QShortcut(io.qt.gui.QKeySequence.@NonNull StandardKey key, io.qt.core.@StrictNonNull QObject parent, java.lang.Object member, java.lang.Object ambiguousMember, io.qt.core.Qt.@NonNull ShortcutContext context){ super((QPrivateConstructor)null); java.util.Objects.requireNonNull(parent, "Argument 'parent': null not expected."); initialize_native(this, key, parent, member, ambiguousMember, context); } private native static void initialize_native(QShortcut instance, io.qt.gui.QKeySequence.StandardKey key, io.qt.core.QObject parent, java.lang.Object member, java.lang.Object ambiguousMember, io.qt.core.Qt.ShortcutContext context); /** *

See QShortcut::QShortcut(QObject*)

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

See QShortcut::autoRepeat()const

*/ @QtPropertyReader(name="autoRepeat") @QtUninvokable public final boolean autoRepeat(){ return autoRepeat_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean autoRepeat_native_constfct(long __this__nativeId); /** *

See QShortcut::context()const

*/ @QtPropertyReader(name="context") @QtUninvokable public final io.qt.core.Qt.@NonNull ShortcutContext context(){ return io.qt.core.Qt.ShortcutContext.resolve(context_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int context_native_constfct(long __this__nativeId); /** *

See QShortcut::id()const

*/ @QtUninvokable public final int id(){ return id_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int id_native_constfct(long __this__nativeId); /** *

See QShortcut::isEnabled()const

*/ @QtPropertyReader(name="enabled") @QtUninvokable public final boolean isEnabled(){ return isEnabled_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isEnabled_native_constfct(long __this__nativeId); /** *

See QShortcut::key()const

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

See QShortcut::keys()const

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

See QShortcut::parentWidget<T>()const

* * @deprecated Use parent() and qobject_cast instead */ @Deprecated @QtUninvokable public final io.qt.widgets.@Nullable QWidget parentWidget(){ return parentWidget_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @Deprecated @QtUninvokable private native io.qt.widgets.@Nullable QWidget parentWidget_native_constfct(long __this__nativeId); /** *

See QShortcut::setAutoRepeat(bool)

*/ @QtPropertyWriter(name="autoRepeat") @QtUninvokable public final void setAutoRepeat(boolean on){ setAutoRepeat_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), on); } @QtUninvokable private native void setAutoRepeat_native_bool(long __this__nativeId, boolean on); /** *

See QShortcut::setContext(Qt::ShortcutContext)

*/ @QtPropertyWriter(name="context") @QtUninvokable public final void setContext(io.qt.core.Qt.@NonNull ShortcutContext context){ setContext_native_Qt_ShortcutContext(QtJambi_LibraryUtilities.internal.nativeId(this), context.value()); } @QtUninvokable private native void setContext_native_Qt_ShortcutContext(long __this__nativeId, int context); /** *

See QShortcut::setEnabled(bool)

*/ @QtPropertyWriter(name="enabled") @QtUninvokable public final void setEnabled(boolean enable){ setEnabled_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), enable); } @QtUninvokable private native void setEnabled_native_bool(long __this__nativeId, boolean enable); /** *

See QShortcut::setKey(QKeySequence)

*/ @QtPropertyWriter(name="key") @QtUninvokable public final void setKey(io.qt.gui.@NonNull QKeySequence key){ setKey_native_cref_QKeySequence(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(key)); } @QtUninvokable private native void setKey_native_cref_QKeySequence(long __this__nativeId, long key); /** *

See QShortcut::setKeys(QKeySequence::StandardKey)

*/ @QtUninvokable public final void setKeys(io.qt.gui.QKeySequence.@NonNull StandardKey key){ setKeys_native_QKeySequence_StandardKey(QtJambi_LibraryUtilities.internal.nativeId(this), key.value()); } @QtUninvokable private native void setKeys_native_QKeySequence_StandardKey(long __this__nativeId, int key); /** *

See QShortcut::setKeys(QList<QKeySequence>)

*/ @QtUninvokable public final void setKeys(java.util.@NonNull Collection keys){ setKeys_native_cref_QList(QtJambi_LibraryUtilities.internal.nativeId(this), keys); } @QtUninvokable private native void setKeys_native_cref_QList(long __this__nativeId, java.util.Collection keys); /** *

See QShortcut::setWhatsThis(QString)

*/ @QtUninvokable public final void setWhatsThis(java.lang.@NonNull String text){ setWhatsThis_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), text); } @QtUninvokable private native void setWhatsThis_native_cref_QString(long __this__nativeId, java.lang.String text); /** *

See QShortcut::whatsThis()const

*/ @QtUninvokable public final java.lang.@NonNull String whatsThis(){ return whatsThis_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native java.lang.String whatsThis_native_constfct(long __this__nativeId); /** *

See QObject::event(QEvent*)

*/ @QtUninvokable @Override public boolean event(io.qt.core.@Nullable QEvent e){ return event_native_QEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(e)); } @QtUninvokable private native boolean event_native_QEvent_ptr(long __this__nativeId, long e); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QShortcut(QPrivateConstructor p) { super(p); } public QShortcut(io.qt.gui.QKeySequence key, io.qt.core.QObject parent){ this(key, parent, io.qt.core.Qt.ShortcutContext.WindowShortcut); } public QShortcut(io.qt.gui.QKeySequence.StandardKey key, io.qt.core.QObject parent){ this(key, parent, io.qt.core.Qt.ShortcutContext.WindowShortcut); } public QShortcut(io.qt.gui.QKeySequence key, io.qt.core.QObject parent, io.qt.core.Qt.ShortcutContext context){ this(key, parent, (java.lang.Object)null, (java.lang.Object)null, context); } public QShortcut(io.qt.gui.QKeySequence key, io.qt.core.QObject parent, java.lang.String member, io.qt.core.Qt.ShortcutContext context){ this(key, parent, member, (java.lang.String)null, context); } public QShortcut(io.qt.gui.QKeySequence key, io.qt.core.QObject parent, java.lang.String member, java.lang.String ambiguousMember){ this(key, parent, member, ambiguousMember, io.qt.core.Qt.ShortcutContext.WindowShortcut); } public QShortcut(io.qt.gui.QKeySequence key, io.qt.core.QObject parent, java.lang.String member){ this(key, parent, member, (java.lang.String)null, io.qt.core.Qt.ShortcutContext.WindowShortcut); } public QShortcut(io.qt.gui.QKeySequence key, io.qt.core.QObject parent, java.lang.String member, java.lang.String ambiguousMember, io.qt.core.Qt.ShortcutContext context){ this(key, parent, context); if(member!=null && !member.isEmpty()) activated.connect(parent, member); if(ambiguousMember!=null && !ambiguousMember.isEmpty()) activatedAmbiguously.connect(parent, ambiguousMember); } public QShortcut(io.qt.gui.QKeySequence.StandardKey key, io.qt.core.QObject parent, io.qt.core.Qt.ShortcutContext context){ this(key, parent, (java.lang.Object)null, (java.lang.Object)null, context); } public QShortcut(io.qt.gui.QKeySequence.StandardKey key, io.qt.core.QObject parent, java.lang.String member, io.qt.core.Qt.ShortcutContext context){ this(key, parent, member, (java.lang.String)null, context); } public QShortcut(io.qt.gui.QKeySequence.StandardKey key, io.qt.core.QObject parent, java.lang.String member, java.lang.String ambiguousMember){ this(key, parent, member, ambiguousMember, io.qt.core.Qt.ShortcutContext.WindowShortcut); } public QShortcut(io.qt.gui.QKeySequence.StandardKey key, io.qt.core.QObject parent, java.lang.String member){ this(key, parent, member, (java.lang.String)null, io.qt.core.Qt.ShortcutContext.WindowShortcut); } public QShortcut(io.qt.gui.QKeySequence.StandardKey key, io.qt.core.QObject parent, java.lang.String member, java.lang.String ambiguousMember, io.qt.core.Qt.ShortcutContext context){ this(key, parent, context); if(member!=null && !member.isEmpty()) activated.connect(parent, member); if(ambiguousMember!=null && !ambiguousMember.isEmpty()) activatedAmbiguously.connect(parent, ambiguousMember); } private static io.qt.core.QObject parent(io.qt.core.QMetaObject.Slot0 slot){ io.qt.core.QObject parent = QtJambi_LibraryUtilities.internal.lambdaContext(java.util.Objects.requireNonNull(slot)); if(parent==null) throw new IllegalArgumentException("Slot needs to be member of a QObject instance."); return parent; } public QShortcut(io.qt.gui.QKeySequence key, io.qt.core.QMetaObject.Slot0 slot, io.qt.core.Qt.ShortcutContext context) { this(key, parent(slot), context); activated.connect(slot); } public QShortcut(io.qt.gui.QKeySequence key, io.qt.core.QMetaObject.Slot0 slot) { this(key, slot, io.qt.core.Qt.ShortcutContext.WindowShortcut); } public QShortcut(io.qt.gui.QKeySequence key, io.qt.core.QMetaObject.Slot0 slot, io.qt.core.QMetaObject.Slot0 slot2, io.qt.core.Qt.ShortcutContext context) { this(key, parent(slot), context); activated.connect(slot); activatedAmbiguously.connect(slot2); } public QShortcut(io.qt.gui.QKeySequence key, io.qt.core.QMetaObject.Slot0 slot, io.qt.core.QMetaObject.Slot0 slot2) { this(key, slot, io.qt.core.Qt.ShortcutContext.WindowShortcut); } public QShortcut(io.qt.gui.QKeySequence.StandardKey key, io.qt.core.QMetaObject.Slot0 slot, io.qt.core.Qt.ShortcutContext context) { this(key, parent(slot), context); activated.connect(slot); } public QShortcut(io.qt.gui.QKeySequence.StandardKey key, io.qt.core.QMetaObject.Slot0 slot) { this(key, slot, io.qt.core.Qt.ShortcutContext.WindowShortcut); } public QShortcut(io.qt.gui.QKeySequence.StandardKey key, io.qt.core.QMetaObject.Slot0 slot, io.qt.core.QMetaObject.Slot0 slot2, io.qt.core.Qt.ShortcutContext context) { this(key, parent(slot), context); activated.connect(slot); activatedAmbiguously.connect(slot2); } public QShortcut(io.qt.gui.QKeySequence.StandardKey key, io.qt.core.QMetaObject.Slot0 slot, io.qt.core.QMetaObject.Slot0 slot2) { this(key, slot, io.qt.core.Qt.ShortcutContext.WindowShortcut); } public QShortcut(io.qt.gui.QKeySequence key, io.qt.core.QObject parent, io.qt.core.QMetaObject.Slot0 slot, io.qt.core.Qt.ShortcutContext context) { this(key, parent, context); activated.connect(slot); } public QShortcut(io.qt.gui.QKeySequence key, io.qt.core.QObject parent, io.qt.core.QMetaObject.Slot0 slot) { this(key, parent, slot, io.qt.core.Qt.ShortcutContext.WindowShortcut); } public QShortcut(io.qt.gui.QKeySequence key, io.qt.core.QObject parent, io.qt.core.QMetaObject.Slot0 slot, io.qt.core.QMetaObject.Slot0 slot2, io.qt.core.Qt.ShortcutContext context) { this(key, parent, context); activated.connect(slot); activatedAmbiguously.connect(slot2); } public QShortcut(io.qt.gui.QKeySequence key, io.qt.core.QObject parent, io.qt.core.QMetaObject.Slot0 slot, io.qt.core.QMetaObject.Slot0 slot2) { this(key, parent, slot, io.qt.core.Qt.ShortcutContext.WindowShortcut); } public QShortcut(io.qt.gui.QKeySequence.StandardKey key, io.qt.core.QObject parent, io.qt.core.QMetaObject.Slot0 slot, io.qt.core.Qt.ShortcutContext context) { this(key, parent, context); activated.connect(slot); } public QShortcut(io.qt.gui.QKeySequence.StandardKey key, io.qt.core.QObject parent, io.qt.core.QMetaObject.Slot0 slot) { this(key, parent, slot, io.qt.core.Qt.ShortcutContext.WindowShortcut); } public QShortcut(io.qt.gui.QKeySequence.StandardKey key, io.qt.core.QObject parent, io.qt.core.QMetaObject.Slot0 slot, io.qt.core.QMetaObject.Slot0 slot2, io.qt.core.Qt.ShortcutContext context) { this(key, parent, context); activated.connect(slot); activatedAmbiguously.connect(slot2); } public QShortcut(io.qt.gui.QKeySequence.StandardKey key, io.qt.core.QObject parent, io.qt.core.QMetaObject.Slot0 slot, io.qt.core.QMetaObject.Slot0 slot2) { this(key, parent, slot, io.qt.core.Qt.ShortcutContext.WindowShortcut); } /** *

Type-casting overload of QObject::parent()const

*/ @QtUninvokable public final T parent(Class type) { return type.cast(parent()); } /** *

Overloaded constructor for {@link #QShortcut(io.qt.gui.QKeySequence, io.qt.core.QObject, java.lang.Object, java.lang.Object, io.qt.core.Qt.ShortcutContext)} * with context = io.qt.core.Qt.ShortcutContext.WindowShortcut.

*/ private QShortcut(io.qt.gui.@NonNull QKeySequence key, io.qt.core.@StrictNonNull QObject parent, java.lang.Object member, java.lang.Object ambiguousMember) { this(key, parent, member, ambiguousMember, io.qt.core.Qt.ShortcutContext.WindowShortcut); } /** *

Overloaded constructor for {@link #QShortcut(io.qt.gui.QKeySequence.StandardKey, io.qt.core.QObject, java.lang.Object, java.lang.Object, io.qt.core.Qt.ShortcutContext)} * with context = io.qt.core.Qt.ShortcutContext.WindowShortcut.

*/ private QShortcut(io.qt.gui.QKeySequence.@NonNull StandardKey key, io.qt.core.@StrictNonNull QObject parent, java.lang.Object member, java.lang.Object ambiguousMember) { this(key, parent, member, ambiguousMember, io.qt.core.Qt.ShortcutContext.WindowShortcut); } /** * @hidden *

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

*/ @QtPropertyReader(enabled=false) @QtUninvokable public final boolean getAutoRepeat() { return autoRepeat(); } /** * @hidden *

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

*/ @QtPropertyReader(enabled=false) @QtUninvokable public final io.qt.core.Qt.@NonNull ShortcutContext getContext() { return context(); } /** * @hidden *

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

*/ @QtPropertyReader(enabled=false) @QtUninvokable public final boolean getEnabled() { return isEnabled(); } /** * @hidden *

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

*/ @QtPropertyReader(enabled=false) @QtUninvokable public final io.qt.gui.@NonNull QKeySequence getKey() { return key(); } /** *

Overloaded function for {@link #setKey(io.qt.gui.QKeySequence)}.

*/ @QtUninvokable public final void setKey(java.lang.@NonNull String key) { setKey(new io.qt.gui.QKeySequence(key)); } /** *

Overloaded function for {@link #setKey(io.qt.gui.QKeySequence)}.

*/ @QtUninvokable public final void setKey(int key) { setKey(new io.qt.gui.QKeySequence(key)); } /** *

Overloaded function for {@link #setKey(io.qt.gui.QKeySequence)}.

*/ @QtUninvokable public final void setKey(io.qt.gui.@NonNull QKeyCombination key) { setKey(new io.qt.gui.QKeySequence(key)); } /** *

Overloaded function for {@link #setKey(io.qt.gui.QKeySequence)}.

*/ @QtUninvokable public final void setKey(io.qt.gui.QKeySequence.@NonNull StandardKey key) { setKey(new io.qt.gui.QKeySequence(key)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy