io.qt.macextras.QMacToolBarItem Maven / Gradle / Ivy
Show all versions of qtjambi-macextras Show documentation
package io.qt.macextras;
import io.qt.*;
/**
* Item for QMacToolBar
* Java wrapper for Qt class QMacToolBarItem
*/
public class QMacToolBarItem 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(QMacToolBarItem.class);
/**
* Java wrapper for Qt enum QMacToolBarItem::StandardItem
*/
@QtUnlistedEnum
public enum StandardItem implements QtEnumerator {
/**
* Representing QMacToolBarItem:: NoStandardItem
*/
NoStandardItem(0),
/**
* Representing QMacToolBarItem:: Space
*/
Space(1),
/**
* Representing QMacToolBarItem:: FlexibleSpace
*/
FlexibleSpace(2);
static {
QtJambi_LibraryUtilities.initialize();
}
private StandardItem(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 StandardItem resolve(int value) {
switch (value) {
case 0: return NoStandardItem;
case 1: return Space;
case 2: return FlexibleSpace;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QMacToolBarItem:: activated()
*/
public final @NonNull Signal0 activated = new Signal0();
/**
* See QMacToolBarItem:: QMacToolBarItem(QObject*)
*/
public QMacToolBarItem(io.qt.core.@Nullable QObject parent){
super((QPrivateConstructor)null);
initialize_native(this, parent);
}
private native static void initialize_native(QMacToolBarItem instance, io.qt.core.QObject parent);
/**
* See QMacToolBarItem:: icon()const
*/
@QtPropertyReader(name="icon")
@QtUninvokable
public final io.qt.gui.@NonNull QIcon icon(){
return icon_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QIcon icon_native_constfct(long __this__nativeId);
/**
* See QMacToolBarItem:: selectable()const
*/
@QtPropertyReader(name="selectable")
@QtUninvokable
public final boolean selectable(){
return selectable_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean selectable_native_constfct(long __this__nativeId);
/**
* See QMacToolBarItem:: setIcon(QIcon)
*/
@QtPropertyWriter(name="icon")
@QtUninvokable
public final void setIcon(io.qt.gui.@NonNull QIcon icon){
setIcon_native_cref_QIcon(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(icon));
}
@QtUninvokable
private native void setIcon_native_cref_QIcon(long __this__nativeId, long icon);
/**
* See QMacToolBarItem:: setSelectable(bool)
*/
@QtPropertyWriter(name="selectable")
@QtUninvokable
public final void setSelectable(boolean selectable){
setSelectable_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), selectable);
}
@QtUninvokable
private native void setSelectable_native_bool(long __this__nativeId, boolean selectable);
/**
* See QMacToolBarItem:: setStandardItem(QMacToolBarItem::StandardItem)
*/
@QtPropertyWriter(name="standardItem")
@QtUninvokable
public final void setStandardItem(io.qt.macextras.QMacToolBarItem.@NonNull StandardItem standardItem){
setStandardItem_native_QMacToolBarItem_StandardItem(QtJambi_LibraryUtilities.internal.nativeId(this), standardItem.value());
}
@QtUninvokable
private native void setStandardItem_native_QMacToolBarItem_StandardItem(long __this__nativeId, int standardItem);
/**
* See QMacToolBarItem:: setText(QString)
*/
@QtPropertyWriter(name="text")
@QtUninvokable
public final void setText(java.lang.@NonNull String text){
setText_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), text);
}
@QtUninvokable
private native void setText_native_cref_QString(long __this__nativeId, java.lang.String text);
/**
* See QMacToolBarItem:: standardItem()const
*/
@QtPropertyReader(name="standardItem")
@QtUninvokable
public final io.qt.macextras.QMacToolBarItem.@NonNull StandardItem standardItem(){
return io.qt.macextras.QMacToolBarItem.StandardItem.resolve(standardItem_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int standardItem_native_constfct(long __this__nativeId);
/**
* See QMacToolBarItem:: text()const
*/
@QtPropertyReader(name="text")
@QtUninvokable
public final java.lang.@NonNull String text(){
return text_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String text_native_constfct(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QMacToolBarItem(QPrivateConstructor p) { super(p); }
/**
* Constructor for internal use only.
* It is not allowed to call the declarative constructor from inside Java.
* @hidden
*/
@NativeAccess
protected QMacToolBarItem(QDeclarativeConstructor constructor) {
super((QPrivateConstructor)null);
initialize_native(this, constructor);
}
@QtUninvokable
private static native void initialize_native(QMacToolBarItem instance, QDeclarativeConstructor constructor);
/**
* Overloaded constructor for {@link #QMacToolBarItem(io.qt.core.QObject)}
* with parent = null
.
*/
public QMacToolBarItem() {
this((io.qt.core.QObject)null);
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #icon()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final io.qt.gui.@NonNull QIcon getIcon() {
return icon();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #selectable()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final boolean getSelectable() {
return selectable();
}
/**
* Overloaded function for {@link #setIcon(io.qt.gui.QIcon)}.
*/
@QtUninvokable
public final void setIcon(io.qt.gui.@NonNull QPixmap icon) {
setIcon(new io.qt.gui.QIcon(icon));
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #standardItem()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final io.qt.macextras.QMacToolBarItem.@NonNull StandardItem getStandardItem() {
return standardItem();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #text()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final java.lang.@NonNull String getText() {
return text();
}
}