|
|
||||||||||
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.QStyleOptionHeader
public class QStyleOptionHeader
The QStyleOptionHeader class is used to describe the parameters for drawing a header.
QStyleOptionHeader contains all the information that QStyle functions need to draw the item views' header pane, header sort arrow, and header label.
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 |
QStyleOptionHeader.SectionPosition
This enum lets you know where the section's position is in relation to the other sections. |
static class |
QStyleOptionHeader.SelectedPosition
This enum lets you know where the section's position is in relation to the selected section. |
static class |
QStyleOptionHeader.SortIndicator
Indicates which direction the sort indicator should be drawn |
static class |
QStyleOptionHeader.StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QStyleOption subclass. |
static class |
QStyleOptionHeader.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<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 | |
---|---|
|
QStyleOptionHeader()
Constructs a QStyleOptionHeader, initializing the members variables to their default values. |
protected |
QStyleOptionHeader(int version)
|
|
QStyleOptionHeader(QStyleOptionHeader other)
Constructs a copy of the other style option. |
Method Summary | |
---|---|
static QStyleOptionHeader |
fromNativePointer(QNativePointer nativePointer)
This function returns the QStyleOptionHeader instance pointed to by nativePointer |
QIcon |
icon()
Returns the icon of the header. |
Qt.Alignment |
iconAlignment()
Returns the alignment flags for the icon of the header. |
static QNativePointer |
nativePointerArray(QStyleOptionHeader[] array)
This function returns a QNativePointer that is pointing to the specified QStyleOptionHeader array. |
Qt.Orientation |
orientation()
Returns the header's orientation (horizontal or vertical). |
QStyleOptionHeader.SectionPosition |
position()
Returns the section's position in relation to the other sections. |
int |
section()
Returns which section of the header is being painted. |
QStyleOptionHeader.SelectedPosition |
selectedPosition()
Returns the section's position in relation to the selected section. |
void |
setIcon(QIcon icon)
Sets the icon of the header to icon. |
void |
setIconAlignment(Qt.Alignment iconAlignment)
Sets the alignment flags for the icon of the header to iconAlignment. |
void |
setIconAlignment(Qt.AlignmentFlag... iconAlignment)
Sets the alignment flags for the icon of the header to iconAlignment. |
void |
setOrientation(Qt.Orientation orientation)
Sets the header's orientation (horizontal or vertical) to orientation. |
void |
setPosition(QStyleOptionHeader.SectionPosition position)
Sets the section's position in relation to the other sections to position. |
void |
setSection(int section)
Sets which section of the header is being painted to section. |
void |
setSelectedPosition(QStyleOptionHeader.SelectedPosition selectedPosition)
Sets the section's position in relation to the selected section to selectedPosition. |
void |
setSortIndicator(QStyleOptionHeader.SortIndicator sortIndicator)
Sets the direction the sort indicator should be drawn to sortIndicator. |
void |
setText(java.lang.String text)
Sets the text of the header to text. |
void |
setTextAlignment(Qt.Alignment textAlignment)
Sets the alignment flags for the text of the header to textAlignment. |
void |
setTextAlignment(Qt.AlignmentFlag... textAlignment)
Sets the alignment flags for the text of the header to textAlignment. |
QStyleOptionHeader.SortIndicator |
sortIndicator()
Returns the direction the sort indicator should be drawn. |
java.lang.String |
text()
Returns the text of the header. |
Qt.Alignment |
textAlignment()
Returns the alignment flags for the text of the header. |
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 QStyleOptionHeader(QStyleOptionHeader other)
Constructs a copy of the other style option.
public QStyleOptionHeader()
Constructs a QStyleOptionHeader, initializing the members variables to their default values.
protected QStyleOptionHeader(int version)
Method Detail |
---|
public final void setSection(int section)
Sets which section of the header is being painted to section.
The default value is 0.
public final int section()
Returns which section of the header is being painted.
The default value is 0.
public final void setSortIndicator(QStyleOptionHeader.SortIndicator sortIndicator)
Sets the direction the sort indicator should be drawn to sortIndicator.
The default value is QStyleOptionHeader::None.
public final QStyleOptionHeader.SortIndicator sortIndicator()
Returns the direction the sort indicator should be drawn.
The default value is QStyleOptionHeader::None.
public final void setPosition(QStyleOptionHeader.SectionPosition position)
Sets the section's position in relation to the other sections to position.
The default value is QStyleOptionHeader::Beginning.
public final QStyleOptionHeader.SectionPosition position()
Returns the section's position in relation to the other sections.
The default value is QStyleOptionHeader::Beginning.
public final void setIcon(QIcon icon)
Sets the icon of the header to icon.
The default value is an empty icon, i.e. an icon with neither a pixmap nor a filename.
public final QIcon icon()
Returns the icon of the header.
The default value is an empty icon, i.e. an icon with neither a pixmap nor a filename.
public final void setTextAlignment(Qt.AlignmentFlag... textAlignment)
Sets the alignment flags for the text of the header to textAlignment.
The default value is Qt::AlignLeft.
public final void setTextAlignment(Qt.Alignment textAlignment)
Sets the alignment flags for the text of the header to textAlignment.
The default value is Qt::AlignLeft.
public final Qt.Alignment textAlignment()
Returns the alignment flags for the text of the header.
The default value is Qt::AlignLeft.
public final void setText(java.lang.String text)
Sets the text of the header to text.
The default value is an empty string.
public final java.lang.String text()
Returns the text of the header.
The default value is an empty string.
public final void setSelectedPosition(QStyleOptionHeader.SelectedPosition selectedPosition)
Sets the section's position in relation to the selected section to selectedPosition.
The default value is QStyleOptionHeader::NotAdjacent
public final QStyleOptionHeader.SelectedPosition selectedPosition()
Returns the section's position in relation to the selected section.
The default value is QStyleOptionHeader::NotAdjacent
public final void setIconAlignment(Qt.AlignmentFlag... iconAlignment)
Sets the alignment flags for the icon of the header to iconAlignment.
The default value is Qt::AlignLeft.
public final void setIconAlignment(Qt.Alignment iconAlignment)
Sets the alignment flags for the icon of the header to iconAlignment.
The default value is Qt::AlignLeft.
public final Qt.Alignment iconAlignment()
Returns the alignment flags for the icon of the header.
The default value is Qt::AlignLeft.
public final void setOrientation(Qt.Orientation orientation)
Sets the header's orientation (horizontal or vertical) to orientation.
The default orientation is Qt::Horizontal
public final Qt.Orientation orientation()
Returns the header's orientation (horizontal or vertical).
The default orientation is Qt::Horizontal
public static QStyleOptionHeader fromNativePointer(QNativePointer nativePointer)
nativePointer
- the QNativePointer of which object should be returned.public static QNativePointer nativePointerArray(QStyleOptionHeader[] 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 |