Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.trolltech.qt.gui
Class QStyleOptionViewItem

    java.lang.Object
      com.trolltech.qt.internal.QSignalEmitterInternal
          com.trolltech.qt.QSignalEmitter
              com.trolltech.qt.QtJambiObject
                  com.trolltech.qt.gui.QStyleOption
                      com.trolltech.qt.gui.QStyleOptionViewItem

All Implemented Interfaces:
  QtJambiInterface, java.lang.Cloneable

Direct Known Subclasses:
  QStyleOptionViewItemV2

    public class QStyleOptionViewItem

extends QStyleOption
implements java.lang.Cloneable

The QStyleOptionViewItem class is used to describe the parameters used to draw an item in a view widget. QStyleOptionViewItem contains all the information that `QStyle` functions need to draw the items for Qt's model/view classes.

For performance reasons, the access to the member variables is direct (i.e., using the `.` or `->` operator). This low-level feel makes the structures straightforward to use and emphasizes that these are simply parameters used by the style functions.

For an example demonstrating how style options can be used, see the Styles example.

See also:
  `QStyleOption`, and Model/View Programming.

Nested Class Summary
`static class` | `QStyleOptionViewItem.Position` This enum describes the position of the item's decoration.
`static class` | `QStyleOptionViewItem.StyleOptionType` This enum is used to hold information about the type of the style option, and is defined for each `QStyleOption` subclass.
`static class` | `QStyleOptionViewItem.StyleOptionVersion` This enum is used to hold information about the version of the style option, and is defined for each `QStyleOption` subclass.

Nested classes/interfaces inherited from class com.trolltech.qt.gui.QStyleOption
`QStyleOption.OptionType`

Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
`QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9`

Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
`com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal`

Field Summary

Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
`currentSender`

Constructor Summary
`QStyleOptionViewItem()` Constructs a QStyleOptionViewItem, initializing the members variables to their default values.
`QStyleOptionViewItem(QStyleOptionViewItem other)` Constructs a copy of the `other` style option.

Method Summary
`QStyleOptionViewItem` | `clone()` This method is reimplemented for internal reasons
`Qt.Alignment` | `decorationAlignment()` This variable holds the alignment of the decoration for the item.
`QStyleOptionViewItem.Position` | `decorationPosition()` This variable holds the position of the decoration for the item.
`QSize` | `decorationSize()` This variable holds the size of the decoration for the item.
`Qt.Alignment` | `displayAlignment()` This variable holds the alignment of the display value for the item.
`QFont` | `font()` This variable holds the font used for the item.
`void` | `setDecorationAlignment(Qt.Alignment decorationAlignment)` This variable holds the alignment of the decoration for the item.
`void` | `setDecorationAlignment(Qt.AlignmentFlag[] decorationAlignment)`
`void` | `setDecorationPosition(QStyleOptionViewItem.Position decorationPosition)` This variable holds the position of the decoration for the item.
`void` | `setDecorationSize(QSize decorationSize)` This variable holds the size of the decoration for the item.
`void` | `setDisplayAlignment(Qt.Alignment displayAlignment)` This variable holds the alignment of the display value for the item.
`void` | `setDisplayAlignment(Qt.AlignmentFlag[] displayAlignment)`
`void` | `setFont(QFont font)` This variable holds the font used for the item.
`void` | `setShowDecorationSelected(boolean showDecorationSelected)` This variable holds whether the decoration should be highlighted on selected items.
`void` | `setTextElideMode(Qt.TextElideMode textElideMode)` This variable holds where ellipsis should be added for text that is too long to fit into an item.
`boolean` | `showDecorationSelected()` This variable holds whether the decoration should be highlighted on selected items.
`Qt.TextElideMode` | `textElideMode()` This variable holds where ellipsis should be added for text that is too long to fit into an item.

Methods inherited from class com.trolltech.qt.gui.QStyleOption
`direction, fontMetrics, initFrom, palette, rect, setDirection, setFontMetrics, setPalette, setRect, setState, setState, setType, setVersion, state, type, version`

Methods inherited from class com.trolltech.qt.QtJambiObject
`dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr`

Methods inherited from class com.trolltech.qt.QSignalEmitter
`blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread`

Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
`__qt_signalInitialization`

Methods inherited from class java.lang.Object
`getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.trolltech.qt.QtJambiInterface
`disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership`

Constructor Detail

### QStyleOptionViewItem

    public QStyleOptionViewItem()

  Constructs a QStyleOptionViewItem, initializing the members variables to their default values.

### QStyleOptionViewItem

    public QStyleOptionViewItem(QStyleOptionViewItem other)

  Constructs a copy of the `other` style option.

Method Detail

### setShowDecorationSelected

    public final void setShowDecorationSelected(boolean showDecorationSelected)

  This variable holds whether the decoration should be highlighted on selected items. If this option is true, the branch and any decorations on selected items should be highlighted, indicating that the item is selected; otherwise, no highlighting is required. The default value is false.

See also:
  `QStyle::SH_ItemView_ShowDecorationSelected` , and `QAbstractItemView`.

### showDecorationSelected

    public final boolean showDecorationSelected()

  This variable holds whether the decoration should be highlighted on selected items. If this option is true, the branch and any decorations on selected items should be highlighted, indicating that the item is selected; otherwise, no highlighting is required. The default value is false.

See also:
  `QStyle::SH_ItemView_ShowDecorationSelected` , and `QAbstractItemView`.

### setDecorationPosition

    public final void setDecorationPosition(QStyleOptionViewItem.Position decorationPosition)

  This variable holds the position of the decoration for the item. The default value is `Left` .

See also:
  `Position` .

### decorationPosition

    public final QStyleOptionViewItem.Position decorationPosition()

  This variable holds the position of the decoration for the item. The default value is `Left` .

See also:
  `Position` .

### setDecorationAlignment

    public final void setDecorationAlignment(Qt.AlignmentFlag[] decorationAlignment)

### setDecorationAlignment

    public final void setDecorationAlignment(Qt.Alignment decorationAlignment)

  This variable holds the alignment of the decoration for the item. The default value is `Qt::AlignLeft` .

### decorationAlignment

    public final Qt.Alignment decorationAlignment()

  This variable holds the alignment of the decoration for the item. The default value is `Qt::AlignLeft` .

### setDisplayAlignment

    public final void setDisplayAlignment(Qt.AlignmentFlag[] displayAlignment)

### setDisplayAlignment

    public final void setDisplayAlignment(Qt.Alignment displayAlignment)

  This variable holds the alignment of the display value for the item. The default value is `Qt::AlignLeft` .

### displayAlignment

    public final Qt.Alignment displayAlignment()

  This variable holds the alignment of the display value for the item. The default value is `Qt::AlignLeft` .

### setTextElideMode

    public final void setTextElideMode(Qt.TextElideMode textElideMode)

  This variable holds where ellipsis should be added for text that is too long to fit into an item. The default value is `Qt::ElideMiddle` , i.e. the ellipsis appears in the middle of the text.

See also:
  `Qt::TextElideMode` , and `QStyle::SH_ItemView_EllipsisLocation` .

### textElideMode

    public final Qt.TextElideMode textElideMode()

  This variable holds where ellipsis should be added for text that is too long to fit into an item. The default value is `Qt::ElideMiddle` , i.e. the ellipsis appears in the middle of the text.

See also:
  `Qt::TextElideMode` , and `QStyle::SH_ItemView_EllipsisLocation` .

### setDecorationSize

    public final void setDecorationSize(QSize decorationSize)

  This variable holds the size of the decoration for the item. The default value is `QSize`(-1, -1), i.e. an invalid size.

See also:
  decorationAlignment, and decorationPosition.

### decorationSize

    public final QSize decorationSize()

  This variable holds the size of the decoration for the item. The default value is `QSize`(-1, -1), i.e. an invalid size.

See also:
  decorationAlignment, and decorationPosition.

### setFont

    public final void setFont(QFont font)

  This variable holds the font used for the item. By default, the application's default font is used.

See also:
  `QFont`.

### font

    public final QFont font()

  This variable holds the font used for the item. By default, the application's default font is used.

See also:
  `QFont`.

### clone

    public QStyleOptionViewItem clone()

  This method is reimplemented for internal reasons

  Overrides:
    `clone` in class `QStyleOption`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD