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

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

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

import io.qt.*;


/**
 * 

Groups actions together

*

Java wrapper for Qt class QActionGroup

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

Java wrapper for Qt enum QActionGroup::ExclusionPolicy

*/ public enum ExclusionPolicy implements QtEnumerator { /** *

Representing QActionGroup::ExclusionPolicy::None

*/ None(0), /** *

Representing QActionGroup::ExclusionPolicy::Exclusive

*/ Exclusive(1), /** *

Representing QActionGroup::ExclusionPolicy::ExclusiveOptional

*/ ExclusiveOptional(2); static { QtJambi_LibraryUtilities.initialize(); } private ExclusionPolicy(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 ExclusionPolicy resolve(int value) { switch (value) { case 0: return None; case 1: return Exclusive; case 2: return ExclusiveOptional; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** *

See QActionGroup::hovered(QAction*)

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

See QActionGroup::triggered(QAction*)

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

See QActionGroup::QActionGroup(QObject*)

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

See QActionGroup::actions()const

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

See QActionGroup::addAction(QAction*)

*/ @QtUninvokable public final io.qt.gui.@Nullable QAction addAction(io.qt.gui.@Nullable QAction a){ io.qt.gui.@Nullable QAction __qt_return_value = addAction_native_QAction_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(a)); if (a != null) { if(__rcActions==null) __rcActions = QtJambi_LibraryUtilities.internal.newRCList(); __rcActions.add(a); } QtJambi_LibraryUtilities.internal.setReferenceCount(a, QAction.class, "__rcActionGroup", false, false, this); return __qt_return_value; } @QtUninvokable private native io.qt.gui.QAction addAction_native_QAction_ptr(long __this__nativeId, long a); /** *

See QActionGroup::addAction(QIcon,QString)

*/ @QtUninvokable public final io.qt.gui.@Nullable QAction addAction(io.qt.gui.@NonNull QIcon icon, java.lang.@NonNull String text){ return addAction_native_cref_QIcon_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(icon), text); } @QtUninvokable private native io.qt.gui.QAction addAction_native_cref_QIcon_cref_QString(long __this__nativeId, long icon, java.lang.String text); /** *

See QActionGroup::addAction(QString)

*/ @QtUninvokable public final io.qt.gui.@Nullable QAction addAction(java.lang.@NonNull String text){ return addAction_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), text); } @QtUninvokable private native io.qt.gui.QAction addAction_native_cref_QString(long __this__nativeId, java.lang.String text); /** *

See QActionGroup::checkedAction()const

*/ @QtUninvokable public final io.qt.gui.@Nullable QAction checkedAction(){ return checkedAction_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.gui.QAction checkedAction_native_constfct(long __this__nativeId); /** *

See QActionGroup::exclusionPolicy()const

*/ @QtPropertyReader(name="exclusionPolicy") @QtUninvokable public final io.qt.gui.QActionGroup.@NonNull ExclusionPolicy exclusionPolicy(){ return io.qt.gui.QActionGroup.ExclusionPolicy.resolve(exclusionPolicy_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int exclusionPolicy_native_constfct(long __this__nativeId); /** *

See QActionGroup::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); /** *

Returns true if the group is exclusive

*

See QActionGroup::isExclusive()const

*/ @QtUninvokable public final boolean isExclusive(){ return isExclusive_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isExclusive_native_constfct(long __this__nativeId); /** *

See QActionGroup::isVisible()const

*/ @QtPropertyReader(name="visible") @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 QActionGroup::removeAction(QAction*)

*/ @QtUninvokable public final void removeAction(io.qt.gui.@Nullable QAction a){ removeAction_native_QAction_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(a)); if (a != null) { while (__rcActions != null && __rcActions.remove(a)) ; } QtJambi_LibraryUtilities.internal.setReferenceCount(a, QAction.class, "__rcActionGroup", false, false, null); } @QtUninvokable private native void removeAction_native_QAction_ptr(long __this__nativeId, long a); /** *

See QActionGroup::setDisabled(bool)

*/ public final void setDisabled(boolean b){ setDisabled_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), b); } private native void setDisabled_native_bool(long __this__nativeId, boolean b); /** *

See QActionGroup::setEnabled(bool)

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

See QActionGroup::setExclusionPolicy(QActionGroup::ExclusionPolicy)

*/ @QtPropertyWriter(name="exclusionPolicy") public final void setExclusionPolicy(io.qt.gui.QActionGroup.@NonNull ExclusionPolicy policy){ setExclusionPolicy_native_QActionGroup_ExclusionPolicy(QtJambi_LibraryUtilities.internal.nativeId(this), policy.value()); } private native void setExclusionPolicy_native_QActionGroup_ExclusionPolicy(long __this__nativeId, int policy); /** *

Enable or disable the group exclusion checking

*

See QActionGroup::setExclusive(bool)

*/ public final void setExclusive(boolean arg__1){ setExclusive_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1); } private native void setExclusive_native_bool(long __this__nativeId, boolean arg__1); /** *

See QActionGroup::setVisible(bool)

*/ @QtPropertyWriter(name="visible") public final void setVisible(boolean arg__1){ setVisible_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1); } private native void setVisible_native_bool(long __this__nativeId, boolean arg__1); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QActionGroup(QPrivateConstructor p) { super(p); } /** *

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

*/ @QtUninvokable public final io.qt.gui.@Nullable QAction addAction(io.qt.gui.@NonNull QPixmap icon, java.lang.@NonNull String text) { return addAction(new io.qt.gui.QIcon(icon), text); } /** * @hidden *

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

*/ @QtPropertyReader(enabled=false) @QtUninvokable public final io.qt.gui.QActionGroup.@NonNull ExclusionPolicy getExclusionPolicy() { return exclusionPolicy(); } /** * @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 #isVisible()} instead.

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