|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.gui.QStyleOption
com.trolltech.qt.gui.QStyleOptionViewItem
public class QStyleOptionViewItem
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.
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.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I> |
Constructor Summary | |
---|---|
|
QStyleOptionViewItem()
Constructs a QStyleOptionViewItem, initializing the members variables to their default values. |
protected |
QStyleOptionViewItem(int version)
|
|
QStyleOptionViewItem(QStyleOptionViewItem other)
Constructs a copy of the other style option. |
Method Summary | |
---|---|
Qt.Alignment |
decorationAlignment()
Returns the alignment of the decoration for the item. |
QStyleOptionViewItem.Position |
decorationPosition()
Returns the position of the decoration for the item. |
QSize |
decorationSize()
Returns the size of the decoration for the item. |
Qt.Alignment |
displayAlignment()
Returns the alignment of the display value for the item. |
QFont |
font()
Returns the font used for the item. |
static QStyleOptionViewItem |
fromNativePointer(QNativePointer nativePointer)
This function returns the QStyleOptionViewItem instance pointed to by nativePointer |
static QNativePointer |
nativePointerArray(QStyleOptionViewItem[] array)
This function returns a QNativePointer that is pointing to the specified QStyleOptionViewItem array. |
void |
setDecorationAlignment(Qt.Alignment decorationAlignment)
Sets the alignment of the decoration for the item to decorationAlignment. |
void |
setDecorationAlignment(Qt.AlignmentFlag... decorationAlignment)
Sets the alignment of the decoration for the item to decorationAlignment. |
void |
setDecorationPosition(QStyleOptionViewItem.Position decorationPosition)
Sets the position of the decoration for the item to decorationPosition. |
void |
setDecorationSize(QSize decorationSize)
Sets the size of the decoration for the item to decorationSize. |
void |
setDisplayAlignment(Qt.Alignment displayAlignment)
Sets the alignment of the display value for the item to displayAlignment. |
void |
setDisplayAlignment(Qt.AlignmentFlag... displayAlignment)
Sets the alignment of the display value for the item to displayAlignment. |
void |
setFont(QFont font)
Sets the font used for the item to font. |
void |
setShowDecorationSelected(boolean showDecorationSelected)
Sets whether the decoration should be highlighted on selected items to showDecorationSelected. |
void |
setTextElideMode(Qt.TextElideMode textElideMode)
Sets where ellipsis should be added for text that is too long to fit into an item to textElideMode. |
boolean |
showDecorationSelected()
Returns whether the decoration should be highlighted on selected items. |
Qt.TextElideMode |
textElideMode()
Returns 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, nativePointerArray, palette, rect, setDirection, setFontMetrics, setPalette, setRect, setState, setState, setType, setVersion, state, type, version |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public QStyleOptionViewItem(QStyleOptionViewItem other)
Constructs a copy of the other style option.
public QStyleOptionViewItem()
Constructs a QStyleOptionViewItem, initializing the members variables to their default values.
protected QStyleOptionViewItem(int version)
Method Detail |
---|
public final void setShowDecorationSelected(boolean showDecorationSelected)
Sets whether the decoration should be highlighted on selected items to showDecorationSelected.
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.
public final boolean showDecorationSelected()
Returns 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.
public final void setDecorationPosition(QStyleOptionViewItem.Position decorationPosition)
Sets the position of the decoration for the item to decorationPosition.
The default value is Left.
public final QStyleOptionViewItem.Position decorationPosition()
Returns the position of the decoration for the item.
The default value is Left.
public final void setDecorationAlignment(Qt.AlignmentFlag... decorationAlignment)
Sets the alignment of the decoration for the item to decorationAlignment.
The default value is Qt::AlignLeft.
public final void setDecorationAlignment(Qt.Alignment decorationAlignment)
Sets the alignment of the decoration for the item to decorationAlignment.
The default value is Qt::AlignLeft.
public final Qt.Alignment decorationAlignment()
Returns the alignment of the decoration for the item.
The default value is Qt::AlignLeft.
public final void setDisplayAlignment(Qt.AlignmentFlag... displayAlignment)
Sets the alignment of the display value for the item to displayAlignment.
The default value is Qt::AlignLeft.
public final void setDisplayAlignment(Qt.Alignment displayAlignment)
Sets the alignment of the display value for the item to displayAlignment.
The default value is Qt::AlignLeft.
public final Qt.Alignment displayAlignment()
Returns the alignment of the display value for the item.
The default value is Qt::AlignLeft.
public final void setTextElideMode(Qt.TextElideMode textElideMode)
Sets where ellipsis should be added for text that is too long to fit into an item to textElideMode.
The default value is Qt::ElideMiddle, i.e. the ellipsis appears in the middle of the text.
public final Qt.TextElideMode textElideMode()
Returns 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.
public final void setDecorationSize(QSize decorationSize)
Sets the size of the decoration for the item to decorationSize.
The default value is QSize(-1, -1), i.e. an invalid size.
public final QSize decorationSize()
Returns the size of the decoration for the item.
The default value is QSize(-1, -1), i.e. an invalid size.
public final void setFont(QFont font)
Sets the font used for the item to font.
By default, the application's default font is used.
public final QFont font()
Returns the font used for the item.
By default, the application's default font is used.
public static QStyleOptionViewItem fromNativePointer(QNativePointer nativePointer)
nativePointer
- the QNativePointer of which object should be returned.public static QNativePointer nativePointerArray(QStyleOptionViewItem[] array)
array
- the array that the returned pointer will point to.
|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |