io.qt.widgets.QToolButton Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.widgets;
import io.qt.*;
/**
* Quick-access button to commands or options, usually used inside a QToolBar
* Java wrapper for Qt class QToolButton
*/
public class QToolButton extends io.qt.widgets.QAbstractButton
{
@QtPropertyMember(enabled=false)
private Object __rcDefaultAction = null;
@QtPropertyMember(enabled=false)
private Object __rcMenu = null;
/**
* This variable stores the meta-object for the class.
*/
public static final io.qt.core.@NonNull QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QToolButton.class);
/**
* Java wrapper for Qt enum QToolButton::ToolButtonPopupMode
*/
public enum ToolButtonPopupMode implements QtEnumerator {
/**
* Representing QToolButton:: DelayedPopup
*/
DelayedPopup(0),
/**
* Representing QToolButton:: MenuButtonPopup
*/
MenuButtonPopup(1),
/**
* Representing QToolButton:: InstantPopup
*/
InstantPopup(2);
static {
QtJambi_LibraryUtilities.initialize();
}
private ToolButtonPopupMode(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
@Override
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull ToolButtonPopupMode resolve(int value) {
switch (value) {
case 0: return DelayedPopup;
case 1: return MenuButtonPopup;
case 2: return InstantPopup;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QToolButton:: triggered(QAction*)
*/
public final @NonNull Signal1 triggered = new Signal1<>();
/**
* See QToolButton:: QToolButton(QWidget*)
*/
public QToolButton(io.qt.widgets.@Nullable QWidget parent){
super((QPrivateConstructor)null);
initialize_native(this, parent);
}
private native static void initialize_native(QToolButton instance, io.qt.widgets.QWidget parent);
/**
* See QToolButton:: arrowType()const
*/
@QtPropertyReader(name="arrowType")
@QtUninvokable
public final io.qt.core.Qt.@NonNull ArrowType arrowType(){
return io.qt.core.Qt.ArrowType.resolve(arrowType_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int arrowType_native_constfct(long __this__nativeId);
/**
* See QToolButton:: autoRaise()const
*/
@QtPropertyReader(name="autoRaise")
@QtUninvokable
public final boolean autoRaise(){
return autoRaise_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean autoRaise_native_constfct(long __this__nativeId);
/**
* See QToolButton:: defaultAction()const
*/
@QtUninvokable
public final io.qt.gui.@Nullable QAction defaultAction(){
return defaultAction_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QAction defaultAction_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final io.qt.widgets.@Nullable QMenu menu(){
return menu_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.widgets.QMenu menu_native_constfct(long __this__nativeId);
/**
* See QToolButton:: popupMode()const
*/
@QtPropertyReader(name="popupMode")
@QtUninvokable
public final io.qt.widgets.QToolButton.@NonNull ToolButtonPopupMode popupMode(){
return io.qt.widgets.QToolButton.ToolButtonPopupMode.resolve(popupMode_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int popupMode_native_constfct(long __this__nativeId);
/**
* See QToolButton:: setArrowType(Qt::ArrowType)
*/
@QtPropertyWriter(name="arrowType")
@QtUninvokable
public final void setArrowType(io.qt.core.Qt.@NonNull ArrowType type){
setArrowType_native_Qt_ArrowType(QtJambi_LibraryUtilities.internal.nativeId(this), type.value());
}
@QtUninvokable
private native void setArrowType_native_Qt_ArrowType(long __this__nativeId, int type);
/**
* See QToolButton:: setAutoRaise(bool)
*/
@QtPropertyWriter(name="autoRaise")
@QtUninvokable
public final void setAutoRaise(boolean enable){
setAutoRaise_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), enable);
}
@QtUninvokable
private native void setAutoRaise_native_bool(long __this__nativeId, boolean enable);
/**
* See QToolButton:: setDefaultAction(QAction*)
*/
public final void setDefaultAction(io.qt.gui.@Nullable QAction arg__1){
setDefaultAction_native_QAction_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
__rcDefaultAction = arg__1;
}
private native void setDefaultAction_native_QAction_ptr(long __this__nativeId, long arg__1);
/**
* See QToolButton:: setMenu(QMenu*)
*/
@QtUninvokable
public final void setMenu(io.qt.widgets.@Nullable QMenu menu){
setMenu_native_QMenu_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(menu));
__rcMenu = menu;
}
@QtUninvokable
private native void setMenu_native_QMenu_ptr(long __this__nativeId, long menu);
/**
* See QToolButton:: setPopupMode(QToolButton::ToolButtonPopupMode)
*/
@QtPropertyWriter(name="popupMode")
@QtUninvokable
public final void setPopupMode(io.qt.widgets.QToolButton.@NonNull ToolButtonPopupMode mode){
setPopupMode_native_QToolButton_ToolButtonPopupMode(QtJambi_LibraryUtilities.internal.nativeId(this), mode.value());
}
@QtUninvokable
private native void setPopupMode_native_QToolButton_ToolButtonPopupMode(long __this__nativeId, int mode);
/**
* See QToolButton:: setToolButtonStyle(Qt::ToolButtonStyle)
*/
@QtPropertyWriter(name="toolButtonStyle")
public final void setToolButtonStyle(io.qt.core.Qt.@NonNull ToolButtonStyle style){
setToolButtonStyle_native_Qt_ToolButtonStyle(QtJambi_LibraryUtilities.internal.nativeId(this), style.value());
}
private native void setToolButtonStyle_native_Qt_ToolButtonStyle(long __this__nativeId, int style);
/**
*
*/
public final void showMenu(){
showMenu_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native void showMenu_native(long __this__nativeId);
/**
* See QToolButton:: toolButtonStyle()const
*/
@QtPropertyReader(name="toolButtonStyle")
@QtUninvokable
public final io.qt.core.Qt.@NonNull ToolButtonStyle toolButtonStyle(){
return io.qt.core.Qt.ToolButtonStyle.resolve(toolButtonStyle_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int toolButtonStyle_native_constfct(long __this__nativeId);
/**
* See QWidget:: actionEvent(QActionEvent*)
*/
@QtUninvokable
@Override
protected void actionEvent(io.qt.gui.@Nullable QActionEvent arg__1){
actionEvent_native_QActionEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@QtUninvokable
private native void actionEvent_native_QActionEvent_ptr(long __this__nativeId, long arg__1);
/**
* See QWidget:: changeEvent(QEvent*)
*/
@QtUninvokable
@Override
protected void changeEvent(io.qt.core.@Nullable QEvent arg__1){
java.util.Objects.requireNonNull(arg__1, "Argument 'arg__1': null not expected.");
changeEvent_native_QEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@QtUninvokable
private native void changeEvent_native_QEvent_ptr(long __this__nativeId, long arg__1);
/**
* See QAbstractButton:: checkStateSet()
*/
@QtUninvokable
@Override
protected void checkStateSet(){
checkStateSet_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native void checkStateSet_native(long __this__nativeId);
/**
* See QWidget:: enterEvent(QEnterEvent*)
*/
@QtUninvokable
@Override
protected void enterEvent(io.qt.gui.@Nullable QEnterEvent arg__1){
enterEvent_native_QEnterEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@QtUninvokable
private native void enterEvent_native_QEnterEvent_ptr(long __this__nativeId, long arg__1);
/**
*
*/
@QtUninvokable
@Override
public boolean event(io.qt.core.@Nullable QEvent e){
java.util.Objects.requireNonNull(e, "Argument 'e': null not expected.");
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);
/**
* See QAbstractButton:: hitButton(QPoint)const
*/
@QtUninvokable
@Override
protected boolean hitButton(io.qt.core.@NonNull QPoint pos){
return hitButton_native_cref_QPoint_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(pos));
}
@QtUninvokable
private native boolean hitButton_native_cref_QPoint_constfct(long __this__nativeId, long pos);
/**
* See QToolButton:: initStyleOption(QStyleOptionToolButton*)const
*/
@QtUninvokable
protected void initStyleOption(io.qt.widgets.@Nullable QStyleOptionToolButton option){
initStyleOption_native_QStyleOptionToolButton_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(option));
}
@QtUninvokable
private native void initStyleOption_native_QStyleOptionToolButton_ptr_constfct(long __this__nativeId, long option);
/**
* See QWidget:: leaveEvent(QEvent*)
*/
@QtUninvokable
@Override
protected void leaveEvent(io.qt.core.@Nullable QEvent arg__1){
leaveEvent_native_QEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@QtUninvokable
private native void leaveEvent_native_QEvent_ptr(long __this__nativeId, long arg__1);
/**
* See QWidget:: minimumSizeHint()const
*/
@QtUninvokable
@Override
public io.qt.core.@NonNull QSize minimumSizeHint(){
return minimumSizeHint_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QSize minimumSizeHint_native_constfct(long __this__nativeId);
/**
* See QWidget:: mousePressEvent(QMouseEvent*)
*/
@QtUninvokable
@Override
protected void mousePressEvent(io.qt.gui.@Nullable QMouseEvent arg__1){
java.util.Objects.requireNonNull(arg__1, "Argument 'arg__1': null not expected.");
mousePressEvent_native_QMouseEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@QtUninvokable
private native void mousePressEvent_native_QMouseEvent_ptr(long __this__nativeId, long arg__1);
/**
* See QWidget:: mouseReleaseEvent(QMouseEvent*)
*/
@QtUninvokable
@Override
protected void mouseReleaseEvent(io.qt.gui.@Nullable QMouseEvent arg__1){
java.util.Objects.requireNonNull(arg__1, "Argument 'arg__1': null not expected.");
mouseReleaseEvent_native_QMouseEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@QtUninvokable
private native void mouseReleaseEvent_native_QMouseEvent_ptr(long __this__nativeId, long arg__1);
/**
* See QAbstractButton:: nextCheckState()
*/
@QtUninvokable
@Override
protected void nextCheckState(){
nextCheckState_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native void nextCheckState_native(long __this__nativeId);
/**
* See QWidget:: paintEvent(QPaintEvent*)
*/
@QtUninvokable
@Override
protected void paintEvent(io.qt.gui.@Nullable QPaintEvent arg__1){
paintEvent_native_QPaintEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@QtUninvokable
private native void paintEvent_native_QPaintEvent_ptr(long __this__nativeId, long arg__1);
/**
*
*/
@QtUninvokable
@Override
public io.qt.core.@NonNull QSize sizeHint(){
return sizeHint_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QSize sizeHint_native_constfct(long __this__nativeId);
/**
* See QObject:: timerEvent(QTimerEvent*)
*/
@QtUninvokable
@Override
protected void timerEvent(io.qt.core.@Nullable QTimerEvent arg__1){
timerEvent_native_QTimerEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@QtUninvokable
private native void timerEvent_native_QTimerEvent_ptr(long __this__nativeId, long arg__1);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QToolButton(QPrivateConstructor p) { super(p); }
/**
* Constructor for internal use only.
* It is not allowed to call the declarative constructor from inside Java.
* @hidden
*/
@NativeAccess
protected QToolButton(QDeclarativeConstructor constructor) {
super((QPrivateConstructor)null);
initialize_native(this, constructor);
}
@QtUninvokable
private static native void initialize_native(QToolButton instance, QDeclarativeConstructor constructor);
/**
* Overloaded constructor for {@link #QToolButton(io.qt.widgets.QWidget)}
* with parent = null
.
*/
public QToolButton() {
this((io.qt.widgets.QWidget)null);
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #arrowType()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final io.qt.core.Qt.@NonNull ArrowType getArrowType() {
return arrowType();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #autoRaise()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final boolean getAutoRaise() {
return autoRaise();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #popupMode()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final io.qt.widgets.QToolButton.@NonNull ToolButtonPopupMode getPopupMode() {
return popupMode();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #toolButtonStyle()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final io.qt.core.Qt.@NonNull ToolButtonStyle getToolButtonStyle() {
return toolButtonStyle();
}
}