io.qt.widgets.QToolButton Maven / Gradle / Ivy
package io.qt.widgets;
/**
* 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
{
@io.qt.QtPropertyMember(enabled=false)
private Object __rcDefaultAction = null;
@io.qt.QtPropertyMember(enabled=false)
private Object __rcMenu = null;
/**
* This variable stores the meta-object for the class.
*/
public static final io.qt.core.QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QToolButton.class);
/**
* Java wrapper for Qt enum QToolButton::ToolButtonPopupMode
*/
public enum ToolButtonPopupMode implements io.qt.QtEnumerator {
DelayedPopup(0),
MenuButtonPopup(1),
InstantPopup(2);
private ToolButtonPopupMode(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 ToolButtonPopupMode resolve(int value) {
switch (value) {
case 0: return DelayedPopup;
case 1: return MenuButtonPopup;
case 2: return InstantPopup;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QToolButton::triggered(QAction*)
*/
public final Signal1 triggered = new Signal1<>();
/**
* Overloaded constructor for {@link #QToolButton(io.qt.widgets.QWidget)}
* with parent = null
.
*/
public QToolButton() {
this((io.qt.widgets.QWidget)null);
}
/**
* See QToolButton::QToolButton(QWidget*)
*/
public QToolButton(io.qt.widgets.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
*/
@io.qt.QtPropertyReader(name="arrowType")
@io.qt.QtUninvokable
public final io.qt.core.Qt.ArrowType arrowType(){
return io.qt.core.Qt.ArrowType.resolve(arrowType_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int arrowType_native_constfct(long __this__nativeId);
/**
* See QToolButton::autoRaise()const
*/
@io.qt.QtPropertyReader(name="autoRaise")
@io.qt.QtUninvokable
public final boolean autoRaise(){
return autoRaise_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native boolean autoRaise_native_constfct(long __this__nativeId);
/**
* See QToolButton::defaultAction()const
*/
@io.qt.QtUninvokable
public final io.qt.gui.QAction defaultAction(){
return defaultAction_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.gui.QAction defaultAction_native_constfct(long __this__nativeId);
/**
*
*/
@io.qt.QtUninvokable
public final io.qt.widgets.QMenu menu(){
return menu_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.widgets.QMenu menu_native_constfct(long __this__nativeId);
/**
* See QToolButton::popupMode()const
*/
@io.qt.QtPropertyReader(name="popupMode")
@io.qt.QtUninvokable
public final io.qt.widgets.QToolButton.ToolButtonPopupMode popupMode(){
return io.qt.widgets.QToolButton.ToolButtonPopupMode.resolve(popupMode_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int popupMode_native_constfct(long __this__nativeId);
/**
* See QToolButton::setArrowType(Qt::ArrowType)
*/
@io.qt.QtPropertyWriter(name="arrowType")
@io.qt.QtUninvokable
public final void setArrowType(io.qt.core.Qt.ArrowType type){
setArrowType_native_Qt_ArrowType(QtJambi_LibraryUtilities.internal.nativeId(this), type.value());
}
@io.qt.QtUninvokable
private native void setArrowType_native_Qt_ArrowType(long __this__nativeId, int type);
/**
* See QToolButton::setAutoRaise(bool)
*/
@io.qt.QtPropertyWriter(name="autoRaise")
@io.qt.QtUninvokable
public final void setAutoRaise(boolean enable){
setAutoRaise_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), enable);
}
@io.qt.QtUninvokable
private native void setAutoRaise_native_bool(long __this__nativeId, boolean enable);
/**
* See QToolButton::setDefaultAction(QAction*)
*/
public final void setDefaultAction(io.qt.gui.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*)
*/
@io.qt.QtUninvokable
public final void setMenu(io.qt.widgets.QMenu menu){
setMenu_native_QMenu_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(menu));
__rcMenu = menu;
}
@io.qt.QtUninvokable
private native void setMenu_native_QMenu_ptr(long __this__nativeId, long menu);
/**
* See QToolButton::setPopupMode(QToolButton::ToolButtonPopupMode)
*/
@io.qt.QtPropertyWriter(name="popupMode")
@io.qt.QtUninvokable
public final void setPopupMode(io.qt.widgets.QToolButton.ToolButtonPopupMode mode){
setPopupMode_native_QToolButton_ToolButtonPopupMode(QtJambi_LibraryUtilities.internal.nativeId(this), mode.value());
}
@io.qt.QtUninvokable
private native void setPopupMode_native_QToolButton_ToolButtonPopupMode(long __this__nativeId, int mode);
/**
* See QToolButton::setToolButtonStyle(Qt::ToolButtonStyle)
*/
@io.qt.QtPropertyWriter(name="toolButtonStyle")
public final void setToolButtonStyle(io.qt.core.Qt.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
*/
@io.qt.QtPropertyReader(name="toolButtonStyle")
@io.qt.QtUninvokable
public final io.qt.core.Qt.ToolButtonStyle toolButtonStyle(){
return io.qt.core.Qt.ToolButtonStyle.resolve(toolButtonStyle_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int toolButtonStyle_native_constfct(long __this__nativeId);
/**
* See QWidget::actionEvent(QActionEvent*)
*/
@io.qt.QtUninvokable
protected void actionEvent(io.qt.gui.QActionEvent arg__1){
actionEvent_native_QActionEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@io.qt.QtUninvokable
private native void actionEvent_native_QActionEvent_ptr(long __this__nativeId, long arg__1);
/**
* See QWidget::changeEvent(QEvent*)
*/
@io.qt.QtUninvokable
protected void changeEvent(io.qt.core.QEvent arg__1){
changeEvent_native_QEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@io.qt.QtUninvokable
private native void changeEvent_native_QEvent_ptr(long __this__nativeId, long arg__1);
/**
* See QAbstractButton::checkStateSet()
*/
@io.qt.QtUninvokable
protected void checkStateSet(){
checkStateSet_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native void checkStateSet_native(long __this__nativeId);
/**
* See QWidget::enterEvent(QEnterEvent*)
*/
@io.qt.QtUninvokable
protected void enterEvent(io.qt.gui.QEnterEvent arg__1){
enterEvent_native_QEnterEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@io.qt.QtUninvokable
private native void enterEvent_native_QEnterEvent_ptr(long __this__nativeId, long arg__1);
/**
*
*/
@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);
/**
* See QAbstractButton::hitButton(QPoint)const
*/
@io.qt.QtUninvokable
protected boolean hitButton(io.qt.core.QPoint pos){
return hitButton_native_cref_QPoint_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(pos));
}
@io.qt.QtUninvokable
private native boolean hitButton_native_cref_QPoint_constfct(long __this__nativeId, long pos);
/**
* See QToolButton::initStyleOption(QStyleOptionToolButton*)const
*/
@io.qt.QtUninvokable
protected void initStyleOption(io.qt.widgets.QStyleOptionToolButton option){
initStyleOption_native_QStyleOptionToolButton_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), option);
}
@io.qt.QtUninvokable
private native void initStyleOption_native_QStyleOptionToolButton_ptr_constfct(long __this__nativeId, io.qt.widgets.QStyleOptionToolButton option);
/**
* See QWidget::leaveEvent(QEvent*)
*/
@io.qt.QtUninvokable
protected void leaveEvent(io.qt.core.QEvent arg__1){
leaveEvent_native_QEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@io.qt.QtUninvokable
private native void leaveEvent_native_QEvent_ptr(long __this__nativeId, long arg__1);
/**
* See QWidget::minimumSizeHint()const
*/
@io.qt.QtUninvokable
public io.qt.core.QSize minimumSizeHint(){
return minimumSizeHint_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QSize minimumSizeHint_native_constfct(long __this__nativeId);
/**
* See QWidget::mousePressEvent(QMouseEvent*)
*/
@io.qt.QtUninvokable
protected void mousePressEvent(io.qt.gui.QMouseEvent arg__1){
mousePressEvent_native_QMouseEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@io.qt.QtUninvokable
private native void mousePressEvent_native_QMouseEvent_ptr(long __this__nativeId, long arg__1);
/**
* See QWidget::mouseReleaseEvent(QMouseEvent*)
*/
@io.qt.QtUninvokable
protected void mouseReleaseEvent(io.qt.gui.QMouseEvent arg__1){
mouseReleaseEvent_native_QMouseEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@io.qt.QtUninvokable
private native void mouseReleaseEvent_native_QMouseEvent_ptr(long __this__nativeId, long arg__1);
/**
* See QAbstractButton::nextCheckState()
*/
@io.qt.QtUninvokable
protected void nextCheckState(){
nextCheckState_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native void nextCheckState_native(long __this__nativeId);
/**
* See QWidget::paintEvent(QPaintEvent*)
*/
@io.qt.QtUninvokable
protected void paintEvent(io.qt.gui.QPaintEvent arg__1){
paintEvent_native_QPaintEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@io.qt.QtUninvokable
private native void paintEvent_native_QPaintEvent_ptr(long __this__nativeId, long arg__1);
/**
*
*/
@io.qt.QtUninvokable
public io.qt.core.QSize sizeHint(){
return sizeHint_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QSize sizeHint_native_constfct(long __this__nativeId);
/**
* See QObject::timerEvent(QTimerEvent*)
*/
@io.qt.QtUninvokable
protected void timerEvent(io.qt.core.QTimerEvent arg__1){
timerEvent_native_QTimerEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@io.qt.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
.
*/
@io.qt.NativeAccess
protected QToolButton(QPrivateConstructor p) { super(p); }
/**
* Constructor for internal use only.
* It is not allowed to call the declarative constructor from inside Java.
*/
@io.qt.NativeAccess
protected QToolButton(QDeclarativeConstructor constructor) {
super((QPrivateConstructor)null);
initialize_native(this, constructor);
}
@io.qt.QtUninvokable
private static native void initialize_native(QToolButton instance, QDeclarativeConstructor constructor);
}