io.qt.widgets.QStyleOptionToolBar Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.widgets;
import io.qt.*;
/**
* Used to describe the parameters for drawing a toolbar
* Java wrapper for Qt class QStyleOptionToolBar
*/
public class QStyleOptionToolBar extends io.qt.widgets.QStyleOption
implements java.lang.Cloneable
{
/**
* Java wrapper for Qt enum QStyleOptionToolBar::ToolBarFeature
*
* @see ToolBarFeatures
*/
public enum ToolBarFeature implements QtFlagEnumerator {
/**
* Representing QStyleOptionToolBar:: None
*/
None(0),
/**
* Representing QStyleOptionToolBar:: Movable
*/
Movable(1);
static {
QtJambi_LibraryUtilities.initialize();
}
private ToolBarFeature(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
@Override
public int value() {
return value;
}
/**
* Create a QFlags of the enum entry.
* @return QFlags
*/
@Override
public @NonNull ToolBarFeatures asFlags() {
return new ToolBarFeatures(value);
}
/**
* Combines this entry with other enum entry.
* @param e enum entry
* @return new flag
*/
public @NonNull ToolBarFeatures combined(@NonNull ToolBarFeature e) {
return asFlags().setFlag(e, true);
}
/**
* Excludes other enum entry from a flag of this entry.
* @param e enum entry
* @return new flag
*/
public @NonNull ToolBarFeatures cleared(@NonNull ToolBarFeature e) {
return asFlags().setFlag(e, false);
}
/**
* Creates a new {@link ToolBarFeatures} from the entries.
* @param values entries
* @return new flag
*/
public static @NonNull ToolBarFeatures flags(@Nullable ToolBarFeature @NonNull... values) {
return new ToolBarFeatures(values);
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull ToolBarFeature resolve(int value) {
switch (value) {
case 0: return None;
case 1: return Movable;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* {@link QFlags} type for enum {@link ToolBarFeature}
*/
public static final class ToolBarFeatures extends QFlags implements Comparable {
private static final long serialVersionUID = 0xfffdf760f5dc764cL;
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Creates a new ToolBarFeatures where the flags in args
are set.
* @param args enum entries
*/
public ToolBarFeatures(@Nullable ToolBarFeature @NonNull... args){
super(args);
}
/**
* Creates a new ToolBarFeatures with given value
.
* @param value
*/
public ToolBarFeatures(int value) {
super(value);
}
/**
* Combines this flags with enum entry.
* @param e enum entry
* @return new ToolBarFeatures
*/
@Override
public final @NonNull ToolBarFeatures combined(@StrictNonNull ToolBarFeature e){
return new ToolBarFeatures(value() | e.value());
}
/**
* Sets the flag e
* @param e enum entry
* @return this
*/
@Override
public final @NonNull ToolBarFeatures setFlag(@Nullable ToolBarFeature e){
return setFlag(e, true);
}
/**
* Sets or clears the flag flag
* @param e enum entry
* @param on set (true) or clear (false)
* @return this
*/
@Override
public final @NonNull ToolBarFeatures setFlag(@Nullable ToolBarFeature e, boolean on){
if (on) {
setValue(value() | e.value());
}else {
setValue(value() & ~e.value());
}
return this;
}
/**
* Returns an array of flag objects represented by this ToolBarFeatures.
* @return array of enum entries
*/
@Override
public final @NonNull ToolBarFeature @NonNull[] flags(){
return super.flags(ToolBarFeature.values());
}
/**
* {@inheritDoc}
*/
@Override
public final @NonNull ToolBarFeatures clone(){
return new ToolBarFeatures(value());
}
/**
* {@inheritDoc}
*/
@Override
public final int compareTo(@StrictNonNull ToolBarFeatures other){
return Integer.compare(value(), other.value());
}
}
/**
* Java wrapper for Qt enum QStyleOptionToolBar::ToolBarPosition
*/
public enum ToolBarPosition implements QtEnumerator {
/**
* Representing QStyleOptionToolBar:: Beginning
*/
Beginning(0),
/**
* Representing QStyleOptionToolBar:: Middle
*/
Middle(1),
/**
* Representing QStyleOptionToolBar:: End
*/
End(2),
/**
* Representing QStyleOptionToolBar:: OnlyOne
*/
OnlyOne(3);
static {
QtJambi_LibraryUtilities.initialize();
}
private ToolBarPosition(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 ToolBarPosition resolve(int value) {
switch (value) {
case 0: return Beginning;
case 1: return Middle;
case 2: return End;
case 3: return OnlyOne;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QStyleOptionToolBar:: QStyleOptionToolBar()
*/
public QStyleOptionToolBar(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QStyleOptionToolBar instance);
/**
* See QStyleOptionToolBar:: QStyleOptionToolBar(QStyleOptionToolBar)
*/
public QStyleOptionToolBar(io.qt.widgets.@NonNull QStyleOptionToolBar other){
super((QPrivateConstructor)null);
initialize_native(this, other);
}
private native static void initialize_native(QStyleOptionToolBar instance, io.qt.widgets.QStyleOptionToolBar other);
/**
* See QStyleOptionToolBar:: operator=(QStyleOptionToolBar)
*/
@QtUninvokable
public final void assign(io.qt.widgets.@NonNull QStyleOptionToolBar arg__1){
assign_native_cref_QStyleOptionToolBar(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@QtUninvokable
private native void assign_native_cref_QStyleOptionToolBar(long __this__nativeId, long arg__1);
/**
* See QStyleOptionToolBar:: features
*/
@QtUninvokable
public final void setFeatures(io.qt.widgets.QStyleOptionToolBar.@NonNull ToolBarFeatures features){
setFeatures_native_cref_QStyleOptionToolBar_ToolBarFeatures(QtJambi_LibraryUtilities.internal.nativeId(this), features.value());
}
@QtUninvokable
private native void setFeatures_native_cref_QStyleOptionToolBar_ToolBarFeatures(long __this__nativeId, int features);
/**
* See QStyleOptionToolBar:: features
*/
@QtUninvokable
public final io.qt.widgets.QStyleOptionToolBar.@NonNull ToolBarFeatures features(){
return new io.qt.widgets.QStyleOptionToolBar.ToolBarFeatures(features_native(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int features_native(long __this__nativeId);
/**
* See QStyleOptionToolBar:: lineWidth
*/
@QtUninvokable
public final void setLineWidth(int lineWidth){
setLineWidth_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), lineWidth);
}
@QtUninvokable
private native void setLineWidth_native_int(long __this__nativeId, int lineWidth);
/**
* See QStyleOptionToolBar:: lineWidth
*/
@QtUninvokable
public final int lineWidth(){
return lineWidth_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int lineWidth_native(long __this__nativeId);
/**
* See QStyleOptionToolBar:: midLineWidth
*/
@QtUninvokable
public final void setMidLineWidth(int midLineWidth){
setMidLineWidth_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), midLineWidth);
}
@QtUninvokable
private native void setMidLineWidth_native_int(long __this__nativeId, int midLineWidth);
/**
* See QStyleOptionToolBar:: midLineWidth
*/
@QtUninvokable
public final int midLineWidth(){
return midLineWidth_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int midLineWidth_native(long __this__nativeId);
/**
* See QStyleOptionToolBar:: positionOfLine
*/
@QtUninvokable
public final void setPositionOfLine(io.qt.widgets.QStyleOptionToolBar.@NonNull ToolBarPosition positionOfLine){
setPositionOfLine_native_cref_QStyleOptionToolBar_ToolBarPosition(QtJambi_LibraryUtilities.internal.nativeId(this), positionOfLine.value());
}
@QtUninvokable
private native void setPositionOfLine_native_cref_QStyleOptionToolBar_ToolBarPosition(long __this__nativeId, int positionOfLine);
/**
* See QStyleOptionToolBar:: positionOfLine
*/
@QtUninvokable
public final io.qt.widgets.QStyleOptionToolBar.@NonNull ToolBarPosition positionOfLine(){
return io.qt.widgets.QStyleOptionToolBar.ToolBarPosition.resolve(positionOfLine_native(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int positionOfLine_native(long __this__nativeId);
/**
* See QStyleOptionToolBar:: positionWithinLine
*/
@QtUninvokable
public final void setPositionWithinLine(io.qt.widgets.QStyleOptionToolBar.@NonNull ToolBarPosition positionWithinLine){
setPositionWithinLine_native_cref_QStyleOptionToolBar_ToolBarPosition(QtJambi_LibraryUtilities.internal.nativeId(this), positionWithinLine.value());
}
@QtUninvokable
private native void setPositionWithinLine_native_cref_QStyleOptionToolBar_ToolBarPosition(long __this__nativeId, int positionWithinLine);
/**
* See QStyleOptionToolBar:: positionWithinLine
*/
@QtUninvokable
public final io.qt.widgets.QStyleOptionToolBar.@NonNull ToolBarPosition positionWithinLine(){
return io.qt.widgets.QStyleOptionToolBar.ToolBarPosition.resolve(positionWithinLine_native(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int positionWithinLine_native(long __this__nativeId);
/**
* See QStyleOptionToolBar:: toolBarArea
*/
@QtUninvokable
public final void setToolBarArea(io.qt.core.Qt.@NonNull ToolBarArea toolBarArea){
setToolBarArea_native_cref_Qt_ToolBarArea(QtJambi_LibraryUtilities.internal.nativeId(this), toolBarArea.value());
}
@QtUninvokable
private native void setToolBarArea_native_cref_Qt_ToolBarArea(long __this__nativeId, int toolBarArea);
/**
* See QStyleOptionToolBar:: toolBarArea
*/
@QtUninvokable
public final io.qt.core.Qt.@NonNull ToolBarArea toolBarArea(){
return io.qt.core.Qt.ToolBarArea.resolve(toolBarArea_native(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int toolBarArea_native(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QStyleOptionToolBar(QPrivateConstructor p) { super(p); }
/**
* Creates and returns a copy of this object.
See QStyleOptionToolBar:: QStyleOptionToolBar(QStyleOptionToolBar)
*/
@QtUninvokable
@Override
public QStyleOptionToolBar clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native QStyleOptionToolBar clone_native(long __this_nativeId);
/**
* @deprecated Use {@link #assign(io.qt.widgets.QStyleOptionToolBar)} instead.
*/
@Deprecated
@QtUninvokable
public final void set(io.qt.widgets.@NonNull QStyleOptionToolBar arg__1) {
assign(arg__1);
}
/**
* Overloaded function for {@link #setFeatures(io.qt.widgets.QStyleOptionToolBar.ToolBarFeatures)}.
*/
@QtUninvokable
public final void setFeatures(io.qt.widgets.QStyleOptionToolBar.@NonNull ToolBarFeature @NonNull... features) {
setFeatures(new io.qt.widgets.QStyleOptionToolBar.ToolBarFeatures(features));
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #features()} instead.
*/
@QtUninvokable
public final io.qt.widgets.QStyleOptionToolBar.@NonNull ToolBarFeatures getFeatures() {
return features();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #lineWidth()} instead.
*/
@QtUninvokable
public final int getLineWidth() {
return lineWidth();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #midLineWidth()} instead.
*/
@QtUninvokable
public final int getMidLineWidth() {
return midLineWidth();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #positionOfLine()} instead.
*/
@QtUninvokable
public final io.qt.widgets.QStyleOptionToolBar.@NonNull ToolBarPosition getPositionOfLine() {
return positionOfLine();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #positionWithinLine()} instead.
*/
@QtUninvokable
public final io.qt.widgets.QStyleOptionToolBar.@NonNull ToolBarPosition getPositionWithinLine() {
return positionWithinLine();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #toolBarArea()} instead.
*/
@QtUninvokable
public final io.qt.core.Qt.@NonNull ToolBarArea getToolBarArea() {
return toolBarArea();
}
}