All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.qt.widgets.QStyleOptionViewItem Maven / Gradle / Ivy

The newest version!
package io.qt.widgets;


/**
 * 

Used to describe the parameters used to draw an item in a view widget

*

Java wrapper for Qt class QStyleOptionViewItem

*/ public class QStyleOptionViewItem extends io.qt.widgets.QStyleOption implements java.lang.Cloneable { @io.qt.QtPropertyMember(enabled=false) private Object __rcWidget = null; /** *

Java wrapper for Qt enum QStyleOptionViewItem::Position

*/ public enum Position implements io.qt.QtEnumerator { Left(0), Right(1), Top(2), Bottom(3); private Position(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 Position resolve(int value) { switch (value) { case 0: return Left; case 1: return Right; case 2: return Top; case 3: return Bottom; default: throw new io.qt.QNoSuchEnumValueException(value); } } private final int value; } /** *

Java wrapper for Qt enum QStyleOptionViewItem::ViewItemFeature

* * @see ViewItemFeatures */ public enum ViewItemFeature implements io.qt.QtFlagEnumerator { None(0), WrapText(1), Alternate(2), HasCheckIndicator(4), HasDisplay(8), HasDecoration(16); private ViewItemFeature(int value) { this.value = value; } /** * {@inheritDoc} */ public int value() { return value; } /** * Create a QFlags of the enum entry. * @return QFlags */ public ViewItemFeatures asFlags() { return new ViewItemFeatures(value); } /** * Combines this entry with other enum entry. * @param e enum entry * @return new flag */ public ViewItemFeatures combined(ViewItemFeature e) { return new ViewItemFeatures(this, e); } /** * Creates a new {@link ViewItemFeatures} from the entries. * @param values entries * @return new flag */ public static ViewItemFeatures flags(ViewItemFeature ... values) { return new ViewItemFeatures(values); } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static ViewItemFeature resolve(int value) { switch (value) { case 0: return None; case 1: return WrapText; case 2: return Alternate; case 4: return HasCheckIndicator; case 8: return HasDisplay; case 16: return HasDecoration; default: throw new io.qt.QNoSuchEnumValueException(value); } } private final int value; } /** * QFlags type for enum {@link ViewItemFeature} */ public static final class ViewItemFeatures extends io.qt.QFlags implements Comparable { private static final long serialVersionUID = 0x3c9059d8c8dcac85L; /** * Creates a new ViewItemFeatures where the flags in args are set. * @param args enum entries */ public ViewItemFeatures(ViewItemFeature ... args){ super(args); } /** * Creates a new ViewItemFeatures with given value. * @param value */ public ViewItemFeatures(int value) { super(value); } /** * Combines this flags with enum entry. * @param e enum entry * @return new ViewItemFeatures */ @Override public final ViewItemFeatures combined(ViewItemFeature e){ return new ViewItemFeatures(value() | e.value()); } /** * Sets the flag e * @param e enum entry * @return this */ public final ViewItemFeatures setFlag(ViewItemFeature 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 ViewItemFeatures setFlag(ViewItemFeature e, boolean on){ super.setFlag(e, on); return this; } /** * Returns an array of flag objects represented by this ViewItemFeatures. * @return array of enum entries */ @Override public final ViewItemFeature[] flags(){ return super.flags(ViewItemFeature.values()); } /** * {@inheritDoc} */ @Override public final ViewItemFeatures clone(){ return new ViewItemFeatures(value()); } /** * {@inheritDoc} */ @Override public final int compareTo(ViewItemFeatures other){ return Integer.compare(value(), other.value()); } } /** *

Java wrapper for Qt enum QStyleOptionViewItem::ViewItemPosition

*/ public enum ViewItemPosition implements io.qt.QtEnumerator { Invalid(0), Beginning(1), Middle(2), End(3), OnlyOne(4); private ViewItemPosition(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 ViewItemPosition resolve(int value) { switch (value) { case 0: return Invalid; case 1: return Beginning; case 2: return Middle; case 3: return End; case 4: return OnlyOne; default: throw new io.qt.QNoSuchEnumValueException(value); } } private final int value; } /** *

See QStyleOptionViewItem::QStyleOptionViewItem()

*/ public QStyleOptionViewItem(){ super((QPrivateConstructor)null); initialize_native(this); } private native static void initialize_native(QStyleOptionViewItem instance); /** *

See QStyleOptionViewItem::QStyleOptionViewItem(QStyleOptionViewItem)

*/ public QStyleOptionViewItem(io.qt.widgets.QStyleOptionViewItem other){ super((QPrivateConstructor)null); initialize_native(this, other); } private native static void initialize_native(QStyleOptionViewItem instance, io.qt.widgets.QStyleOptionViewItem other); @io.qt.QtUninvokable public final void set(io.qt.widgets.QStyleOptionViewItem arg__1){ set_native_cref_QStyleOptionViewItem(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1)); } @io.qt.QtUninvokable private native void set_native_cref_QStyleOptionViewItem(long __this__nativeId, long arg__1); /** *

See QStyleOptionViewItem::backgroundBrush

*/ @io.qt.QtUninvokable public final void setBackgroundBrush(io.qt.gui.QBrush backgroundBrush){ setBackgroundBrush_native_cref_QBrush(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(backgroundBrush)); } @io.qt.QtUninvokable private native void setBackgroundBrush_native_cref_QBrush(long __this__nativeId, long backgroundBrush); /** *

See QStyleOptionViewItem::backgroundBrush

*/ @io.qt.QtUninvokable public final io.qt.gui.QBrush backgroundBrush(){ return backgroundBrush_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native io.qt.gui.QBrush backgroundBrush_native(long __this__nativeId); /** *

See QStyleOptionViewItem::checkState

*/ @io.qt.QtUninvokable public final void setCheckState(io.qt.core.Qt.CheckState checkState){ setCheckState_native_cref_Qt_CheckState(QtJambi_LibraryUtilities.internal.nativeId(this), checkState.value()); } @io.qt.QtUninvokable private native void setCheckState_native_cref_Qt_CheckState(long __this__nativeId, int checkState); /** *

See QStyleOptionViewItem::checkState

*/ @io.qt.QtUninvokable public final io.qt.core.Qt.CheckState checkState(){ return io.qt.core.Qt.CheckState.resolve(checkState_native(QtJambi_LibraryUtilities.internal.nativeId(this))); } @io.qt.QtUninvokable private native int checkState_native(long __this__nativeId); /** *

Overloaded function for {@link #setDecorationAlignment(io.qt.core.Qt.Alignment)}.

*/ @io.qt.QtUninvokable public final void setDecorationAlignment(io.qt.core.Qt.AlignmentFlag ... decorationAlignment){ setDecorationAlignment(new io.qt.core.Qt.Alignment(decorationAlignment)); } /** *

The alignment of the decoration for the item

*

See QStyleOptionViewItem::decorationAlignment

*/ @io.qt.QtUninvokable public final void setDecorationAlignment(io.qt.core.Qt.Alignment decorationAlignment){ setDecorationAlignment_native_cref_QFlags_Qt_AlignmentFlag_(QtJambi_LibraryUtilities.internal.nativeId(this), decorationAlignment.value()); } @io.qt.QtUninvokable private native void setDecorationAlignment_native_cref_QFlags_Qt_AlignmentFlag_(long __this__nativeId, int decorationAlignment); /** *

The alignment of the decoration for the item

*

See QStyleOptionViewItem::decorationAlignment

*/ @io.qt.QtUninvokable public final io.qt.core.Qt.Alignment decorationAlignment(){ return new io.qt.core.Qt.Alignment(decorationAlignment_native(QtJambi_LibraryUtilities.internal.nativeId(this))); } @io.qt.QtUninvokable private native int decorationAlignment_native(long __this__nativeId); /** *

The position of the decoration for the item

*

See QStyleOptionViewItem::decorationPosition

*/ @io.qt.QtUninvokable public final void setDecorationPosition(io.qt.widgets.QStyleOptionViewItem.Position decorationPosition){ setDecorationPosition_native_cref_QStyleOptionViewItem_Position(QtJambi_LibraryUtilities.internal.nativeId(this), decorationPosition.value()); } @io.qt.QtUninvokable private native void setDecorationPosition_native_cref_QStyleOptionViewItem_Position(long __this__nativeId, int decorationPosition); /** *

The position of the decoration for the item

*

See QStyleOptionViewItem::decorationPosition

*/ @io.qt.QtUninvokable public final io.qt.widgets.QStyleOptionViewItem.Position decorationPosition(){ return io.qt.widgets.QStyleOptionViewItem.Position.resolve(decorationPosition_native(QtJambi_LibraryUtilities.internal.nativeId(this))); } @io.qt.QtUninvokable private native int decorationPosition_native(long __this__nativeId); /** *

The size of the decoration for the item

*

See QStyleOptionViewItem::decorationSize

*/ @io.qt.QtUninvokable public final void setDecorationSize(io.qt.core.QSize decorationSize){ setDecorationSize_native_cref_QSize(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(decorationSize)); } @io.qt.QtUninvokable private native void setDecorationSize_native_cref_QSize(long __this__nativeId, long decorationSize); /** *

The size of the decoration for the item

*

See QStyleOptionViewItem::decorationSize

*/ @io.qt.QtUninvokable public final io.qt.core.QSize decorationSize(){ return decorationSize_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native io.qt.core.QSize decorationSize_native(long __this__nativeId); /** *

Overloaded function for {@link #setDisplayAlignment(io.qt.core.Qt.Alignment)}.

*/ @io.qt.QtUninvokable public final void setDisplayAlignment(io.qt.core.Qt.AlignmentFlag ... displayAlignment){ setDisplayAlignment(new io.qt.core.Qt.Alignment(displayAlignment)); } /** *

The alignment of the display value for the item

*

See QStyleOptionViewItem::displayAlignment

*/ @io.qt.QtUninvokable public final void setDisplayAlignment(io.qt.core.Qt.Alignment displayAlignment){ setDisplayAlignment_native_cref_QFlags_Qt_AlignmentFlag_(QtJambi_LibraryUtilities.internal.nativeId(this), displayAlignment.value()); } @io.qt.QtUninvokable private native void setDisplayAlignment_native_cref_QFlags_Qt_AlignmentFlag_(long __this__nativeId, int displayAlignment); /** *

The alignment of the display value for the item

*

See QStyleOptionViewItem::displayAlignment

*/ @io.qt.QtUninvokable public final io.qt.core.Qt.Alignment displayAlignment(){ return new io.qt.core.Qt.Alignment(displayAlignment_native(QtJambi_LibraryUtilities.internal.nativeId(this))); } @io.qt.QtUninvokable private native int displayAlignment_native(long __this__nativeId); /** *

Overloaded function for {@link #setFeatures(io.qt.widgets.QStyleOptionViewItem.ViewItemFeatures)}.

*/ @io.qt.QtUninvokable public final void setFeatures(io.qt.widgets.QStyleOptionViewItem.ViewItemFeature ... features){ setFeatures(new io.qt.widgets.QStyleOptionViewItem.ViewItemFeatures(features)); } /** *

Bitwise OR of the features that describe this view item

*

See QStyleOptionViewItem::features

*/ @io.qt.QtUninvokable public final void setFeatures(io.qt.widgets.QStyleOptionViewItem.ViewItemFeatures features){ setFeatures_native_cref_QFlags_QStyleOptionViewItem_ViewItemFeature_(QtJambi_LibraryUtilities.internal.nativeId(this), features.value()); } @io.qt.QtUninvokable private native void setFeatures_native_cref_QFlags_QStyleOptionViewItem_ViewItemFeature_(long __this__nativeId, int features); /** *

Bitwise OR of the features that describe this view item

*

See QStyleOptionViewItem::features

*/ @io.qt.QtUninvokable public final io.qt.widgets.QStyleOptionViewItem.ViewItemFeatures features(){ return new io.qt.widgets.QStyleOptionViewItem.ViewItemFeatures(features_native(QtJambi_LibraryUtilities.internal.nativeId(this))); } @io.qt.QtUninvokable private native int features_native(long __this__nativeId); /** *

The font used for the item

*

See QStyleOptionViewItem::font

*/ @io.qt.QtUninvokable public final void setFont(io.qt.gui.QFont font){ setFont_native_cref_QFont(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(font)); } @io.qt.QtUninvokable private native void setFont_native_cref_QFont(long __this__nativeId, long font); /** *

The font used for the item

*

See QStyleOptionViewItem::font

*/ @io.qt.QtUninvokable public final io.qt.gui.QFont font(){ return font_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native io.qt.gui.QFont font_native(long __this__nativeId); /** *

See QStyleOptionViewItem::icon

*/ @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); /** *

See QStyleOptionViewItem::icon

*/ @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); /** *

See QStyleOptionViewItem::index

*/ @io.qt.QtUninvokable public final void setIndex(io.qt.core.QModelIndex index){ setIndex_native_cref_QModelIndex(QtJambi_LibraryUtilities.internal.nativeId(this), index); } @io.qt.QtUninvokable private native void setIndex_native_cref_QModelIndex(long __this__nativeId, io.qt.core.QModelIndex index); /** *

See QStyleOptionViewItem::index

*/ @io.qt.QtUninvokable public final io.qt.core.QModelIndex index(){ return index_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native io.qt.core.QModelIndex index_native(long __this__nativeId); @io.qt.QtUninvokable public final void setLocale(io.qt.core.QLocale locale){ setLocale_native_cref_QLocale(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(locale)); } @io.qt.QtUninvokable private native void setLocale_native_cref_QLocale(long __this__nativeId, long locale); @io.qt.QtUninvokable public final io.qt.core.QLocale locale(){ return locale_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native io.qt.core.QLocale locale_native(long __this__nativeId); /** *

Whether the decoration should be highlighted on selected items

*

See QStyleOptionViewItem::showDecorationSelected

*/ @io.qt.QtUninvokable public final void setShowDecorationSelected(boolean showDecorationSelected){ setShowDecorationSelected_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), showDecorationSelected); } @io.qt.QtUninvokable private native void setShowDecorationSelected_native_bool(long __this__nativeId, boolean showDecorationSelected); /** *

Whether the decoration should be highlighted on selected items

*

See QStyleOptionViewItem::showDecorationSelected

*/ @io.qt.QtUninvokable public final boolean showDecorationSelected(){ return showDecorationSelected_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native boolean showDecorationSelected_native(long __this__nativeId); /** *

See QStyleOptionViewItem::text

*/ @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); /** *

See QStyleOptionViewItem::text

*/ @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); /** *

Where ellipsis should be added for text that is too long to fit into an item

*

See QStyleOptionViewItem::textElideMode

*/ @io.qt.QtUninvokable public final void setTextElideMode(io.qt.core.Qt.TextElideMode textElideMode){ setTextElideMode_native_cref_Qt_TextElideMode(QtJambi_LibraryUtilities.internal.nativeId(this), textElideMode.value()); } @io.qt.QtUninvokable private native void setTextElideMode_native_cref_Qt_TextElideMode(long __this__nativeId, int textElideMode); /** *

Where ellipsis should be added for text that is too long to fit into an item

*

See QStyleOptionViewItem::textElideMode

*/ @io.qt.QtUninvokable public final io.qt.core.Qt.TextElideMode textElideMode(){ return io.qt.core.Qt.TextElideMode.resolve(textElideMode_native(QtJambi_LibraryUtilities.internal.nativeId(this))); } @io.qt.QtUninvokable private native int textElideMode_native(long __this__nativeId); /** *

See QStyleOptionViewItem::viewItemPosition

*/ @io.qt.QtUninvokable public final void setViewItemPosition(io.qt.widgets.QStyleOptionViewItem.ViewItemPosition viewItemPosition){ setViewItemPosition_native_cref_QStyleOptionViewItem_ViewItemPosition(QtJambi_LibraryUtilities.internal.nativeId(this), viewItemPosition.value()); } @io.qt.QtUninvokable private native void setViewItemPosition_native_cref_QStyleOptionViewItem_ViewItemPosition(long __this__nativeId, int viewItemPosition); /** *

See QStyleOptionViewItem::viewItemPosition

*/ @io.qt.QtUninvokable public final io.qt.widgets.QStyleOptionViewItem.ViewItemPosition viewItemPosition(){ return io.qt.widgets.QStyleOptionViewItem.ViewItemPosition.resolve(viewItemPosition_native(QtJambi_LibraryUtilities.internal.nativeId(this))); } @io.qt.QtUninvokable private native int viewItemPosition_native(long __this__nativeId); @io.qt.QtUninvokable public final void setWidget(io.qt.widgets.QWidget widget){ setWidget_native_const_QWidget_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(widget)); __rcWidget = widget; } @io.qt.QtUninvokable private native void setWidget_native_const_QWidget_ptr(long __this__nativeId, long widget); @io.qt.QtUninvokable public final io.qt.widgets.QWidget widget(){ return widget_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native io.qt.widgets.QWidget widget_native(long __this__nativeId); /** * Constructor for internal use only. * @param p expected to be null. */ @io.qt.NativeAccess protected QStyleOptionViewItem(QPrivateConstructor p) { super(p); } @Override public QStyleOptionViewItem clone() { return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } private native QStyleOptionViewItem clone_native(long __this_nativeId); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy