File: qdockwidget.html

package info (click to toggle)
python-qt4 4.0.1-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 18,632 kB
  • ctags: 2,639
  • sloc: python: 29,409; sh: 5,646; cpp: 3,168; xml: 149; makefile: 109
file content (70 lines) | stat: -rw-r--r-- 12,655 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
<?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>QDockWidget 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">QDockWidget Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QDockWidget class provides a widget that can be docked inside a <a href="qmainwindow.html">QMainWindow</a> or floated as a top-level window on the desktop. <a href="#details">More...</a></p>
<p>Inherits <a href="qwidget.html">QWidget</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qdockwidget.html#DockWidgetFeature-enum">DockWidgetFeature</a></b> { DockWidgetClosable, DockWidgetMovable, DockWidgetFloatable, DockWidgetFeatureMask, ..., Reserved }</li><li><div class="fn" />class <b><a href="qdockwidget-dockwidgetfeatures.html">DockWidgetFeatures</a></b></li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qdockwidget.html#QDockWidget">__init__</a></b> (<i>self</i>, QString&#160;<i>title</i>, QWidget&#160;<i>parent</i>&#160;=&#160;None, Qt.WindowFlags&#160;<i>flags</i>&#160;=&#160;0)</li><li><div class="fn" /><b><a href="qdockwidget.html#QDockWidget-2">__init__</a></b> (<i>self</i>, QWidget&#160;<i>parent</i>&#160;=&#160;None, Qt.WindowFlags&#160;<i>flags</i>&#160;=&#160;0)</li><li><div class="fn" />Qt.DockWidgetAreas <b><a href="qdockwidget.html#allowedAreas">allowedAreas</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdockwidget.html#changeEvent">changeEvent</a></b> (<i>self</i>, QEvent&#160;<i>event</i>)</li><li><div class="fn" /><b><a href="qdockwidget.html#closeEvent">closeEvent</a></b> (<i>self</i>, QCloseEvent&#160;<i>event</i>)</li><li><div class="fn" />bool <b><a href="qdockwidget.html#event">event</a></b> (<i>self</i>, QEvent&#160;<i>event</i>)</li><li><div class="fn" />DockWidgetFeatures <b><a href="qdockwidget.html#features">features</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qdockwidget.html#isAreaAllowed">isAreaAllowed</a></b> (<i>self</i>, Qt.DockWidgetArea&#160;<i>area</i>)</li><li><div class="fn" />bool <b><a href="qdockwidget.html#isFloating">isFloating</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdockwidget.html#paintEvent">paintEvent</a></b> (<i>self</i>, QPaintEvent&#160;<i>event</i>)</li><li><div class="fn" /><b><a href="qdockwidget.html#setAllowedAreas">setAllowedAreas</a></b> (<i>self</i>, Qt.DockWidgetAreas&#160;<i>areas</i>)</li><li><div class="fn" /><b><a href="qdockwidget.html#setFeatures">setFeatures</a></b> (<i>self</i>, DockWidgetFeatures&#160;<i>features</i>)</li><li><div class="fn" /><b><a href="qdockwidget.html#setFloating">setFloating</a></b> (<i>self</i>, bool&#160;<i>floating</i>)</li><li><div class="fn" /><b><a href="qdockwidget.html#setWidget">setWidget</a></b> (<i>self</i>, QWidget&#160;<i>widget</i>)</li><li><div class="fn" />QAction <b><a href="qdockwidget.html#toggleViewAction">toggleViewAction</a></b> (<i>self</i>)</li><li><div class="fn" />QWidget <b><a href="qdockwidget.html#widget">widget</a></b> (<i>self</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qdockwidget.html#allowedAreasChanged">allowedAreasChanged</a></b> (Qt::DockWidgetAreas)</li><li><div class="fn" />void <b><a href="qdockwidget.html#featuresChanged">featuresChanged</a></b> (QDockWidget::DockWidgetFeatures)</li><li><div class="fn" />void <b><a href="qdockwidget.html#topLevelChanged">topLevelChanged</a></b> (bool)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QDockWidget class provides a widget that can be docked inside a <a href="qmainwindow.html">QMainWindow</a> or floated as a top-level window on the desktop.</p>
<p>QDockWidget provides the concept of dock widgets, also know as tool palettes or utility windows. Dock windows are secondary windows placed in the <i>dock widget area</i> around the <a href="qmainwindow.html#centralWidget">central widget</a> in a <a href="qmainwindow.html">QMainWindow</a>.</p>
<p align="center"><img src="images/mainwindow-docks.png" /></p>
<p>Dock windows can be moved inside their current area, moved into new areas and floated (e.g. undocked) by the end-user. The QDockWidget API allows the programmer to restrict the dock widgets ability to move, float and close, as well as the areas in which they can be placed.</p>
<a id="appearance" name="appearance" />
<h3>Appearance</h3>
<p>A QDockWidget consists of a title bar and the content area. The titlebar displays the dock widgets <a href="qwidget.html#windowTitle-prop">window title</a>, a <i>float</i> button and a <i>close</i> button. Depending on the state of the QDockWidget, the <i>float</i> and <i>close</i> buttons may be either disabled or not shown at all.</p>
<p>The visual appearance of the title bar and buttons is dependent on the <a href="qstyle.html">style</a> in use.</p>
<p>See also <a href="qmainwindow.html">QMainWindow</a>.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="DockWidgetFeature-enum" />QDockWidget.DockWidgetFeature</h3><table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr>
<th width="25%">Constant</th>
<th width="15%">Value</th>
<th width="60%">Description</th>
</tr>
<tr>
<td valign="top"><tt>QDockWidget.DockWidgetClosable</tt></td>
<td align="center" valign="top"><tt>0x01</tt></td>
<td valign="top">The dock widget can be closed.</td>
</tr>
<tr>
<td valign="top"><tt>QDockWidget.DockWidgetMovable</tt></td>
<td align="center" valign="top"><tt>0x02</tt></td>
<td valign="top">The dock widget can be moved between docks by the user.</td>
</tr>
<tr>
<td valign="top"><tt>QDockWidget.DockWidgetFloatable</tt></td>
<td align="center" valign="top"><tt>0x04</tt></td>
<td valign="top">The dock widget can be detached from the main window, and floated as an independent window.</td>
</tr>
<tr>
<td valign="top"><tt>QDockWidget.AllDockWidgetFeatures</tt></td>
<td align="center" valign="top"><tt>DockWidgetFeatureMask</tt></td>
<td valign="top">The dock widget can be closed, moved, and floated.</td>
</tr>
<tr>
<td valign="top"><tt>QDockWidget.NoDockWidgetFeatures</tt></td>
<td align="center" valign="top"><tt>0x00</tt></td>
<td valign="top">The dock widget cannot be closed, moved, or floated.</td>
</tr>
</table>
<br />
<br />
<p>The DockWidgetFeatures type is a typedef for <a href="qflags.html">QFlags</a>&lt;DockWidgetFeature&gt;. It stores an OR combination of DockWidgetFeature values.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QDockWidget" />QDockWidget.__init__ (<i>self</i>, <a href="qstring.html">QString</a>&#160;<i>title</i>, <a href="qwidget.html">QWidget</a>&#160;<i>parent</i>&#160;=&#160;None, <a href="qt-windowflags.html">Qt.WindowFlags</a>&#160;<i>flags</i>&#160;=&#160;0)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a <a href="qdockwidget.html">QDockWidget</a> with parent <i>parent</i> and window flags <i>flags</i>. The dock widget will be placed in the left dock widget area.</p>
<p>The window title is set to <i>title</i>. This title is used when the <a href="qdockwidget.html">QDockWidget</a> is docked and undocked. It is also used 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="QDockWidget-2" />QDockWidget.__init__ (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>parent</i>&#160;=&#160;None, <a href="qt-windowflags.html">Qt.WindowFlags</a>&#160;<i>flags</i>&#160;=&#160;0)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a <a href="qdockwidget.html">QDockWidget</a> with parent <i>parent</i> and window flags <i>flags</i>. The dock widget will be placed in the left dock widget area.</p>
<h3 class="fn"><a name="allowedAreas" /><a href="qt-dockwidgetareas.html">Qt.DockWidgetAreas</a> QDockWidget.allowedAreas (<i>self</i>)</h3><h3 class="fn"><a name="changeEvent" />QDockWidget.changeEvent (<i>self</i>, <a href="qevent.html">QEvent</a>&#160;<i>event</i>)</h3><h3 class="fn"><a name="closeEvent" />QDockWidget.closeEvent (<i>self</i>, <a href="qcloseevent.html">QCloseEvent</a>&#160;<i>event</i>)</h3><h3 class="fn"><a name="event" />bool QDockWidget.event (<i>self</i>, <a href="qevent.html">QEvent</a>&#160;<i>event</i>)</h3><h3 class="fn"><a name="features" /><a href="qdockwidget-dockwidgetfeatures.html">DockWidgetFeatures</a> QDockWidget.features (<i>self</i>)</h3><h3 class="fn"><a name="isAreaAllowed" />bool QDockWidget.isAreaAllowed (<i>self</i>, <a href="qt.html#DockWidgetArea-enum">Qt.DockWidgetArea</a>&#160;<i>area</i>)</h3><p>Returns true if this dock widget can be placed in the given <i>area</i>; otherwise returns false.</p>
<h3 class="fn"><a name="isFloating" />bool QDockWidget.isFloating (<i>self</i>)</h3><h3 class="fn"><a name="paintEvent" />QDockWidget.paintEvent (<i>self</i>, <a href="qpaintevent.html">QPaintEvent</a>&#160;<i>event</i>)</h3><h3 class="fn"><a name="setAllowedAreas" />QDockWidget.setAllowedAreas (<i>self</i>, <a href="qt-dockwidgetareas.html">Qt.DockWidgetAreas</a>&#160;<i>areas</i>)</h3><h3 class="fn"><a name="setFeatures" />QDockWidget.setFeatures (<i>self</i>, <a href="qdockwidget-dockwidgetfeatures.html">DockWidgetFeatures</a>&#160;<i>features</i>)</h3><h3 class="fn"><a name="setFloating" />QDockWidget.setFloating (<i>self</i>, bool&#160;<i>floating</i>)</h3><h3 class="fn"><a name="setWidget" />QDockWidget.setWidget (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>)</h3><p>Sets the widget for the dock widget to <i>widget</i>.</p>
<p>See also <a href="qdockwidget.html#widget">widget</a>().</p>
<h3 class="fn"><a name="toggleViewAction" /><a href="qaction.html">QAction</a> QDockWidget.toggleViewAction (<i>self</i>)</h3><p>Returns a checkable action that can be used to show or close this dock widget.</p>
<p>The action's text is set to the dock widget'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>
<h3 class="fn"><a name="widget" /><a href="qwidget.html">QWidget</a> QDockWidget.widget (<i>self</i>)</h3><p>Returns the widget for the dock widget. This function returns zero if the widget has not been set.</p>
<p>See also <a href="qdockwidget.html#setWidget">setWidget</a>().</p>
<hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="allowedAreasChanged" />void allowedAreasChanged (Qt::DockWidgetAreas)</h3><p>This signal is emitted when the <a href="qdockwidget.html#allowedAreas-prop">allowedAreas</a> property changes. The <i>allowedAreas</i> parameter gives the new value of the property.</p>
<h3 class="fn"><a name="featuresChanged" />void featuresChanged (QDockWidget::DockWidgetFeatures)</h3><p>This signal is emitted when the <a href="qdockwidget.html#features-prop">features</a> property changes. The <i>features</i> parameter gives the new value of the property.</p>
<h3 class="fn"><a name="topLevelChanged" />void topLevelChanged (bool)</h3><p>This signal is emitted when the <a href="qdockwidget.html#floating-prop">floating</a> property changes. The <i>topLevel</i> parameter is true if the dock widget is now floating; otherwise it is false.</p>
<p>See also <a href="qwidget.html#isWindow">isWindow</a>().</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td width="25%">PyQt&#160;4.0.1 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.trolltech.com">Trolltech&#160;AS</a> 2006</td><td align="right" width="25%">Qt&#160;4.1.4</td></tr></table></div></address></body></html>