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

## com.trolltech.qt.gui
Class QStyleOptionTab

    java.lang.Object
      com.trolltech.qt.QSignalEmitter
          com.trolltech.qt.QtJambiObject
              com.trolltech.qt.gui.QStyleOption
                  com.trolltech.qt.gui.QStyleOptionTab

All Implemented Interfaces:
  QtJambiInterface

Direct Known Subclasses:
  QStyleOptionTabV2

    public class QStyleOptionTab

extends QStyleOption

The `QStyleOptionTab` class is used to describe the parameters for drawing a tab bar.

The `QStyleOptionTab` class is used for drawing several built-in Qt widgets including `QTabBar` and the panel for `QTabWidget`. Note that to describe the parameters necessary for drawing a frame in Qt 4.1 or above, you must use the `QStyleOptionFrameV2` subclass.

An instance of the QStyleOptiontabV2 class has type `SO_Tab` and version 1. 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 don't need to check it.

If you create your own `QStyle` subclass, you should handle both `QStyleOptionTab` and `QStyleOptionTabV2`.

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

See Also:
  `QStyleOptionTabV2`, `QStyleOption`

Nested Class Summary
`static class` | `QStyleOptionTab.CornerWidget` These flags indicate the corner widgets in a tab.
`static class` | `QStyleOptionTab.CornerWidgets` This QFlag class provides flags for the int enum.
`static class` | `QStyleOptionTab.SelectedPosition` This enum describes the position of the selected tab.
`static class` | `QStyleOptionTab.StyleOptionType` This enum is used to hold information about the type of the style option, and is defined for each `QStyleOption` subclass.
`static class` | `QStyleOptionTab.StyleOptionVersion` This enum is used to hold information about the version of the style option, and is defined for each `QStyleOption` subclass.
`static class` | `QStyleOptionTab.TabPosition` This enum describes the position of the tab.

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
`` | `QStyleOptionTab()` Constructs a `QStyleOptionTab` object, initializing the members variables to their default values.
`protected` | `QStyleOptionTab(int version)`
`` | `QStyleOptionTab(QStyleOptionTab other)` Constructs a copy of the `other` style option.

Method Summary
`QStyleOptionTab.CornerWidgets` | `cornerWidgets()` Returns an OR combination of `CornerWidget` values indicating the corner widgets of the tab bar.
`static QStyleOptionTab` | `fromNativePointer(QNativePointer nativePointer)` This function returns the QStyleOptionTab instance pointed to by nativePointer
`QIcon` | `icon()` Returns the icon for the tab.
`static QNativePointer` | `nativePointerArray(QStyleOptionTab[] array)` This function returns a QNativePointer that is pointing to the specified QStyleOptionTab array.
`QStyleOptionTab.TabPosition` | `position()` Returns the position of the tab in the tab bar.
`int` | `row()` Returns which row the tab is currently in.
`QStyleOptionTab.SelectedPosition` | `selectedPosition()` Returns the position of the selected tab in relation to this tab.
`void` | `setCornerWidgets(QStyleOptionTab.CornerWidget... cornerWidgets)` Sets an OR combination of `CornerWidget` values indicating the corner widgets of the tab bar to `cornerWidgets`.
`void` | `setCornerWidgets(QStyleOptionTab.CornerWidgets cornerWidgets)` Sets an OR combination of `CornerWidget` values indicating the corner widgets of the tab bar to `cornerWidgets`.
`void` | `setIcon(QIcon icon)` Sets the icon for the tab to `icon`.
`void` | `setPosition(QStyleOptionTab.TabPosition position)` Sets the position of the tab in the tab bar to `position`.
`void` | `setRow(int row)` Sets which row the tab is currently in to `row`.
`void` | `setSelectedPosition(QStyleOptionTab.SelectedPosition selectedPosition)` Sets the position of the selected tab in relation to this tab to `selectedPosition`.
`void` | `setShape(QTabBar.Shape shape)` Sets the tab shape used to draw the tab; by default QTabBar::RoundedNorth to `shape`.
`void` | `setText(java.lang.String text)` Sets the text of the tab to `text`.
`QTabBar.Shape` | `shape()` Returns the tab shape used to draw the tab; by default QTabBar::RoundedNorth.
`java.lang.String` | `text()` Returns the text of the tab.

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

### QStyleOptionTab

    public QStyleOptionTab(QStyleOptionTab other)

  Constructs a copy of the `other` style option.

### QStyleOptionTab

    public QStyleOptionTab()

  Constructs a `QStyleOptionTab` object, initializing the members variables to their default values.

### QStyleOptionTab

    protected QStyleOptionTab(int version)

Method Detail

### setRow

    public final void setRow(int row)

  Sets which row the tab is currently in to `row`.

  The default value is 0, indicating the front row. Currently this property can only be 0.

  See Also:
    `row`

### row

    public final int row()

  Returns which row the tab is currently in.

  The default value is 0, indicating the front row. Currently this property can only be 0.

  See Also:
    `setRow`

### setCornerWidgets

    public final void setCornerWidgets(QStyleOptionTab.CornerWidget... cornerWidgets)

  Sets an OR combination of `CornerWidget` values indicating the corner widgets of the tab bar to `cornerWidgets`.

  The default value is `NoCornerWidgets`.

  See Also:
    `cornerWidgets`, `CornerWidget`

### setCornerWidgets

    public final void setCornerWidgets(QStyleOptionTab.CornerWidgets cornerWidgets)

  Sets an OR combination of `CornerWidget` values indicating the corner widgets of the tab bar to `cornerWidgets`.

  The default value is `NoCornerWidgets`.

  See Also:
    `cornerWidgets`, `CornerWidget`

### cornerWidgets

    public final QStyleOptionTab.CornerWidgets cornerWidgets()

  Returns an OR combination of `CornerWidget` values indicating the corner widgets of the tab bar.

  The default value is `NoCornerWidgets`.

  See Also:
    `setCornerWidgets`, `CornerWidget`

### setPosition

    public final void setPosition(QStyleOptionTab.TabPosition position)

  Sets the position of the tab in the tab bar to `position`.

  The default value is Beginning, i.e. the tab is the first tab in the tab bar.

  See Also:
    `position`

### position

    public final QStyleOptionTab.TabPosition position()

  Returns the position of the tab in the tab bar.

  The default value is Beginning, i.e. the tab is the first tab in the tab bar.

  See Also:
    `setPosition`

### setIcon

    public final void setIcon(QIcon icon)

  Sets the icon for the tab 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 for the tab.

  The default value is an empty icon, i.e. an icon with neither a pixmap nor a filename.

  See Also:
    `setIcon`

### setShape

    public final void setShape(QTabBar.Shape shape)

  Sets the tab shape used to draw the tab; by default QTabBar::RoundedNorth to `shape`.

  See Also:
    `shape`, `QTabBar::Shape`

### shape

    public final QTabBar.Shape shape()

  Returns the tab shape used to draw the tab; by default QTabBar::RoundedNorth.

  See Also:
    `setShape`, `QTabBar::Shape`

### setText

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

  Sets the text of the tab to `text`.

  The default value is an empty string.

  See Also:
    `text`

### text

    public final java.lang.String text()

  Returns the text of the tab.

  The default value is an empty string.

  See Also:
    `setText`

### setSelectedPosition

    public final void setSelectedPosition(QStyleOptionTab.SelectedPosition selectedPosition)

  Sets the position of the selected tab in relation to this tab to `selectedPosition`.

  The default value is `NotAdjacent`, i.e. the tab is not adjacent to a selected tab nor is it the selected tab.

  See Also:
    `selectedPosition`

### selectedPosition

    public final QStyleOptionTab.SelectedPosition selectedPosition()

  Returns the position of the selected tab in relation to this tab.

  The default value is `NotAdjacent`, i.e. the tab is not adjacent to a selected tab nor is it the selected tab.

  See Also:
    `setSelectedPosition`

### fromNativePointer

    public static QStyleOptionTab fromNativePointer(QNativePointer nativePointer)

  This function returns the QStyleOptionTab instance pointed to by nativePointer

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

### nativePointerArray

    public static QNativePointer nativePointerArray(QStyleOptionTab[] array)

  This function returns a QNativePointer that is pointing to the specified QStyleOptionTab array.

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

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