<class name="QStyleOptionToolButton" doc="/** <p>The <a href="QStyleOptionToolButton.html#QStyleOptionToolButton(int)"><tt>QStyleOptionToolButton</tt></a> class is used to describe the parameters for drawing a tool button.</p> <p><a href="QStyleOptionToolButton.html#QStyleOptionToolButton(int)"><tt>QStyleOptionToolButton</tt></a> contains all the information that <a href="QStyle.html"><tt>QStyle</tt></a> functions need to draw <a href="QToolButton.html"><tt>QToolButton</tt></a>.</p> <p>For performance reasons, the access to the member variables is direct (i.e&#x2e;, using the <tt>.</tt> or <tt>-&gt;</tt> operator). This low-level feel makes the structures straightforward to use and emphasizes that these are simply parameters used by the style functions.</p> <p>For an example demonstrating how style options can be used, see the Styles</tt> example.</p> @see <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a> @see <a href="QStyleOptionComplex.html#QStyleOptionComplex(int, int)"><tt>QStyleOptionComplex</tt></a> @see <a href="QStyleOptionButton.html"><tt>QStyleOptionButton</tt></a> */"> <method name="public QStyleOptionToolButton(com.trolltech.qt.gui.QStyleOptionToolButton other)" doc="/** <p>Constructs a copy of the <tt>other</tt> style option.</p> */"/> <method name="public QStyleOptionToolButton()" doc="/** <p>Constructs a <a href="QStyleOptionToolButton.html#QStyleOptionToolButton(int)"><tt>QStyleOptionToolButton</tt></a>, initializing the members variables to their default values.</p> */"/> <method name="protected QStyleOptionToolButton(int version)" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> */"/> <enum name="StyleOptionVersion" doc="/** <p>This enum is used to hold information about the version of the style option, and is defined for each <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a> subclass.</p> <p>The version is used by <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a> subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast(), you normally don't need to check it.</p> @see <a href="QStyleOptionToolButton.html#StyleOptionType-enum"><tt>StyleOptionType</tt></a> */"> <enum-value name="Version" doc="/** <p>1</p> */"/> </enum> <enum name="ToolButtonFeature" doc="/** <p>Describes the various features that a tool button can have.</p> @see <a href="QStyleOptionToolButton.html#features()">features</tt></a> @see <tt>QToolButton::toolButtonStyle</tt> @see <tt>QToolButton::popupMode</tt> */"> <enum-value name="None" doc="/** <p>A normal tool button.</p> */"/> <enum-value name="Arrow" doc="/** <p>The tool button is an arrow.</p> */"/> <enum-value name="Menu" doc="/** <p>The tool button has a menu.</p> */"/> <enum-value name="MenuButtonPopup" doc="/** <p>The button should display an arrow to indicate that a menu is present.</p> */"/> <enum-value name="PopupDelay" doc="/** <p>There is a delay to showing the menu.</p> */"/> <enum-value name="HasMenu" doc="/** <p>The button has a popup menu.</p> */"/> </enum> <enum name="StyleOptionType" doc="/** <p>This enum is used to hold information about the type of the style option, and is defined for each <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a> subclass.</p> <p>The type is used internally by <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a>, 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 <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a> subclass and your own styles.</p> @see <a href="QStyleOptionToolButton.html#StyleOptionVersion-enum"><tt>StyleOptionVersion</tt></a> */"> <enum-value name="Type" doc="/** <p>The type of style option provided (<a href="QStyleOption.html#OptionType-enum"><tt>SO_ToolButton</tt></a> for this class).</p> */"/> </enum> <method name="public final com.trolltech.qt.core.QSize iconSize()" doc="/** <p>Returns the size of the icon for the tool button.</p> <p>The default value is <a href="%2E%2E/core/QSize.html"><tt>QSize</tt></a>(-1, -1), i.e&#x2e; an invalid size.</p> @see <a href="QStyleOptionToolButton.html#setIconSize(com.trolltech.qt.core.QSize)"><tt>setIconSize</tt></a> */"/> <method name="public final void setIconSize(com.trolltech.qt.core.QSize iconSize)" doc="/** <p>Sets the size of the icon for the tool button to <tt>iconSize</tt>.</p> <p>The default value is <a href="%2E%2E/core/QSize.html"><tt>QSize</tt></a>(-1, -1), i.e&#x2e; an invalid size.</p> @see <a href="QStyleOptionToolButton.html#iconSize()"><tt>iconSize</tt></a> */"/> <method name="public final com.trolltech.qt.core.Qt.ToolButtonStyle toolButtonStyle()" doc="/** <p>Returns a Qt::ToolButtonStyle value describing the appearance of the tool button.</p> <p>The default value is Qt::ToolButtonIconOnly.</p> @see <a href="QStyleOptionToolButton.html#setToolButtonStyle(com.trolltech.qt.core.Qt.ToolButtonStyle)"><tt>setToolButtonStyle</tt></a> @see <tt>QToolButton::toolButtonStyle</tt> */"/> <method name="public final void setToolButtonStyle(com.trolltech.qt.core.Qt.ToolButtonStyle toolButtonStyle)" doc="/** <p>Sets a Qt::ToolButtonStyle value describing the appearance of the tool button to <tt>toolButtonStyle</tt>.</p> <p>The default value is Qt::ToolButtonIconOnly.</p> @see <tt>QToolButton::toolButtonStyle</tt> */"/> <method name="public final com.trolltech.qt.gui.QStyleOptionToolButton.ToolButtonFeatures features()" doc="/** <p>Returns an OR combination of the tool button's features.</p> <p>The default value is <a href="QStyleOptionToolButton.html#ToolButtonFeature-enum">None</tt></a>.</p> @see <a href="QStyleOptionToolButton.html#setFeatures(com.trolltech.qt.gui.QStyleOptionToolButton.ToolButtonFeatures)"><tt>setFeatures</tt></a> @see <a href="QStyleOptionToolButton.html#ToolButtonFeature-enum"><tt>ToolButtonFeature</tt></a> */"/> <method name="public final void setFeatures(com.trolltech.qt.gui.QStyleOptionToolButton.ToolButtonFeatures features)" doc="/** <p>Sets an OR combination of the tool button's features to <tt>features</tt>.</p> <p>The default value is <a href="QStyleOptionToolButton.html#ToolButtonFeature-enum">None</tt></a>.</p> @see <a href="QStyleOptionToolButton.html#features()"><tt>features</tt></a> @see <a href="QStyleOptionToolButton.html#ToolButtonFeature-enum"><tt>ToolButtonFeature</tt></a> */"/> <method name="public final com.trolltech.qt.core.Qt.ArrowType arrowType()" doc="/** <p>Returns the direction of the arrow for the tool button.</p> <p>This value is only used if <a href="QStyleOptionToolButton.html#features()">features</tt></a> includes <a href="QStyleOptionToolButton.html#ToolButtonFeature-enum">Arrow</tt></a>. The default value is Qt::DownArrow.</p> @see <a href="QStyleOptionToolButton.html#setArrowType(com.trolltech.qt.core.Qt.ArrowType)"><tt>setArrowType</tt></a> */"/> <method name="public final void setArrowType(com.trolltech.qt.core.Qt.ArrowType arrowType)" doc="/** <p>Sets the direction of the arrow for the tool button to <tt>arrowType</tt>.</p> <p>This value is only used if <a href="QStyleOptionToolButton.html#features()">features</tt></a> includes <a href="QStyleOptionToolButton.html#ToolButtonFeature-enum">Arrow</tt></a>. The default value is Qt::DownArrow.</p> @see <a href="QStyleOptionToolButton.html#arrowType()"><tt>arrowType</tt></a> */"/> <method name="public final com.trolltech.qt.gui.QIcon icon()" doc="/** <p>Returns the icon for the tool button.</p> <p>The default value is an empty icon, i.e&#x2e; an icon with neither a pixmap nor a filename.</p> @see <a href="QStyleOptionToolButton.html#setIcon(com.trolltech.qt.gui.QIcon)"><tt>setIcon</tt></a> @see <a href="QStyleOptionToolButton.html#iconSize()"><tt>iconSize</tt></a> */"/> <method name="public final void setIcon(com.trolltech.qt.gui.QIcon icon)" doc="/** <p>Sets the icon for the tool button to <tt>icon</tt>.</p> <p>The default value is an empty icon, i.e&#x2e; an icon with neither a pixmap nor a filename.</p> @see <a href="QStyleOptionToolButton.html#iconSize()"><tt>iconSize</tt></a> */"/> <method name="public final com.trolltech.qt.core.QPoint pos()" doc="/** <p>Returns the position of the tool button.</p> <p>The default value is a null point, i.e&#x2e; (0, 0)</p> @see <a href="QStyleOptionToolButton.html#setPos(com.trolltech.qt.core.QPoint)"><tt>setPos</tt></a> */"/> <method name="public final void setPos(com.trolltech.qt.core.QPoint pos)" doc="/** <p>Sets the position of the tool button to <tt>pos</tt>.</p> <p>The default value is a null point, i.e&#x2e; (0, 0)</p> @see <a href="QStyleOptionToolButton.html#pos()"><tt>pos</tt></a> */"/> <method name="public final java.lang.String text()" doc="/** <p>Returns the text of the tool button.</p> <p>This value is only used if <a href="QStyleOptionToolButton.html#toolButtonStyle()"><tt>toolButtonStyle</tt></a> is Qt::ToolButtonTextUnderIcon, Qt::ToolButtonTextBesideIcon, or Qt::ToolButtonTextOnly. The default value is an empty string.</p> @see <a href="QStyleOptionToolButton.html#setText(java.lang.String)"><tt>setText</tt></a> */"/> <method name="public final void setText(java.lang.String text)" doc="/** <p>Sets the text of the tool button to <tt>text</tt>.</p> <p>This value is only used if <a href="QStyleOptionToolButton.html#toolButtonStyle()"><tt>toolButtonStyle</tt></a> is Qt::ToolButtonTextUnderIcon, Qt::ToolButtonTextBesideIcon, or Qt::ToolButtonTextOnly. The default value is an empty string.</p> @see <a href="QStyleOptionToolButton.html#text()"><tt>text</tt></a> */"/> <method name="public final com.trolltech.qt.gui.QFont font()" doc="/** <p>Returns the font that is used for the text.</p> <p>This value is only used if <a href="QStyleOptionToolButton.html#toolButtonStyle()"><tt>toolButtonStyle</tt></a> is Qt::ToolButtonTextUnderIcon, Qt::ToolButtonTextBesideIcon, or Qt::ToolButtonTextOnly. By default, the application's default font is used.</p> @see <a href="QStyleOptionToolButton.html#setFont(com.trolltech.qt.gui.QFont)"><tt>setFont</tt></a> */"/> <method name="public final void setFont(com.trolltech.qt.gui.QFont font)" doc="/** <p>Sets the font that is used for the text to <tt>font</tt>.</p> <p>This value is only used if <a href="QStyleOptionToolButton.html#toolButtonStyle()"><tt>toolButtonStyle</tt></a> is Qt::ToolButtonTextUnderIcon, Qt::ToolButtonTextBesideIcon, or Qt::ToolButtonTextOnly. By default, the application's default font is used.</p> @see <a href="QStyleOptionToolButton.html#font()"><tt>font</tt></a> */"/> </class>