Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > 8e6051afcdb111a0317a58fb64c2abf5 > files > 5350

qt4-doc-4.6.3-0.2mdv2010.2.i586.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- qtoolbar.cpp -->
<head>
  <title>Qt 4.6: QToolBar Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a name="//apple_ref/cpp/cl//QToolBar"></a>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td></tr></table><h1 class="title">QToolBar Class Reference<br /><span class="small-subtitle">[<a href="qtgui.html">QtGui</a> module]</span>
</h1>
<p>The QToolBar class provides a movable panel that contains a set of controls. <a href="#details">More...</a></p>
<pre> #include &lt;QToolBar&gt;</pre><p>Inherits <a href="qwidget.html">QWidget</a>.</p>
<ul>
<li><a href="qtoolbar-members.html">List of all members, including inherited members</a></li>
<li><a href="qtoolbar-qt3.html">Qt 3 support members</a></li>
</ul>
<hr />
<a name="properties"></a>
<h2>Properties</h2>
<p><table class="propsummary" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td width="45%" valign="top"><ul>
<li><div class="fn"><b><a href="qtoolbar.html#allowedAreas-prop">allowedAreas</a></b> : Qt::ToolBarAreas</div></li>
<li><div class="fn"><b><a href="qtoolbar.html#floatable-prop">floatable</a></b> : bool</div></li>
<li><div class="fn"><b><a href="qtoolbar.html#floating-prop">floating</a></b> : const bool</div></li>
<li><div class="fn"><b><a href="qtoolbar.html#iconSize-prop">iconSize</a></b> : QSize</div></li>
</ul></td><td valign="top"><ul>
<li><div class="fn"><b><a href="qtoolbar.html#movable-prop">movable</a></b> : bool</div></li>
<li><div class="fn"><b><a href="qtoolbar.html#orientation-prop">orientation</a></b> : Qt::Orientation</div></li>
<li><div class="fn"><b><a href="qtoolbar.html#toolButtonStyle-prop">toolButtonStyle</a></b> : Qt::ToolButtonStyle</div></li>
</ul>
</td></tr>
</table></p>
<ul>
<li><div bar="2" class="fn"></div>58 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li><div bar="2" class="fn"></div>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<hr />
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#QToolBar">QToolBar</a></b> ( const QString &amp; <i>title</i>, QWidget * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#QToolBar-2">QToolBar</a></b> ( QWidget * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#dtor.QToolBar">~QToolBar</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QAction * </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#actionAt">actionAt</a></b> ( const QPoint &amp; <i>p</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QAction * </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#actionAt-2">actionAt</a></b> ( int <i>x</i>, int <i>y</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#addAction">addAction</a></b> ( QAction * <i>action</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QAction * </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#addAction-2">addAction</a></b> ( const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QAction * </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#addAction-3">addAction</a></b> ( const QIcon &amp; <i>icon</i>, const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QAction * </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#addAction-4">addAction</a></b> ( const QString &amp; <i>text</i>, const QObject * <i>receiver</i>, const char * <i>member</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QAction * </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#addAction-5">addAction</a></b> ( const QIcon &amp; <i>icon</i>, const QString &amp; <i>text</i>, const QObject * <i>receiver</i>, const char * <i>member</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QAction * </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#addSeparator">addSeparator</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QAction * </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#addWidget">addWidget</a></b> ( QWidget * <i>widget</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Qt::ToolBarAreas </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#allowedAreas-prop">allowedAreas</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#clear">clear</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QSize </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#iconSize-prop">iconSize</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QAction * </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#insertSeparator">insertSeparator</a></b> ( QAction * <i>before</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QAction * </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#insertWidget">insertWidget</a></b> ( QAction * <i>before</i>, QWidget * <i>widget</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#isAreaAllowed">isAreaAllowed</a></b> ( Qt::ToolBarArea <i>area</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#floatable-prop">isFloatable</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#floating-prop">isFloating</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#movable-prop">isMovable</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Qt::Orientation </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#orientation-prop">orientation</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#allowedAreas-prop">setAllowedAreas</a></b> ( Qt::ToolBarAreas <i>areas</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#floatable-prop">setFloatable</a></b> ( bool <i>floatable</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#movable-prop">setMovable</a></b> ( bool <i>movable</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#orientation-prop">setOrientation</a></b> ( Qt::Orientation <i>orientation</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QAction * </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#toggleViewAction">toggleViewAction</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Qt::ToolButtonStyle </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#toolButtonStyle-prop">toolButtonStyle</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QWidget * </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#widgetForAction">widgetForAction</a></b> ( QAction * <i>action</i> ) const</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>217 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li><div bar="2" class="fn"></div>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li><div bar="2" class="fn"></div>13 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<hr />
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#iconSize-prop">setIconSize</a></b> ( const QSize &amp; <i>iconSize</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#toolButtonStyle-prop">setToolButtonStyle</a></b> ( Qt::ToolButtonStyle <i>toolButtonStyle</i> )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li><div bar="2" class="fn"></div>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<hr />
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#actionTriggered">actionTriggered</a></b> ( QAction * <i>action</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#allowedAreasChanged">allowedAreasChanged</a></b> ( Qt::ToolBarAreas <i>allowedAreas</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#iconSizeChanged">iconSizeChanged</a></b> ( const QSize &amp; <i>iconSize</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#movableChanged">movableChanged</a></b> ( bool <i>movable</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#orientationChanged">orientationChanged</a></b> ( Qt::Orientation <i>orientation</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#toolButtonStyleChanged">toolButtonStyleChanged</a></b> ( Qt::ToolButtonStyle <i>toolButtonStyle</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#topLevelChanged">topLevelChanged</a></b> ( bool <i>topLevel</i> )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li><div bar="2" class="fn"></div>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<hr />
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#actionEvent">actionEvent</a></b> ( QActionEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#changeEvent">changeEvent</a></b> ( QEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#childEvent">childEvent</a></b> ( QChildEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#event">event</a></b> ( QEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#paintEvent">paintEvent</a></b> ( QPaintEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#resizeEvent">resizeEvent</a></b> ( QResizeEvent * <i>event</i> )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li><div bar="2" class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li><div bar="2" class="fn"></div>1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li><div class="fn"></div>4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li><div class="fn"></div>5 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li><div class="fn"></div>37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li><div class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li><div class="fn"></div>1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
<li><div class="fn"></div>1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QToolBar class provides a movable panel that contains a set of controls.</p>
<p>Toolbar buttons are added by adding <i>actions</i>, using <a href="qtoolbar.html#addAction">addAction</a>() or <a href="qwidget.html#insertAction">insertAction</a>(). Groups of buttons can be separated using <a href="qtoolbar.html#addSeparator">addSeparator</a>() or <a href="qtoolbar.html#insertSeparator">insertSeparator</a>(). If a toolbar button is not appropriate, a widget can be inserted instead using <a href="qtoolbar.html#addWidget">addWidget</a>() or <a href="qtoolbar.html#insertWidget">insertWidget</a>(); examples of suitable widgets are <a href="qspinbox.html">QSpinBox</a>, <a href="qdoublespinbox.html">QDoubleSpinBox</a>, and <a href="qcombobox.html">QComboBox</a>. When a toolbar button is pressed it emits the <a href="qtoolbar.html#actionTriggered">actionTriggered</a>() signal.</p>
<p>A toolbar can be fixed in place in a particular area (e.g&#x2e; at the top of the window), or it can be movable (<a href="qtoolbar.html#movable-prop">isMovable</a>()) between toolbar areas; see <a href="qtoolbar.html#allowedAreas-prop">allowedAreas</a>() and <a href="qtoolbar.html#isAreaAllowed">isAreaAllowed</a>().</p>
<p>When a toolbar is resized in such a way that it is too small to show all the items it contains, an extension button will appear as the last item in the toolbar. Pressing the extension button will pop up a menu containing the items that does not currently fit in the toolbar.</p>
<p>When a QToolBar is not a child of a <a href="qmainwindow.html">QMainWindow</a>, it looses the ability to populate the extension pop up with widgets added to the toolbar using <a href="qtoolbar.html#addWidget">addWidget</a>(). Please use widget actions created by inheriting <a href="qwidgetaction.html">QWidgetAction</a> and implementing <a href="qwidgetaction.html#createWidget">QWidgetAction::createWidget</a>() instead.</p>
<p>See also <a href="qtoolbutton.html">QToolButton</a>, <a href="qmenu.html">QMenu</a>, <a href="qaction.html">QAction</a>, and <a href="mainwindows-application.html">Application Example</a>.</p>
<hr />
<h2>Property Documentation</h2>
<a name="//apple_ref/cpp/instm/QToolBar/allowedAreas"></a>
<a name="//apple_ref/cpp/instm/QToolBar/setAllowedAreas"></a>
<a name="//apple_ref/cpp/instm/QToolBar/allowedAreasChanged"></a>
<h3 class="fn"><a name="allowedAreas-prop"></a>allowedAreas : <a href="qt.html#ToolBarArea-enum">Qt::ToolBarAreas</a></h3>
<p>This property holds areas where the toolbar may be placed.</p>
<p>The default is <a href="qt.html#ToolBarArea-enum">Qt::AllToolBarAreas</a>.</p>
<p>This property only makes sense if the toolbar is in a <a href="qmainwindow.html">QMainWindow</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">Qt::ToolBarAreas </td><td class="memItemRight" valign="bottom"><b>allowedAreas</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setAllowedAreas</b> ( Qt::ToolBarAreas <i>areas</i> )</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#allowedAreasChanged">allowedAreasChanged</a></b> ( Qt::ToolBarAreas <i>allowedAreas</i> )</td></tr>
</table>
<p>See also <a href="qtoolbar.html#movable-prop">movable</a>.</p>
<a name="//apple_ref/cpp/instm/QToolBar/isFloatable"></a>
<a name="//apple_ref/cpp/instm/QToolBar/setFloatable"></a>
<h3 class="fn"><a name="floatable-prop"></a>floatable : bool</h3>
<p>This property holds whether the toolbar can be dragged and dropped as an independent window.</p>
<p>The default is true.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>isFloatable</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setFloatable</b> ( bool <i>floatable</i> )</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QToolBar/isFloating"></a>
<h3 class="fn"><a name="floating-prop"></a>floating : const bool</h3>
<p>This property holds whether the toolbar is an independent window.</p>
<p>By default, this property is true.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>isFloating</b> () const</td></tr>
</table>
<p>See also <a href="qwidget.html#isWindow">QWidget::isWindow</a>().</p>
<a name="//apple_ref/cpp/instm/QToolBar/iconSize"></a>
<a name="//apple_ref/cpp/instm/QToolBar/setIconSize"></a>
<a name="//apple_ref/cpp/instm/QToolBar/iconSizeChanged"></a>
<h3 class="fn"><a name="iconSize-prop"></a>iconSize : <a href="qsize.html">QSize</a></h3>
<p>This property holds size of icons in the toolbar.</p>
<p>The default size is determined by the application's style and is derived from the <a href="qstyle.html#PixelMetric-enum">QStyle::PM_ToolBarIconSize</a> pixel metric. It is the maximum size an icon can have. Icons of smaller size will not be scaled up.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QSize </td><td class="memItemRight" valign="bottom"><b>iconSize</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setIconSize</b> ( const QSize &amp; <i>iconSize</i> )</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#iconSizeChanged">iconSizeChanged</a></b> ( const QSize &amp; <i>iconSize</i> )</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QToolBar/isMovable"></a>
<a name="//apple_ref/cpp/instm/QToolBar/setMovable"></a>
<a name="//apple_ref/cpp/instm/QToolBar/movableChanged"></a>
<h3 class="fn"><a name="movable-prop"></a>movable : bool</h3>
<p>This property holds whether the user can move the toolbar within the toolbar area, or between toolbar areas.</p>
<p>By default, this property is true.</p>
<p>This property only makes sense if the toolbar is in a <a href="qmainwindow.html">QMainWindow</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>isMovable</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setMovable</b> ( bool <i>movable</i> )</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#movableChanged">movableChanged</a></b> ( bool <i>movable</i> )</td></tr>
</table>
<p>See also <a href="qtoolbar.html#allowedAreas-prop">allowedAreas</a>.</p>
<a name="//apple_ref/cpp/instm/QToolBar/orientation"></a>
<a name="//apple_ref/cpp/instm/QToolBar/setOrientation"></a>
<a name="//apple_ref/cpp/instm/QToolBar/orientationChanged"></a>
<h3 class="fn"><a name="orientation-prop"></a>orientation : <a href="qt.html#Orientation-enum">Qt::Orientation</a></h3>
<p>This property holds orientation of the toolbar.</p>
<p>The default is <a href="qt.html#Orientation-enum">Qt::Horizontal</a>.</p>
<p>This function should not be used when the toolbar is managed by <a href="qmainwindow.html">QMainWindow</a>. You can use <a href="qmainwindow.html#addToolBar">QMainWindow::addToolBar</a>() or <a href="qmainwindow.html#insertToolBar">QMainWindow::insertToolBar</a>() if you wish to move a toolbar (that is already added to a main window) to another <a href="qt.html#ToolBarArea-enum">Qt::ToolBarArea</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">Qt::Orientation </td><td class="memItemRight" valign="bottom"><b>orientation</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setOrientation</b> ( Qt::Orientation <i>orientation</i> )</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#orientationChanged">orientationChanged</a></b> ( Qt::Orientation <i>orientation</i> )</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QToolBar/toolButtonStyle"></a>
<a name="//apple_ref/cpp/instm/QToolBar/setToolButtonStyle"></a>
<a name="//apple_ref/cpp/instm/QToolBar/toolButtonStyleChanged"></a>
<h3 class="fn"><a name="toolButtonStyle-prop"></a>toolButtonStyle : <a href="qt.html#ToolButtonStyle-enum">Qt::ToolButtonStyle</a></h3>
<p>This property holds the style of toolbar buttons.</p>
<p>This property defines the style of all tool buttons that are added as <a href="qaction.html">QAction</a>s. Note that if you add a <a href="qtoolbutton.html">QToolButton</a> with the <a href="qtoolbar.html#addWidget">addWidget</a>() method, it will not get this button style.</p>
<p>The default is <a href="qt.html#ToolButtonStyle-enum">Qt::ToolButtonIconOnly</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">Qt::ToolButtonStyle </td><td class="memItemRight" valign="bottom"><b>toolButtonStyle</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setToolButtonStyle</b> ( Qt::ToolButtonStyle <i>toolButtonStyle</i> )</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtoolbar.html#toolButtonStyleChanged">toolButtonStyleChanged</a></b> ( Qt::ToolButtonStyle <i>toolButtonStyle</i> )</td></tr>
</table>
<hr />
<h2>Member Function Documentation</h2>
<a name="//apple_ref/cpp/instm/QToolBar/QToolBar"></a>
<h3 class="fn"><a name="QToolBar"></a>QToolBar::QToolBar ( const <a href="qstring.html">QString</a> &amp; <i>title</i>, <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0 )</h3>
<p>Constructs a <a href="qtoolbar.html">QToolBar</a> with the given <i>parent</i>.</p>
<p>The given window <i>title</i> identifies the toolbar and is shown in the context menu provided by <a href="qmainwindow.html">QMainWindow</a>.</p>
<p>See also <a href="qwidget.html#windowTitle-prop">setWindowTitle</a>().</p>
<h3 class="fn"><a name="QToolBar-2"></a>QToolBar::QToolBar ( <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0 )</h3>
<p>Constructs a <a href="qtoolbar.html">QToolBar</a> with the given <i>parent</i>.</p>
<a name="//apple_ref/cpp/instm/QToolBar/~QToolBar"></a>
<h3 class="fn"><a name="dtor.QToolBar"></a>QToolBar::~QToolBar ()</h3>
<p>Destroys the toolbar.</p>
<a name="//apple_ref/cpp/instm/QToolBar/actionAt"></a>
<h3 class="fn"><a name="actionAt"></a><a href="qaction.html">QAction</a> * QToolBar::actionAt ( const <a href="qpoint.html">QPoint</a> &amp; <i>p</i> ) const</h3>
<p>Returns the action at point <i>p</i>. This function returns zero if no action was found.</p>
<p>See also <a href="qwidget.html#childAt">QWidget::childAt</a>().</p>
<h3 class="fn"><a name="actionAt-2"></a><a href="qaction.html">QAction</a> * QToolBar::actionAt ( int <i>x</i>, int <i>y</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>Returns the action at the point <i>x</i>, <i>y</i>. This function returns zero if no action was found.</p>
<a name="//apple_ref/cpp/instm/QToolBar/actionEvent"></a>
<h3 class="fn"><a name="actionEvent"></a>void QToolBar::actionEvent ( <a href="qactionevent.html">QActionEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#actionEvent">QWidget::actionEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QToolBar/actionTriggered"></a>
<h3 class="fn"><a name="actionTriggered"></a>void QToolBar::actionTriggered ( <a href="qaction.html">QAction</a> * <i>action</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when an action in this toolbar is triggered. This happens when the action's tool button is pressed, or when the action is triggered in some other way outside the tool bar. The parameter holds the triggered <i>action</i>.</p>
<a name="//apple_ref/cpp/instm/QToolBar/addAction"></a>
<h3 class="fn"><a name="addAction"></a>void QToolBar::addAction ( <a href="qaction.html">QAction</a> * <i>action</i> )</h3>
<p>This is an overloaded function.</p>
<p>Appends the action <i>action</i> to the toolbar's list of actions.</p>
<p>See also <a href="qmenu.html#addAction">QMenu::addAction</a>() and <a href="qwidget.html#addAction">QWidget::addAction</a>().</p>
<h3 class="fn"><a name="addAction-2"></a><a href="qaction.html">QAction</a> * QToolBar::addAction ( const <a href="qstring.html">QString</a> &amp; <i>text</i> )</h3>
<p>This is an overloaded function.</p>
<p>Creates a new action with the given <i>text</i>. This action is added to the end of the toolbar.</p>
<h3 class="fn"><a name="addAction-3"></a><a href="qaction.html">QAction</a> * QToolBar::addAction ( const <a href="qicon.html">QIcon</a> &amp; <i>icon</i>, const <a href="qstring.html">QString</a> &amp; <i>text</i> )</h3>
<p>This is an overloaded function.</p>
<p>Creates a new action with the given <i>icon</i> and <i>text</i>. This action is added to the end of the toolbar.</p>
<h3 class="fn"><a name="addAction-4"></a><a href="qaction.html">QAction</a> * QToolBar::addAction ( const <a href="qstring.html">QString</a> &amp; <i>text</i>, const <a href="qobject.html">QObject</a> * <i>receiver</i>, const char * <i>member</i> )</h3>
<p>This is an overloaded function.</p>
<p>Creates a new action with the given <i>text</i>. This action is added to the end of the toolbar. The action's <a href="qaction.html#triggered">triggered()</a> signal is connected to <i>member</i> in <i>receiver</i>.</p>
<h3 class="fn"><a name="addAction-5"></a><a href="qaction.html">QAction</a> * QToolBar::addAction ( const <a href="qicon.html">QIcon</a> &amp; <i>icon</i>, const <a href="qstring.html">QString</a> &amp; <i>text</i>, const <a href="qobject.html">QObject</a> * <i>receiver</i>, const char * <i>member</i> )</h3>
<p>This is an overloaded function.</p>
<p>Creates a new action with the icon <i>icon</i> and text <i>text</i>. This action is added to the end of the toolbar. The action's <a href="qaction.html#triggered">triggered()</a> signal is connected to <i>member</i> in <i>receiver</i>.</p>
<a name="//apple_ref/cpp/instm/QToolBar/addSeparator"></a>
<h3 class="fn"><a name="addSeparator"></a><a href="qaction.html">QAction</a> * QToolBar::addSeparator ()</h3>
<p>Adds a separator to the end of the toolbar.</p>
<p>See also <a href="qtoolbar.html#insertSeparator">insertSeparator</a>().</p>
<a name="//apple_ref/cpp/instm/QToolBar/addWidget"></a>
<h3 class="fn"><a name="addWidget"></a><a href="qaction.html">QAction</a> * QToolBar::addWidget ( <a href="qwidget.html">QWidget</a> * <i>widget</i> )</h3>
<p>Adds the given <i>widget</i> to the toolbar as the toolbar's last item.</p>
<p>The toolbar takes ownership of <i>widget</i>.</p>
<p>If you add a <a href="qtoolbutton.html">QToolButton</a> with this method, the tools bar's <a href="qt.html#ToolButtonStyle-enum">Qt::ToolButtonStyle</a> will not be respected.</p>
<p><b>Note:</b> You should use <a href="qaction.html#visible-prop">QAction::setVisible</a>() to change the visibility of the widget. Using <a href="qwidget.html#visible-prop">QWidget::setVisible</a>(), <a href="qwidget.html#show">QWidget::show</a>() and <a href="qwidget.html#hide">QWidget::hide</a>() does not work.</p>
<p>See also <a href="qtoolbar.html#insertWidget">insertWidget</a>().</p>
<a name="//apple_ref/cpp/instm/QToolBar/allowedAreasChanged"></a>
<h3 class="fn"><a name="allowedAreasChanged"></a>void QToolBar::allowedAreasChanged ( <a href="qt.html#ToolBarArea-enum">Qt::ToolBarAreas</a> <i>allowedAreas</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the collection of allowed areas for the toolbar is changed. The new areas in which the toolbar can be positioned are specified by <i>allowedAreas</i>.</p>
<p>See also <a href="qtoolbar.html#allowedAreas-prop">allowedAreas</a>.</p>
<a name="//apple_ref/cpp/instm/QToolBar/changeEvent"></a>
<h3 class="fn"><a name="changeEvent"></a>void QToolBar::changeEvent ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#changeEvent">QWidget::changeEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QToolBar/childEvent"></a>
<h3 class="fn"><a name="childEvent"></a>void QToolBar::childEvent ( <a href="qchildevent.html">QChildEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#childEvent">QObject::childEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QToolBar/clear"></a>
<h3 class="fn"><a name="clear"></a>void QToolBar::clear ()</h3>
<p>Removes all actions from the toolbar.</p>
<p>See also <a href="qwidget.html#removeAction">removeAction</a>().</p>
<a name="//apple_ref/cpp/instm/QToolBar/event"></a>
<h3 class="fn"><a name="event"></a>bool QToolBar::event ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#event">QObject::event</a>().</p>
<a name="//apple_ref/cpp/instm/QToolBar/iconSizeChanged"></a>
<h3 class="fn"><a name="iconSizeChanged"></a>void QToolBar::iconSizeChanged ( const <a href="qsize.html">QSize</a> &amp; <i>iconSize</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the icon size is changed. The <i>iconSize</i> parameter holds the toolbar's new icon size.</p>
<p>See also <a href="qtoolbar.html#iconSize-prop">iconSize</a> and <a href="qmainwindow.html#iconSize-prop">QMainWindow::iconSize</a>.</p>
<a name="//apple_ref/cpp/instm/QToolBar/insertSeparator"></a>
<h3 class="fn"><a name="insertSeparator"></a><a href="qaction.html">QAction</a> * QToolBar::insertSeparator ( <a href="qaction.html">QAction</a> * <i>before</i> )</h3>
<p>Inserts a separator into the toolbar in front of the toolbar item associated with the <i>before</i> action.</p>
<p>See also <a href="qtoolbar.html#addSeparator">addSeparator</a>().</p>
<a name="//apple_ref/cpp/instm/QToolBar/insertWidget"></a>
<h3 class="fn"><a name="insertWidget"></a><a href="qaction.html">QAction</a> * QToolBar::insertWidget ( <a href="qaction.html">QAction</a> * <i>before</i>, <a href="qwidget.html">QWidget</a> * <i>widget</i> )</h3>
<p>Inserts the given <i>widget</i> in front of the toolbar item associated with the <i>before</i> action.</p>
<p>Note: You should use <a href="qaction.html#visible-prop">QAction::setVisible</a>() to change the visibility of the widget. Using <a href="qwidget.html#visible-prop">QWidget::setVisible</a>(), <a href="qwidget.html#show">QWidget::show</a>() and <a href="qwidget.html#hide">QWidget::hide</a>() does not work.</p>
<p>See also <a href="qtoolbar.html#addWidget">addWidget</a>().</p>
<a name="//apple_ref/cpp/instm/QToolBar/isAreaAllowed"></a>
<h3 class="fn"><a name="isAreaAllowed"></a>bool QToolBar::isAreaAllowed ( <a href="qt.html#ToolBarArea-enum">Qt::ToolBarArea</a> <i>area</i> ) const</h3>
<p>Returns true if this toolbar is dockable in the given <i>area</i>; otherwise returns false.</p>
<a name="//apple_ref/cpp/instm/QToolBar/movableChanged"></a>
<h3 class="fn"><a name="movableChanged"></a>void QToolBar::movableChanged ( bool <i>movable</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the toolbar becomes movable or fixed. If the toolbar can be moved, <i>movable</i> is true; otherwise it is false.</p>
<p>See also <a href="qtoolbar.html#movable-prop">movable</a>.</p>
<a name="//apple_ref/cpp/instm/QToolBar/orientationChanged"></a>
<h3 class="fn"><a name="orientationChanged"></a>void QToolBar::orientationChanged ( <a href="qt.html#Orientation-enum">Qt::Orientation</a> <i>orientation</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the orientation of the toolbar changes. The new orientation is specified by the <i>orientation</i> given.</p>
<p>See also <a href="qtoolbar.html#orientation-prop">orientation</a>.</p>
<a name="//apple_ref/cpp/instm/QToolBar/paintEvent"></a>
<h3 class="fn"><a name="paintEvent"></a>void QToolBar::paintEvent ( <a href="qpaintevent.html">QPaintEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#paintEvent">QWidget::paintEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QToolBar/resizeEvent"></a>
<h3 class="fn"><a name="resizeEvent"></a>void QToolBar::resizeEvent ( <a href="qresizeevent.html">QResizeEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget::resizeEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QToolBar/toggleViewAction"></a>
<h3 class="fn"><a name="toggleViewAction"></a><a href="qaction.html">QAction</a> * QToolBar::toggleViewAction () const</h3>
<p>Returns a checkable action that can be used to show or hide this toolbar.</p>
<p>The action's text is set to the toolbar's window title.</p>
<p>See also <a href="qaction.html#text-prop">QAction::text</a> and <a href="qwidget.html#windowTitle-prop">QWidget::windowTitle</a>.</p>
<a name="//apple_ref/cpp/instm/QToolBar/toolButtonStyleChanged"></a>
<h3 class="fn"><a name="toolButtonStyleChanged"></a>void QToolBar::toolButtonStyleChanged ( <a href="qt.html#ToolButtonStyle-enum">Qt::ToolButtonStyle</a> <i>toolButtonStyle</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the tool button style is changed. The <i>toolButtonStyle</i> parameter holds the toolbar's new tool button style.</p>
<p>See also <a href="qtoolbar.html#toolButtonStyle-prop">toolButtonStyle</a> and <a href="qmainwindow.html#toolButtonStyle-prop">QMainWindow::toolButtonStyle</a>.</p>
<a name="//apple_ref/cpp/instm/QToolBar/topLevelChanged"></a>
<h3 class="fn"><a name="topLevelChanged"></a>void QToolBar::topLevelChanged ( bool <i>topLevel</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the <a href="qtoolbar.html#floating-prop">floating</a> property changes. The <i>topLevel</i> parameter is true if the toolbar is now floating; otherwise it is false.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qwidget.html#isWindow">isWindow</a>().</p>
<a name="//apple_ref/cpp/instm/QToolBar/widgetForAction"></a>
<h3 class="fn"><a name="widgetForAction"></a><a href="qwidget.html">QWidget</a> * QToolBar::widgetForAction ( <a href="qaction.html">QAction</a> * <i>action</i> ) const</h3>
<p>Returns the widget associated with the specified <i>action</i>.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qtoolbar.html#addWidget">addWidget</a>().</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="40%" align="left">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="40%" align="right"><div align="right">Qt 4.6.3</div></td>
</tr></table></div></address></body>
</html>