io.qt.widgets.QStyleOptionTab Maven / Gradle / Ivy
package io.qt.widgets;
/**
* Used to describe the parameters for drawing a tab bar
* Java wrapper for Qt class QStyleOptionTab
*/
public class QStyleOptionTab extends io.qt.widgets.QStyleOption
implements java.lang.Cloneable
{
/**
* Java wrapper for Qt enum QStyleOptionTab::CornerWidget
*
* @see CornerWidgets
*/
public enum CornerWidget implements io.qt.QtFlagEnumerator {
NoCornerWidgets(0),
LeftCornerWidget(1),
RightCornerWidget(2);
private CornerWidget(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Create a QFlags of the enum entry.
* @return QFlags
*/
public CornerWidgets asFlags() {
return new CornerWidgets(value);
}
/**
* Combines this entry with other enum entry.
* @param e enum entry
* @return new flag
*/
public CornerWidgets combined(CornerWidget e) {
return new CornerWidgets(this, e);
}
/**
* Creates a new {@link CornerWidgets} from the entries.
* @param values entries
* @return new flag
*/
public static CornerWidgets flags(CornerWidget ... values) {
return new CornerWidgets(values);
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static CornerWidget resolve(int value) {
switch (value) {
case 0: return NoCornerWidgets;
case 1: return LeftCornerWidget;
case 2: return RightCornerWidget;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* QFlags type for enum {@link CornerWidget}
*/
public static final class CornerWidgets extends io.qt.QFlags implements Comparable {
private static final long serialVersionUID = 0x4af7f516cae3bc48L;
/**
* Creates a new CornerWidgets where the flags in args
are set.
* @param args enum entries
*/
public CornerWidgets(CornerWidget ... args){
super(args);
}
/**
* Creates a new CornerWidgets with given value
.
* @param value
*/
public CornerWidgets(int value) {
super(value);
}
/**
* Combines this flags with enum entry.
* @param e enum entry
* @return new CornerWidgets
*/
@Override
public final CornerWidgets combined(CornerWidget e){
return new CornerWidgets(value() | e.value());
}
/**
* Sets the flag e
* @param e enum entry
* @return this
*/
public final CornerWidgets setFlag(CornerWidget e){
super.setFlag(e);
return this;
}
/**
* Sets or clears the flag flag
* @param e enum entry
* @param on set (true) or clear (false)
* @return this
*/
public final CornerWidgets setFlag(CornerWidget e, boolean on){
super.setFlag(e, on);
return this;
}
/**
* Returns an array of flag objects represented by this CornerWidgets.
* @return array of enum entries
*/
@Override
public final CornerWidget[] flags(){
return super.flags(CornerWidget.values());
}
/**
* {@inheritDoc}
*/
@Override
public final CornerWidgets clone(){
return new CornerWidgets(value());
}
/**
* {@inheritDoc}
*/
@Override
public final int compareTo(CornerWidgets other){
return Integer.compare(value(), other.value());
}
}
/**
* Java wrapper for Qt enum QStyleOptionTab::SelectedPosition
*/
public enum SelectedPosition implements io.qt.QtEnumerator {
NotAdjacent(0),
NextIsSelected(1),
PreviousIsSelected(2);
private SelectedPosition(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 SelectedPosition resolve(int value) {
switch (value) {
case 0: return NotAdjacent;
case 1: return NextIsSelected;
case 2: return PreviousIsSelected;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* Java wrapper for Qt enum QStyleOptionTab::TabFeature
*
* @see TabFeatures
*/
public enum TabFeature implements io.qt.QtFlagEnumerator {
None(0),
HasFrame(1);
private TabFeature(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Create a QFlags of the enum entry.
* @return QFlags
*/
public TabFeatures asFlags() {
return new TabFeatures(value);
}
/**
* Combines this entry with other enum entry.
* @param e enum entry
* @return new flag
*/
public TabFeatures combined(TabFeature e) {
return new TabFeatures(this, e);
}
/**
* Creates a new {@link TabFeatures} from the entries.
* @param values entries
* @return new flag
*/
public static TabFeatures flags(TabFeature ... values) {
return new TabFeatures(values);
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static TabFeature resolve(int value) {
switch (value) {
case 0: return None;
case 1: return HasFrame;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* QFlags type for enum {@link TabFeature}
*/
public static final class TabFeatures extends io.qt.QFlags implements Comparable {
private static final long serialVersionUID = 0x83a8b592e1d9c4dfL;
/**
* Creates a new TabFeatures where the flags in args
are set.
* @param args enum entries
*/
public TabFeatures(TabFeature ... args){
super(args);
}
/**
* Creates a new TabFeatures with given value
.
* @param value
*/
public TabFeatures(int value) {
super(value);
}
/**
* Combines this flags with enum entry.
* @param e enum entry
* @return new TabFeatures
*/
@Override
public final TabFeatures combined(TabFeature e){
return new TabFeatures(value() | e.value());
}
/**
* Sets the flag e
* @param e enum entry
* @return this
*/
public final TabFeatures setFlag(TabFeature e){
super.setFlag(e);
return this;
}
/**
* Sets or clears the flag flag
* @param e enum entry
* @param on set (true) or clear (false)
* @return this
*/
public final TabFeatures setFlag(TabFeature e, boolean on){
super.setFlag(e, on);
return this;
}
/**
* Returns an array of flag objects represented by this TabFeatures.
* @return array of enum entries
*/
@Override
public final TabFeature[] flags(){
return super.flags(TabFeature.values());
}
/**
* {@inheritDoc}
*/
@Override
public final TabFeatures clone(){
return new TabFeatures(value());
}
/**
* {@inheritDoc}
*/
@Override
public final int compareTo(TabFeatures other){
return Integer.compare(value(), other.value());
}
}
/**
* Java wrapper for Qt enum QStyleOptionTab::TabPosition
*/
public enum TabPosition implements io.qt.QtEnumerator {
Beginning(0),
Middle(1),
End(2),
OnlyOneTab(3);
private TabPosition(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 TabPosition resolve(int value) {
switch (value) {
case 0: return Beginning;
case 1: return Middle;
case 2: return End;
case 3: return OnlyOneTab;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QStyleOptionTab::QStyleOptionTab()
*/
public QStyleOptionTab(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QStyleOptionTab instance);
/**
* See QStyleOptionTab::QStyleOptionTab(QStyleOptionTab)
*/
public QStyleOptionTab(io.qt.widgets.QStyleOptionTab other){
super((QPrivateConstructor)null);
initialize_native(this, other);
}
private native static void initialize_native(QStyleOptionTab instance, io.qt.widgets.QStyleOptionTab other);
@io.qt.QtUninvokable
public final void set(io.qt.widgets.QStyleOptionTab arg__1){
set_native_cref_QStyleOptionTab(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@io.qt.QtUninvokable
private native void set_native_cref_QStyleOptionTab(long __this__nativeId, long arg__1);
/**
* Overloaded function for {@link #setCornerWidgets(io.qt.widgets.QStyleOptionTab.CornerWidgets)}.
*/
@io.qt.QtUninvokable
public final void setCornerWidgets(io.qt.widgets.QStyleOptionTab.CornerWidget ... cornerWidgets){
setCornerWidgets(new io.qt.widgets.QStyleOptionTab.CornerWidgets(cornerWidgets));
}
/**
* OR combination of CornerWidget values indicating the corner widgets of the tab bar
* See QStyleOptionTab::cornerWidgets
*/
@io.qt.QtUninvokable
public final void setCornerWidgets(io.qt.widgets.QStyleOptionTab.CornerWidgets cornerWidgets){
setCornerWidgets_native_cref_QFlags_QStyleOptionTab_CornerWidget_(QtJambi_LibraryUtilities.internal.nativeId(this), cornerWidgets.value());
}
@io.qt.QtUninvokable
private native void setCornerWidgets_native_cref_QFlags_QStyleOptionTab_CornerWidget_(long __this__nativeId, int cornerWidgets);
/**
* OR combination of CornerWidget values indicating the corner widgets of the tab bar
* See QStyleOptionTab::cornerWidgets
*/
@io.qt.QtUninvokable
public final io.qt.widgets.QStyleOptionTab.CornerWidgets cornerWidgets(){
return new io.qt.widgets.QStyleOptionTab.CornerWidgets(cornerWidgets_native(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int cornerWidgets_native(long __this__nativeId);
/**
* Whether the tabbar is in document mode
* See QStyleOptionTab::documentMode
*/
@io.qt.QtUninvokable
public final void setDocumentMode(boolean documentMode){
setDocumentMode_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), documentMode);
}
@io.qt.QtUninvokable
private native void setDocumentMode_native_bool(long __this__nativeId, boolean documentMode);
/**
* Whether the tabbar is in document mode
* See QStyleOptionTab::documentMode
*/
@io.qt.QtUninvokable
public final boolean documentMode(){
return documentMode_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native boolean documentMode_native(long __this__nativeId);
/**
* Overloaded function for {@link #setFeatures(io.qt.widgets.QStyleOptionTab.TabFeatures)}.
*/
@io.qt.QtUninvokable
public final void setFeatures(io.qt.widgets.QStyleOptionTab.TabFeature ... features){
setFeatures(new io.qt.widgets.QStyleOptionTab.TabFeatures(features));
}
@io.qt.QtUninvokable
public final void setFeatures(io.qt.widgets.QStyleOptionTab.TabFeatures features){
setFeatures_native_cref_QFlags_QStyleOptionTab_TabFeature_(QtJambi_LibraryUtilities.internal.nativeId(this), features.value());
}
@io.qt.QtUninvokable
private native void setFeatures_native_cref_QFlags_QStyleOptionTab_TabFeature_(long __this__nativeId, int features);
@io.qt.QtUninvokable
public final io.qt.widgets.QStyleOptionTab.TabFeatures features(){
return new io.qt.widgets.QStyleOptionTab.TabFeatures(features_native(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int features_native(long __this__nativeId);
/**
* The icon for the tab
*
*/
@io.qt.QtUninvokable
public final void setIcon(io.qt.gui.QIcon icon){
setIcon_native_cref_QIcon(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(icon));
}
@io.qt.QtUninvokable
private native void setIcon_native_cref_QIcon(long __this__nativeId, long icon);
/**
* The icon for the tab
*
*/
@io.qt.QtUninvokable
public final io.qt.gui.QIcon icon(){
return icon_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.gui.QIcon icon_native(long __this__nativeId);
/**
* The size for the icons
*
*/
@io.qt.QtUninvokable
public final void setIconSize(io.qt.core.QSize iconSize){
setIconSize_native_cref_QSize(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(iconSize));
}
@io.qt.QtUninvokable
private native void setIconSize_native_cref_QSize(long __this__nativeId, long iconSize);
/**
* The size for the icons
*
*/
@io.qt.QtUninvokable
public final io.qt.core.QSize iconSize(){
return iconSize_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QSize iconSize_native(long __this__nativeId);
/**
* The size for the left widget on the tab
* See QStyleOptionTab::leftButtonSize
*/
@io.qt.QtUninvokable
public final void setLeftButtonSize(io.qt.core.QSize leftButtonSize){
setLeftButtonSize_native_cref_QSize(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(leftButtonSize));
}
@io.qt.QtUninvokable
private native void setLeftButtonSize_native_cref_QSize(long __this__nativeId, long leftButtonSize);
/**
* The size for the left widget on the tab
* See QStyleOptionTab::leftButtonSize
*/
@io.qt.QtUninvokable
public final io.qt.core.QSize leftButtonSize(){
return leftButtonSize_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QSize leftButtonSize_native(long __this__nativeId);
/**
* The position of the tab in the tab bar
*
*/
@io.qt.QtUninvokable
public final void setPosition(io.qt.widgets.QStyleOptionTab.TabPosition position){
setPosition_native_cref_QStyleOptionTab_TabPosition(QtJambi_LibraryUtilities.internal.nativeId(this), position.value());
}
@io.qt.QtUninvokable
private native void setPosition_native_cref_QStyleOptionTab_TabPosition(long __this__nativeId, int position);
/**
* The position of the tab in the tab bar
*
*/
@io.qt.QtUninvokable
public final io.qt.widgets.QStyleOptionTab.TabPosition position(){
return io.qt.widgets.QStyleOptionTab.TabPosition.resolve(position_native(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int position_native(long __this__nativeId);
/**
* The size for the right widget on the tab
* See QStyleOptionTab::rightButtonSize
*/
@io.qt.QtUninvokable
public final void setRightButtonSize(io.qt.core.QSize rightButtonSize){
setRightButtonSize_native_cref_QSize(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(rightButtonSize));
}
@io.qt.QtUninvokable
private native void setRightButtonSize_native_cref_QSize(long __this__nativeId, long rightButtonSize);
/**
* The size for the right widget on the tab
* See QStyleOptionTab::rightButtonSize
*/
@io.qt.QtUninvokable
public final io.qt.core.QSize rightButtonSize(){
return rightButtonSize_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QSize rightButtonSize_native(long __this__nativeId);
/**
* Which row the tab is currently in
*
*/
@io.qt.QtUninvokable
public final void setRow(int row){
setRow_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), row);
}
@io.qt.QtUninvokable
private native void setRow_native_int(long __this__nativeId, int row);
/**
* Which row the tab is currently in
*
*/
@io.qt.QtUninvokable
public final int row(){
return row_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int row_native(long __this__nativeId);
/**
* The position of the selected tab in relation to this tab
* See QStyleOptionTab::selectedPosition
*/
@io.qt.QtUninvokable
public final void setSelectedPosition(io.qt.widgets.QStyleOptionTab.SelectedPosition selectedPosition){
setSelectedPosition_native_cref_QStyleOptionTab_SelectedPosition(QtJambi_LibraryUtilities.internal.nativeId(this), selectedPosition.value());
}
@io.qt.QtUninvokable
private native void setSelectedPosition_native_cref_QStyleOptionTab_SelectedPosition(long __this__nativeId, int selectedPosition);
/**
* The position of the selected tab in relation to this tab
* See QStyleOptionTab::selectedPosition
*/
@io.qt.QtUninvokable
public final io.qt.widgets.QStyleOptionTab.SelectedPosition selectedPosition(){
return io.qt.widgets.QStyleOptionTab.SelectedPosition.resolve(selectedPosition_native(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int selectedPosition_native(long __this__nativeId);
/**
* The tab shape used to draw the tab; by default QTabBar::RoundedNorth
*
*/
@io.qt.QtUninvokable
public final void setShape(io.qt.widgets.QTabBar.Shape shape){
setShape_native_cref_QTabBar_Shape(QtJambi_LibraryUtilities.internal.nativeId(this), shape.value());
}
@io.qt.QtUninvokable
private native void setShape_native_cref_QTabBar_Shape(long __this__nativeId, int shape);
/**
* The tab shape used to draw the tab; by default QTabBar::RoundedNorth
*
*/
@io.qt.QtUninvokable
public final io.qt.widgets.QTabBar.Shape shape(){
return io.qt.widgets.QTabBar.Shape.resolve(shape_native(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int shape_native(long __this__nativeId);
/**
* The index for the tab being represented
*
*/
@io.qt.QtUninvokable
public final void setTabIndex(int tabIndex){
setTabIndex_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), tabIndex);
}
@io.qt.QtUninvokable
private native void setTabIndex_native_int(long __this__nativeId, int tabIndex);
/**
* The index for the tab being represented
*
*/
@io.qt.QtUninvokable
public final int tabIndex(){
return tabIndex_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int tabIndex_native(long __this__nativeId);
/**
* The text of the tab
*
*/
@io.qt.QtUninvokable
public final void setText(java.lang.String text){
setText_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), text);
}
@io.qt.QtUninvokable
private native void setText_native_cref_QString(long __this__nativeId, java.lang.String text);
/**
* The text of the tab
*
*/
@io.qt.QtUninvokable
public final java.lang.String text(){
return text_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native java.lang.String text_native(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
*/
@io.qt.NativeAccess
protected QStyleOptionTab(QPrivateConstructor p) { super(p); }
@Override
public QStyleOptionTab clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native QStyleOptionTab clone_native(long __this_nativeId);
}