com.trolltech.qt.gui
Class QStyleOptionViewItemV4

java.lang.Object
  extended by com.trolltech.qt.internal.QSignalEmitterInternal
      extended by com.trolltech.qt.QSignalEmitter
          extended by com.trolltech.qt.QtJambiObject
              extended by com.trolltech.qt.gui.QStyleOption
                  extended by com.trolltech.qt.gui.QStyleOptionViewItem
                      extended by com.trolltech.qt.gui.QStyleOptionViewItemV2
                          extended by com.trolltech.qt.gui.QStyleOptionViewItemV3
                              extended by com.trolltech.qt.gui.QStyleOptionViewItemV4
All Implemented Interfaces:
QtJambiInterface, java.lang.Cloneable

public class QStyleOptionViewItemV4
extends QStyleOptionViewItemV3
implements java.lang.Cloneable

The QStyleOptionViewItemV4 class is used to describe the parameters necessary for drawing a frame in Qt 4. or above. QStyleOptionViewItemV4 inherits QStyleOptionViewItemV3.

An instance of the QStyleOptionViewItemV4 class has typeSO_ViewItem and version 4. The type is used internally by QStyleOption, its subclasses, and qstyleoption_cast() to determine the type of style option. In general you do not need to worry about this unless you want to create your own QStyleOption subclass and your own styles. The version is used by QStyleOption subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast(), you normally do not need to check it.

See QStyleOptionViewItemV3's detailed description for a discussion of how to handle "V3" classes.

See also:
QStyleOptionViewItem, and QStyleOption.


Nested Class Summary
static class QStyleOptionViewItemV4.StyleOptionVersion
          This enum is used to hold information about the version of the style option, and is defined for each QStyleOption subclass.
static class QStyleOptionViewItemV4.ViewItemPosition
          This enum is used to represent the placement of the item on a row.
 
Nested classes/interfaces inherited from class com.trolltech.qt.gui.QStyleOptionViewItemV2
QStyleOptionViewItemV2.ViewItemFeature, QStyleOptionViewItemV2.ViewItemFeatures
 
Nested classes/interfaces inherited from class com.trolltech.qt.gui.QStyleOptionViewItem
QStyleOptionViewItem.Position, QStyleOptionViewItem.StyleOptionType
 
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.PrivateSignal0, QSignalEmitter.PrivateSignal1, QSignalEmitter.PrivateSignal2, QSignalEmitter.PrivateSignal3, QSignalEmitter.PrivateSignal4, QSignalEmitter.PrivateSignal5, QSignalEmitter.PrivateSignal6, QSignalEmitter.PrivateSignal7, QSignalEmitter.PrivateSignal8, QSignalEmitter.PrivateSignal9, 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
QStyleOptionViewItemV4()
          Constructs a QStyleOptionViewItemV4 object.
QStyleOptionViewItemV4(QStyleOptionViewItem other)
          Constructs a QStyleOptionViewItemV4 copy of the other style option which can be either of the QStyleOptionViewItemV3 or QStyleOptionViewItem types.
QStyleOptionViewItemV4(QStyleOptionViewItemV4 other)
          Constructs a copy of other.
 
Method Summary
 QBrush backgroundBrush()
          The QBrush that should be used to paint the view items background.
 Qt.CheckState checkState()
          If this view item is checkable, i.e., ViewItemFeature::HasCheckIndicator is true, checkState is true if the item is checked; otherwise, it is false.
 QStyleOptionViewItemV4 clone()
          This method is reimplemented for internal reasons
 QIcon icon()
          The icon (if any) to be drawn in the view item.
 com.trolltech.qt.core.QModelIndex index()
          The model index that is to be drawn.
 void setBackgroundBrush(QBrush backgroundBrush)
          The QBrush that should be used to paint the view items background.
 void setCheckState(Qt.CheckState checkState)
          If this view item is checkable, i.e., ViewItemFeature::HasCheckIndicator is true, checkState is true if the item is checked; otherwise, it is false.
 void setIcon(QIcon icon)
          The icon (if any) to be drawn in the view item.
 void setIndex(com.trolltech.qt.core.QModelIndex index)
          The model index that is to be drawn.
 void setText(java.lang.String text)
          The text (if any) to be drawn in the view item.
 void setViewItemPosition(QStyleOptionViewItemV4.ViewItemPosition viewItemPosition)
          Gives the position of this view item relative to other items.
 java.lang.String text()
          The text (if any) to be drawn in the view item.
 QStyleOptionViewItemV4.ViewItemPosition viewItemPosition()
          Gives the position of this view item relative to other items.
 
Methods inherited from class com.trolltech.qt.gui.QStyleOptionViewItemV3
locale, setLocale, widget
 
Methods inherited from class com.trolltech.qt.gui.QStyleOptionViewItemV2
features, setFeatures, setFeatures
 
Methods inherited from class com.trolltech.qt.gui.QStyleOptionViewItem
decorationAlignment, decorationPosition, decorationSize, displayAlignment, font, setDecorationAlignment, setDecorationAlignment, setDecorationPosition, setDecorationSize, setDisplayAlignment, setDisplayAlignment, setFont, setShowDecorationSelected, setTextElideMode, showDecorationSelected, textElideMode
 
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

QStyleOptionViewItemV4

public QStyleOptionViewItemV4()
Constructs a QStyleOptionViewItemV4 object.


QStyleOptionViewItemV4

public QStyleOptionViewItemV4(QStyleOptionViewItem other)
Constructs a QStyleOptionViewItemV4 copy of the other style option which can be either of the QStyleOptionViewItemV3 or QStyleOptionViewItem types.

See also:
version.


QStyleOptionViewItemV4

public QStyleOptionViewItemV4(QStyleOptionViewItemV4 other)
Constructs a copy of other.

Method Detail

setCheckState

public final void setCheckState(Qt.CheckState checkState)
If this view item is checkable, i.e., ViewItemFeature::HasCheckIndicator is true, checkState is true if the item is checked; otherwise, it is false.


checkState

public final Qt.CheckState checkState()
If this view item is checkable, i.e., ViewItemFeature::HasCheckIndicator is true, checkState is true if the item is checked; otherwise, it is false.


setViewItemPosition

public final void setViewItemPosition(QStyleOptionViewItemV4.ViewItemPosition viewItemPosition)
Gives the position of this view item relative to other items. See the ViewItemPosition enum for the details.


viewItemPosition

public final QStyleOptionViewItemV4.ViewItemPosition viewItemPosition()
Gives the position of this view item relative to other items. See the ViewItemPosition enum for the details.


setIcon

public final void setIcon(QIcon icon)
The icon (if any) to be drawn in the view item.


icon

public final QIcon icon()
The icon (if any) to be drawn in the view item.


setBackgroundBrush

public final void setBackgroundBrush(QBrush backgroundBrush)
The QBrush that should be used to paint the view items background.


backgroundBrush

public final QBrush backgroundBrush()
The QBrush that should be used to paint the view items background.


setIndex

public final void setIndex(com.trolltech.qt.core.QModelIndex index)
The model index that is to be drawn.


index

public final com.trolltech.qt.core.QModelIndex index()
The model index that is to be drawn.


setText

public final void setText(java.lang.String text)
The text (if any) to be drawn in the view item.


text

public final java.lang.String text()
The text (if any) to be drawn in the view item.


clone

public QStyleOptionViewItemV4 clone()
This method is reimplemented for internal reasons

Overrides:
clone in class QStyleOptionViewItemV3