File: qstyleoptiontoolbutton.html

package info (click to toggle)
python-qt4 4.7.3-1%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 28,504 kB
  • ctags: 4,680
  • sloc: python: 28,738; cpp: 8,897; sh: 245; xml: 243; makefile: 150
file content (79 lines) | stat: -rw-r--r-- 13,115 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QStyleOptionToolButton Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QStyleOptionToolButton Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QStyleOptionToolButton class is used to describe the parameters for drawing a tool button. <a href="#details">More...</a></p>
<p>Inherits <a href="qstyleoptioncomplex.html">QStyleOptionComplex</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qstyleoptiontoolbutton.html#StyleOptionType-enum">StyleOptionType</a></b> { Type }</li><li><div class="fn" />enum <b><a href="qstyleoptiontoolbutton.html#StyleOptionVersion-enum">StyleOptionVersion</a></b> { Version }</li><li><div class="fn" />enum <b><a href="qstyleoptiontoolbutton.html#ToolButtonFeature-enum">ToolButtonFeature</a></b> { None, Arrow, Menu, PopupDelay, MenuButtonPopup, HasMenu }</li><li><div class="fn" />class <b><a href="qstyleoptiontoolbutton-toolbuttonfeatures.html">ToolButtonFeatures</a></b></li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qstyleoptiontoolbutton.html#QStyleOptionToolButton">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qstyleoptiontoolbutton.html#QStyleOptionToolButton-2">__init__</a></b> (<i>self</i>, QStyleOptionToolButton)</li></ul><h3>Members</h3><ul><li><div class="fn" />Qt.ArrowType <b><a href="qstyleoptiontoolbutton.html#arrowType-var">arrowType</a></b></li><li><div class="fn" />ToolButtonFeatures <b><a href="qstyleoptiontoolbutton.html#features-var">features</a></b></li><li><div class="fn" />QFont <b><a href="qstyleoptiontoolbutton.html#font-var">font</a></b></li><li><div class="fn" />QIcon <b><a href="qstyleoptiontoolbutton.html#icon-var">icon</a></b></li><li><div class="fn" />QSize <b><a href="qstyleoptiontoolbutton.html#iconSize-var">iconSize</a></b></li><li><div class="fn" />QPoint <b><a href="qstyleoptiontoolbutton.html#pos-var">pos</a></b></li><li><div class="fn" />QString <b><a href="qstyleoptiontoolbutton.html#text-var">text</a></b></li><li><div class="fn" />Qt.ToolButtonStyle <b><a href="qstyleoptiontoolbutton.html#toolButtonStyle-var">toolButtonStyle</a></b></li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QStyleOptionToolButton class is used to describe the parameters for drawing a tool button.</p>
<p>QStyleOptionToolButton contains all the information that <a href="qstyle.html">QStyle</a> functions need to draw <a href="qtoolbutton.html">QToolButton</a>.</p>
<p>For performance reasons, the access to the member variables is direct (i.e., 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 <a href="widgets-styles.html">Styles</a> example.</p>
<p>See also <a href="qstyleoption.html">QStyleOption</a>, <a href="qstyleoptioncomplex.html">QStyleOptionComplex</a>, and <a href="qstyleoptionbutton.html">QStyleOptionButton</a>.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="StyleOptionType-enum" />QStyleOptionToolButton.StyleOptionType</h3><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</a> subclass.</p>
<p><table border="1" cellpadding="2" cellspacing="1" class="valuelist" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QStyleOptionToolButton.Type</tt></td><td align="center" valign="top"><tt>SO_ToolButton</tt></td><td valign="top">The type of style option provided (<a href="qstyleoption.html#OptionType-enum">SO_ToolButton</a> for this class).</td></tr>
</table></p>
<p>The type is used internally by <a href="qstyleoption.html">QStyleOption</a>, its subclasses, and <a href="qstyleoption.html#qstyleoption_cast">qstyleoption_cast</a>() 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</a> subclass and your own styles.</p>
<p>See also <a href="qstyleoptiontoolbutton.html#StyleOptionVersion-enum">StyleOptionVersion</a>.</p>
<a name="//apple_ref/cpp/tag/QStyleOptionToolButton/StyleOptionVersion" />
<a name="//apple_ref/cpp/econst/QStyleOptionToolButton/Version" />
<h3 class="fn"><a name="StyleOptionVersion-enum" />QStyleOptionToolButton.StyleOptionVersion</h3><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</a> subclass.</p>
<p><table border="1" cellpadding="2" cellspacing="1" class="valuelist" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QStyleOptionToolButton.Version</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">1</td></tr>
</table></p>
<p>The version is used by <a href="qstyleoption.html">QStyleOption</a> subclasses to implement extensions without breaking compatibility. If you use <a href="qstyleoption.html#qstyleoption_cast">qstyleoption_cast</a>(), you normally do not need to check it.</p>
<p>See also <a href="qstyleoptiontoolbutton.html#StyleOptionType-enum">StyleOptionType</a>.</p>
<a name="//apple_ref/cpp/tag/QStyleOptionToolButton/ToolButtonFeature" />
<a name="//apple_ref/cpp/econst/QStyleOptionToolButton/None" />
<a name="//apple_ref/cpp/econst/QStyleOptionToolButton/Arrow" />
<a name="//apple_ref/cpp/econst/QStyleOptionToolButton/Menu" />
<a name="//apple_ref/cpp/econst/QStyleOptionToolButton/PopupDelay" />
<a name="//apple_ref/cpp/econst/QStyleOptionToolButton/HasMenu" />
<a name="//apple_ref/cpp/econst/QStyleOptionToolButton/MenuButtonPopup" />
<a name="//apple_ref/cpp/tdef/QStyleOptionToolButton/ToolButtonFeatures" />
<h3 class="fn"><a name="ToolButtonFeature-enum" />QStyleOptionToolButton.ToolButtonFeature</h3><p>Describes the various features that a tool button can have.</p>
<p><table border="1" cellpadding="2" cellspacing="1" class="valuelist" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QStyleOptionToolButton.None</tt></td><td align="center" valign="top"><tt>0x00</tt></td><td valign="top">A normal tool button.</td></tr>
<tr><td valign="top"><tt>QStyleOptionToolButton.Arrow</tt></td><td align="center" valign="top"><tt>0x01</tt></td><td valign="top">The tool button is an arrow.</td></tr>
<tr><td valign="top"><tt>QStyleOptionToolButton.Menu</tt></td><td align="center" valign="top"><tt>0x04</tt></td><td valign="top">The tool button has a menu.</td></tr>
<tr><td valign="top"><tt>QStyleOptionToolButton.PopupDelay</tt></td><td align="center" valign="top"><tt>0x08</tt></td><td valign="top">There is a delay to showing the menu.</td></tr>
<tr><td valign="top"><tt>QStyleOptionToolButton.HasMenu</tt></td><td align="center" valign="top"><tt>0x10</tt></td><td valign="top">The button has a popup menu.</td></tr>
<tr><td valign="top"><tt>QStyleOptionToolButton.MenuButtonPopup</tt></td><td align="center" valign="top"><tt>Menu</tt></td><td valign="top">The button should display an arrow to indicate that a menu is present.</td></tr>
</table></p>
<p>The ToolButtonFeatures type is a typedef for <a href="qflags.html">QFlags</a>&lt;ToolButtonFeature&gt;. It stores an OR combination of ToolButtonFeature values.</p>
<p>See also <a href="qstyleoptiontoolbutton.html#features-var">features</a>, <a href="qtoolbutton.html#toolButtonStyle-prop">QToolButton.toolButtonStyle</a>(), and <a href="qtoolbutton.html#popupMode-prop">QToolButton.popupMode</a>().</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QStyleOptionToolButton" />QStyleOptionToolButton.__init__ (<i>self</i>)</h3><p>Constructs a <a href="qstyleoptiontoolbutton.html">QStyleOptionToolButton</a>, initializing the members variables to their default values.</p>
<h3 class="fn"><a name="QStyleOptionToolButton-2" />QStyleOptionToolButton.__init__ (<i>self</i>, <a href="qstyleoptiontoolbutton.html">QStyleOptionToolButton</a>)</h3><p>Constructs a copy of the <i>other</i> style option.</p>
<hr /><h2>Member Documentation</h2><h3 class="fn"><a name="arrowType-var" /><a href="qt.html#ArrowType-enum">Qt.ArrowType</a> arrowType</h3><p>This variable holds the direction of the arrow for the tool button.</p>
<p>This value is only used if <a href="qstyleoptiontoolbutton.html#features-var">features</a> includes <a href="qstyleoptiontoolbutton.html#ToolButtonFeature-enum">Arrow</a>. The default value is <a href="qt.html#ArrowType-enum">Qt.DownArrow</a>.</p>
<a name="//apple_ref/cpp/data/QStyleOptionToolButton/features" />
<h3 class="fn"><a name="features-var" /><a href="qstyleoptiontoolbutton-toolbuttonfeatures.html">ToolButtonFeatures</a> features</h3><p>This variable holds an OR combination of the tool button's features.</p>
<p>The default value is <a href="qstyleoptiontoolbutton.html#ToolButtonFeature-enum">None</a>.</p>
<p>See also <a href="qstyleoptiontoolbutton.html#ToolButtonFeature-enum">ToolButtonFeature</a>.</p>
<a name="//apple_ref/cpp/data/QStyleOptionToolButton/font" />
<h3 class="fn"><a name="font-var" /><a href="qfont.html">QFont</a> font</h3><p>This variable holds the font that is used for the text.</p>
<p>This value is only used if <a href="qstyleoptiontoolbutton.html#toolButtonStyle-var">toolButtonStyle</a> is <a href="qt.html#ToolButtonStyle-enum">Qt.ToolButtonTextUnderIcon</a>, <a href="qt.html#ToolButtonStyle-enum">Qt.ToolButtonTextBesideIcon</a>, or <a href="qt.html#ToolButtonStyle-enum">Qt.ToolButtonTextOnly</a>. By default, the application's default font is used.</p>
<a name="//apple_ref/cpp/data/QStyleOptionToolButton/icon" />
<h3 class="fn"><a name="icon-var" /><a href="qicon.html">QIcon</a> icon</h3><p>This variable holds the icon for the tool button.</p>
<p>The default value is an empty icon, i.e. an icon with neither a pixmap nor a filename.</p>
<p>See also <a href="qstyleoptiontoolbutton.html#iconSize-var">iconSize</a>.</p>
<a name="//apple_ref/cpp/data/QStyleOptionToolButton/iconSize" />
<h3 class="fn"><a name="iconSize-var" /><a href="qsize.html">QSize</a> iconSize</h3><p>This variable holds the size of the icon for the tool button.</p>
<p>The default value is <a href="qsize.html">QSize</a>(-1, -1), i.e. an invalid size.</p>
<a name="//apple_ref/cpp/data/QStyleOptionToolButton/pos" />
<h3 class="fn"><a name="pos-var" /><a href="qpoint.html">QPoint</a> pos</h3><p>This variable holds the position of the tool button.</p>
<p>The default value is a null point, i.e. (0, 0)</p>
<a name="//apple_ref/cpp/data/QStyleOptionToolButton/text" />
<h3 class="fn"><a name="text-var" />QString text</h3><p>This variable holds the text of the tool button.</p>
<p>This value is only used if <a href="qstyleoptiontoolbutton.html#toolButtonStyle-var">toolButtonStyle</a> is <a href="qt.html#ToolButtonStyle-enum">Qt.ToolButtonTextUnderIcon</a>, <a href="qt.html#ToolButtonStyle-enum">Qt.ToolButtonTextBesideIcon</a>, or <a href="qt.html#ToolButtonStyle-enum">Qt.ToolButtonTextOnly</a>. The default value is an empty string.</p>
<a name="//apple_ref/cpp/data/QStyleOptionToolButton/toolButtonStyle" />
<h3 class="fn"><a name="toolButtonStyle-var" /><a href="qt.html#ToolButtonStyle-enum">Qt.ToolButtonStyle</a> toolButtonStyle</h3><p>This variable holds a Qt.ToolButtonStyle value describing the appearance of the tool button.</p>
<p>The default value is <a href="qt.html#ToolButtonStyle-enum">Qt.ToolButtonIconOnly</a>.</p>
<p>See also <a href="qtoolbutton.html#toolButtonStyle-prop">QToolButton.toolButtonStyle</a>().</p>
<p /><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.7.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt&#160;4.6.2</td></tr></table></div></address></body></html>