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.2
Show newest version
package io.qt.gui;


/**
 * 

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.QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QShortcut.class); /** *

See QShortcut::activated()

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

See QShortcut::activatedAmbiguously()

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

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.StandardKey key, io.qt.core.QObject parent, java.lang.Object member, java.lang.Object ambiguousMember) { this(key, parent, member, ambiguousMember, io.qt.core.Qt.ShortcutContext.WindowShortcut); } private QShortcut(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){ 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.QObject parent){ super((QPrivateConstructor)null); initialize_native(this, parent); } private native static void initialize_native(QShortcut instance, io.qt.core.QObject 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.QKeySequence key, io.qt.core.QObject parent, java.lang.Object member, java.lang.Object ambiguousMember) { this(key, parent, member, ambiguousMember, io.qt.core.Qt.ShortcutContext.WindowShortcut); } private QShortcut(io.qt.gui.QKeySequence key, io.qt.core.QObject parent, java.lang.Object member, java.lang.Object ambiguousMember, io.qt.core.Qt.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::autoRepeat()const

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

See QShortcut::context()const

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

See QShortcut::id()const

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

See QShortcut::isEnabled()const

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

See QShortcut::key()const

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

See QShortcut::keys()const

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

See QShortcut::setAutoRepeat(bool)

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

See QShortcut::setContext(Qt::ShortcutContext)

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

See QShortcut::setEnabled(bool)

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

See QShortcut::setKey(QKeySequence)

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

See QShortcut::setKeys(QKeySequence::StandardKey)

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

See QShortcut::setKeys(QList<QKeySequence>)

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

See QShortcut::setWhatsThis(QString)

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

See QShortcut::whatsThis()const

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

See QObject::event(QEvent*)

*/ @io.qt.QtUninvokable public boolean event(io.qt.core.QEvent e){ return event_native_QEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(e)); } @io.qt.QtUninvokable private native boolean event_native_QEvent_ptr(long __this__nativeId, long e); /** * Constructor for internal use only. * @param p expected to be null. */ @io.qt.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); } @io.qt.QtUninvokable public final T parent(Class type) { return type.cast(parent()); } public final io.qt.widgets.QWidget parentWidget() { return parent(io.qt.widgets.QWidget.class); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy