|
|||||||||
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.
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.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)
This method is used internally by Qt Jambi. |
|
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 |
---|
public QStyleOptionTab(QStyleOptionTab other)
Constructs a copy of the other style option.
public QStyleOptionTab()
Constructs a QStyleOptionTab object, initializing the members variables to their default values.
protected QStyleOptionTab(int version)
This method is used internally by Qt Jambi. Do not use it in your applications.
Method Detail |
---|
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.
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.
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.
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.
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.
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.
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.
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.
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.
public final void setShape(QTabBar.Shape shape)
Sets the tab shape used to draw the tab; by default QTabBar::RoundedNorth to shape.
public final QTabBar.Shape shape()
Returns the tab shape used to draw the tab; by default QTabBar::RoundedNorth.
public final void setText(java.lang.String text)
Sets the text of the tab to text.
The default value is an empty string.
public final java.lang.String text()
Returns the text of the tab.
The default value is an empty string.
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.
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.
public static QStyleOptionTab fromNativePointer(QNativePointer nativePointer)
nativePointer
- the QNativePointer of which object should be returned.public static QNativePointer nativePointerArray(QStyleOptionTab[] 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 |