Qt Jambi Home

com.trolltech.qt.gui
Class QStyleOptionHeader

java.lang.Object
  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.QStyleOptionHeader
All Implemented Interfaces:
QtJambiInterface

public class QStyleOptionHeader
extends QStyleOption

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.

See Also:
QStyleOption

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

QStyleOptionHeader

public QStyleOptionHeader(QStyleOptionHeader other)

Constructs a copy of the other style option.


QStyleOptionHeader

public QStyleOptionHeader()

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


QStyleOptionHeader

protected QStyleOptionHeader(int version)

Method Detail

setSection

public final void setSection(int section)

Sets which section of the header is being painted to section.

The default value is 0.

See Also:
section

section

public final int section()

Returns which section of the header is being painted.

The default value is 0.

See Also:
setSection

setSortIndicator

public final void setSortIndicator(QStyleOptionHeader.SortIndicator sortIndicator)

Sets the direction the sort indicator should be drawn to sortIndicator.

The default value is QStyleOptionHeader::None.

See Also:
sortIndicator

sortIndicator

public final QStyleOptionHeader.SortIndicator sortIndicator()

Returns the direction the sort indicator should be drawn.

The default value is QStyleOptionHeader::None.

See Also:
setSortIndicator

setPosition

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.

See Also:
position

position

public final QStyleOptionHeader.SectionPosition position()

Returns the section's position in relation to the other sections.

The default value is QStyleOptionHeader::Beginning.

See Also:
setPosition

setIcon

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.

See Also:
icon

icon

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.

See Also:
setIcon

setTextAlignment

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.

See Also:
textAlignment

setTextAlignment

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.

See Also:
textAlignment

textAlignment

public final Qt.Alignment textAlignment()

Returns the alignment flags for the text of the header.

The default value is Qt::AlignLeft.

See Also:
setTextAlignment

setText

public final void setText(java.lang.String text)

Sets the text of the header to text.

The default value is an empty string.

See Also:
text

text

public final java.lang.String text()

Returns the text of the header.

The default value is an empty string.

See Also:
setText

setSelectedPosition

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

See Also:
selectedPosition

selectedPosition

public final QStyleOptionHeader.SelectedPosition selectedPosition()

Returns the section's position in relation to the selected section.

The default value is QStyleOptionHeader::NotAdjacent

See Also:
setSelectedPosition

setIconAlignment

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.

See Also:
iconAlignment

setIconAlignment

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.

See Also:
iconAlignment

iconAlignment

public final Qt.Alignment iconAlignment()

Returns the alignment flags for the icon of the header.

The default value is Qt::AlignLeft.

See Also:
setIconAlignment

setOrientation

public final void setOrientation(Qt.Orientation orientation)

Sets the header's orientation (horizontal or vertical) to orientation.

The default orientation is Qt::Horizontal

See Also:
orientation

orientation

public final Qt.Orientation orientation()

Returns the header's orientation (horizontal or vertical).

The default orientation is Qt::Horizontal

See Also:
setOrientation

fromNativePointer

public static QStyleOptionHeader fromNativePointer(QNativePointer nativePointer)
This function returns the QStyleOptionHeader instance pointed to by nativePointer

Parameters:
nativePointer - the QNativePointer of which object should be returned.

nativePointerArray

public static QNativePointer nativePointerArray(QStyleOptionHeader[] array)
This function returns a QNativePointer that is pointing to the specified QStyleOptionHeader array.

Parameters:
array - the array that the returned pointer will point to.
Returns:
a QNativePointer that is pointing to the specified array.

Qt Jambi Home