|
|
||||||||||
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.QStyleOptionComplex
com.trolltech.qt.gui.QStyleOptionToolButton
public class QStyleOptionToolButton
The QStyleOptionToolButton class is used to describe the parameters for drawing a tool button.
QStyleOptionToolButton contains all the information that QStyle functions need to draw QToolButton.
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 |
QStyleOptionToolButton.StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QStyleOption subclass. |
static class |
QStyleOptionToolButton.StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each QStyleOption subclass. |
static class |
QStyleOptionToolButton.ToolButtonFeature
Describes the various features that a tool button can have. |
static class |
QStyleOptionToolButton.ToolButtonFeatures
This QFlag class provides flags for the int enum. |
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 | |
---|---|
|
QStyleOptionToolButton()
Constructs a QStyleOptionToolButton, initializing the members variables to their default values. |
protected |
QStyleOptionToolButton(int version)
|
|
QStyleOptionToolButton(QStyleOptionToolButton other)
Constructs a copy of the other style option. |
Method Summary | |
---|---|
Qt.ArrowType |
arrowType()
Returns the direction of the arrow for the tool button. |
QStyleOptionToolButton.ToolButtonFeatures |
features()
Returns an OR combination of the tool button's features. |
QFont |
font()
Returns the font that is used for the text. |
static QStyleOptionToolButton |
fromNativePointer(QNativePointer nativePointer)
This function returns the QStyleOptionToolButton instance pointed to by nativePointer |
QIcon |
icon()
Returns the icon for the tool button. |
QSize |
iconSize()
Returns the size of the icon for the tool button. |
static QNativePointer |
nativePointerArray(QStyleOptionToolButton[] array)
This function returns a QNativePointer that is pointing to the specified QStyleOptionToolButton array. |
QPoint |
pos()
Returns the position of the tool button. |
void |
setArrowType(Qt.ArrowType arrowType)
Sets the direction of the arrow for the tool button to arrowType. |
void |
setFeatures(QStyleOptionToolButton.ToolButtonFeature... features)
Sets an OR combination of the tool button's features to features. |
void |
setFeatures(QStyleOptionToolButton.ToolButtonFeatures features)
Sets an OR combination of the tool button's features to features. |
void |
setFont(QFont font)
Sets the font that is used for the text to font. |
void |
setIcon(QIcon icon)
Sets the icon for the tool button to icon. |
void |
setIconSize(QSize iconSize)
Sets the size of the icon for the tool button to iconSize. |
void |
setPos(QPoint pos)
Sets the position of the tool button to pos. |
void |
setText(java.lang.String text)
Sets the text of the tool button to text. |
void |
setToolButtonStyle(Qt.ToolButtonStyle toolButtonStyle)
Sets a Qt::ToolButtonStyle value describing the appearance of the tool button to toolButtonStyle. |
java.lang.String |
text()
Returns the text of the tool button. |
Qt.ToolButtonStyle |
toolButtonStyle()
Returns a Qt::ToolButtonStyle value describing the appearance of the tool button. |
Methods inherited from class com.trolltech.qt.gui.QStyleOptionComplex |
---|
activeSubControls, nativePointerArray, setActiveSubControls, setSubControls, subControls |
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 QStyleOptionToolButton(QStyleOptionToolButton other)
Constructs a copy of the other style option.
public QStyleOptionToolButton()
Constructs a QStyleOptionToolButton, initializing the members variables to their default values.
protected QStyleOptionToolButton(int version)
Method Detail |
---|
public final void setIconSize(QSize iconSize)
Sets the size of the icon for the tool button to iconSize.
The default value is QSize(-1, -1), i.e. an invalid size.
public final QSize iconSize()
Returns the size of the icon for the tool button.
The default value is QSize(-1, -1), i.e. an invalid size.
public final void setToolButtonStyle(Qt.ToolButtonStyle toolButtonStyle)
Sets a Qt::ToolButtonStyle value describing the appearance of the tool button to toolButtonStyle.
The default value is Qt::ToolButtonIconOnly.
public final Qt.ToolButtonStyle toolButtonStyle()
Returns a Qt::ToolButtonStyle value describing the appearance of the tool button.
The default value is Qt::ToolButtonIconOnly.
public final void setFeatures(QStyleOptionToolButton.ToolButtonFeature... features)
Sets an OR combination of the tool button's features to features.
The default value is None.
public final void setFeatures(QStyleOptionToolButton.ToolButtonFeatures features)
Sets an OR combination of the tool button's features to features.
The default value is None.
public final QStyleOptionToolButton.ToolButtonFeatures features()
Returns an OR combination of the tool button's features.
The default value is None.
public final void setArrowType(Qt.ArrowType arrowType)
Sets the direction of the arrow for the tool button to arrowType.
This value is only used if features includes Arrow. The default value is Qt::DownArrow.
public final Qt.ArrowType arrowType()
Returns the direction of the arrow for the tool button.
This value is only used if features includes Arrow. The default value is Qt::DownArrow.
public final void setIcon(QIcon icon)
Sets the icon for the tool button 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 tool button.
The default value is an empty icon, i.e. an icon with neither a pixmap nor a filename.
public final void setPos(QPoint pos)
Sets the position of the tool button to pos.
The default value is a null point, i.e. (0, 0)
public final QPoint pos()
Returns the position of the tool button.
The default value is a null point, i.e. (0, 0)
public final void setText(java.lang.String text)
Sets the text of the tool button to text.
This value is only used if toolButtonStyle is Qt::ToolButtonTextUnderIcon, Qt::ToolButtonTextBesideIcon, or Qt::ToolButtonTextOnly. The default value is an empty string.
public final java.lang.String text()
Returns the text of the tool button.
This value is only used if toolButtonStyle is Qt::ToolButtonTextUnderIcon, Qt::ToolButtonTextBesideIcon, or Qt::ToolButtonTextOnly. The default value is an empty string.
public final void setFont(QFont font)
Sets the font that is used for the text to font.
This value is only used if toolButtonStyle is Qt::ToolButtonTextUnderIcon, Qt::ToolButtonTextBesideIcon, or Qt::ToolButtonTextOnly. By default, the application's default font is used.
public final QFont font()
Returns the font that is used for the text.
This value is only used if toolButtonStyle is Qt::ToolButtonTextUnderIcon, Qt::ToolButtonTextBesideIcon, or Qt::ToolButtonTextOnly. By default, the application's default font is used.
public static QStyleOptionToolButton fromNativePointer(QNativePointer nativePointer)
nativePointer
- the QNativePointer of which object should be returned.public static QNativePointer nativePointerArray(QStyleOptionToolButton[] 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 |