|
|||||||||
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.QStyleOptionTab
public class QStyleOptionTab
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.
QStyleOptionTabV2
, and QStyleOption
.
Nested Class Summary | |
---|---|
static class |
QStyleOptionTab.CornerWidget
These flags indicate the corner widgets in a tab. |
static class |
QStyleOptionTab.CornerWidgets
This is a flags class for com.trolltech.qt.gui.QStyleOptionTab.CornerWidget |
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 type defines where QTabWidget draws the tab row: |
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, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9 |
Constructor Summary | |
---|---|
QStyleOptionTab()
Constructs a QStyleOptionTab object, initializing the members variables to their default values. |
|
QStyleOptionTab(QStyleOptionTab other)
Constructs a copy of the other style option. |
Method Summary | |
---|---|
QStyleOptionTab |
clone()
This method is reimplemented for internal reasons |
QStyleOptionTab.CornerWidgets |
cornerWidgets()
This variable holds an OR combination of CornerWidget values indicating the corner widgets of the tab bar. |
static QStyleOptionTab |
fromNativePointer(QNativePointer nativePointer)
|
QIcon |
icon()
This variable holds the icon for the tab. |
static QNativePointer |
nativePointerArray(QStyleOptionTab[] array)
|
QStyleOptionTab.TabPosition |
position()
This variable holds the position of the tab in the tab bar. |
int |
row()
This variable holds which row the tab is currently in. |
QStyleOptionTab.SelectedPosition |
selectedPosition()
This variable holds the position of the selected tab in relation to this tab. |
void |
setCornerWidgets(QStyleOptionTab.CornerWidgets cornerWidgets)
This variable holds an OR combination of CornerWidget values indicating the corner widgets of the tab bar. |
void |
setIcon(QIcon icon)
This variable holds the icon for the tab. |
void |
setPosition(QStyleOptionTab.TabPosition position)
This variable holds the position of the tab in the tab bar. |
void |
setRow(int row)
This variable holds which row the tab is currently in. |
void |
setSelectedPosition(QStyleOptionTab.SelectedPosition selectedPosition)
This variable holds the position of the selected tab in relation to this tab. |
void |
setShape(QTabBar.Shape shape)
This variable holds the tab shape used to draw the tab; by default QTabBar::RoundedNorth . |
void |
setText(java.lang.String text)
This variable holds the text of the tab. |
QTabBar.Shape |
shape()
This variable holds the tab shape used to draw the tab; by default QTabBar::RoundedNorth . |
java.lang.String |
text()
This variable holds 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, 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 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 |
---|
public QStyleOptionTab()
QStyleOptionTab
object, initializing the members variables to their default values.
public QStyleOptionTab(QStyleOptionTab other)
Method Detail |
---|
public final void setRow(int row)
public final int row()
public final void setCornerWidgets(QStyleOptionTab.CornerWidgets cornerWidgets)
CornerWidget
values indicating the corner widgets of the tab bar. The default value is NoCornerWidgets
. CornerWidget
.
public final QStyleOptionTab.CornerWidgets cornerWidgets()
CornerWidget
values indicating the corner widgets of the tab bar. The default value is NoCornerWidgets
. CornerWidget
.
public final void setPosition(QStyleOptionTab.TabPosition position)
Beginning
, i.e. the tab is the first tab in the tab bar.
public final QStyleOptionTab.TabPosition position()
Beginning
, i.e. the tab is the first tab in the tab bar.
public final void setIcon(QIcon icon)
public final QIcon icon()
public final void setShape(QTabBar.Shape shape)
QTabBar::RoundedNorth
. QTabBar::Shape
.
public final QTabBar.Shape shape()
QTabBar::RoundedNorth
. QTabBar::Shape
.
public final void setText(java.lang.String text)
public final java.lang.String text()
public final void setSelectedPosition(QStyleOptionTab.SelectedPosition selectedPosition)
NotAdjacent
, i.e. the tab is not adjacent to a selected tab nor is it the selected tab.
public final QStyleOptionTab.SelectedPosition selectedPosition()
NotAdjacent
, i.e. the tab is not adjacent to a selected tab nor is it the selected tab.
public static QStyleOptionTab fromNativePointer(QNativePointer nativePointer)
public static QNativePointer nativePointerArray(QStyleOptionTab[] array)
public QStyleOptionTab clone()
clone
in class QStyleOption
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |