File: qgraphicsobject.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 (48 lines) | stat: -rw-r--r-- 9,160 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
<?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>QGraphicsObject 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">QGraphicsObject Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QGraphicsObject class provides a base class for all graphics items that require signals, slots and properties. <a href="#details">More...</a></p>
<p>Inherits <a href="qobject.html">QObject</a> and <a href="qgraphicsitem.html">QGraphicsItem</a>.</p><p>Inherited by <a href="qgraphicssvgitem.html">QGraphicsSvgItem</a>, <a href="qgraphicstextitem.html">QGraphicsTextItem</a> and <a href="qgraphicswidget.html">QGraphicsWidget</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qgraphicsobject.html#QGraphicsObject">__init__</a></b> (<i>self</i>, QGraphicsItem&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qgraphicsobject.html#grabGesture">grabGesture</a></b> (<i>self</i>, Qt.GestureType, Qt.GestureFlags&#160;<i>flags</i>&#160;=&#160;Qt.GestureFlags(0))</li><li><div class="fn" /><b><a href="qgraphicsobject.html#ungrabGesture">ungrabGesture</a></b> (<i>self</i>, Qt.GestureType)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qgraphicsobject.html#enabledChanged">enabledChanged</a></b> ()</li><li><div class="fn" />void <b><a href="qgraphicsobject.html#opacityChanged">opacityChanged</a></b> ()</li><li><div class="fn" />void <b><a href="qgraphicsobject.html#parentChanged">parentChanged</a></b> ()</li><li><div class="fn" />void <b><a href="qgraphicsobject.html#rotationChanged">rotationChanged</a></b> ()</li><li><div class="fn" />void <b><a href="qgraphicsobject.html#scaleChanged">scaleChanged</a></b> ()</li><li><div class="fn" />void <b><a href="qgraphicsobject.html#visibleChanged">visibleChanged</a></b> ()</li><li><div class="fn" />void <b><a href="qgraphicsobject.html#xChanged">xChanged</a></b> ()</li><li><div class="fn" />void <b><a href="qgraphicsobject.html#yChanged">yChanged</a></b> ()</li><li><div class="fn" />void <b><a href="qgraphicsobject.html#zChanged">zChanged</a></b> ()</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QGraphicsObject class provides a base class for all graphics items that require signals, slots and properties.</p>
<p>The class extends a <a href="qgraphicsitem.html">QGraphicsItem</a> with <a href="qobject.html">QObject</a>'s signal/slot and property mechanisms. It maps many of <a href="qgraphicsitem.html">QGraphicsItem</a>'s basic setters and getters to properties and adds notification signals for many of them.</p>
<a name="parents-and-children" />
<h3>Parents and Children</h3>
<p>Each graphics object can be constructed with a parent item. This ensures that the item will be destroyed when its parent item is destroyed. Although QGraphicsObject inherits from both <a href="qobject.html">QObject</a> and <a href="qgraphicsitem.html">QGraphicsItem</a>, you should use the functions provided by <a href="qgraphicsitem.html">QGraphicsItem</a>, <i>not</i> <a href="qobject.html">QObject</a>, to manage the relationships between parent and child items.</p>
<p>The relationships between items can be explored using the <a href="qgraphicsitem.html#parentItem">parentItem</a>() and <a href="qgraphicsitem.html#childItems">childItems</a>() functions. In the hierarchy of items in a scene, the <a href="qgraphicsitem.html#parentObject">parentObject</a>() and <a href="qgraphicsitem.html#parentWidget">parentWidget</a>() functions are the equivalent of the <a href="qobject.html#parent">QWidget.parent</a>() and <a href="qwidget.html#parentWidget">QWidget.parentWidget</a>() functions for <a href="qwidget.html">QWidget</a> subclasses.</p>
<p>See also <a href="qgraphicswidget.html">QGraphicsWidget</a>.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QGraphicsObject" />QGraphicsObject.__init__ (<i>self</i>, <a href="qgraphicsitem.html">QGraphicsItem</a>&#160;<i>parent</i>&#160;=&#160;None)</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="qgraphicsobject.html">QGraphicsObject</a> with <i>parent</i>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsObject/enabledChanged" />
<h3 class="fn"><a name="grabGesture" />QGraphicsObject.grabGesture (<i>self</i>, <a href="qt.html#GestureType-enum">Qt.GestureType</a>, <a href="qt-gestureflags.html">Qt.GestureFlags</a>&#160;<i>flags</i>&#160;=&#160;Qt.GestureFlags(0))</h3><p>Subscribes the graphics object to the given <i>gesture</i> with specific <i>flags</i>.</p>
<p>See also <a href="qgraphicsobject.html#ungrabGesture">ungrabGesture</a>() and <a href="qgestureevent.html">QGestureEvent</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsObject/opacityChanged" />
<h3 class="fn"><a name="ungrabGesture" />QGraphicsObject.ungrabGesture (<i>self</i>, <a href="qt.html#GestureType-enum">Qt.GestureType</a>)</h3><p>Unsubscribes the graphics object from the given <i>gesture</i>.</p>
<p>See also <a href="qgraphicsobject.html#grabGesture">grabGesture</a>() and <a href="qgestureevent.html">QGestureEvent</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsObject/visibleChanged" />
<hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="enabledChanged" />void enabledChanged ()</h3><p>This is the default overload of this signal.</p><p>This signal gets emitted whenever the item get's enabled or disabled.</p>
<p>See also <a href="qgraphicsitem.html#isEnabled">isEnabled</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsObject/grabGesture" />
<h3 class="fn"><a name="opacityChanged" />void opacityChanged ()</h3><p>This is the default overload of this signal.</p><p>This signal gets emitted whenever the opacity of the item changes</p>
<p>See also <a href="qgraphicsitem.html#opacity">QGraphicsItem.opacity</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsObject/parentChanged" />
<h3 class="fn"><a name="parentChanged" />void parentChanged ()</h3><p>This is the default overload of this signal.</p><p>This signal gets emitted whenever the parent of the item changes</p>
<a name="//apple_ref/cpp/instm/QGraphicsObject/rotationChanged" />
<h3 class="fn"><a name="rotationChanged" />void rotationChanged ()</h3><p>This is the default overload of this signal.</p><p>This signal gets emitted whenever the roation of the item changes.</p>
<a name="//apple_ref/cpp/instm/QGraphicsObject/scaleChanged" />
<h3 class="fn"><a name="scaleChanged" />void scaleChanged ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the scale of the item changes.</p>
<a name="//apple_ref/cpp/instm/QGraphicsObject/ungrabGesture" />
<h3 class="fn"><a name="visibleChanged" />void visibleChanged ()</h3><p>This is the default overload of this signal.</p><p>This signal gets emitted whenever the visibility of the item changes</p>
<p>See also <a href="qgraphicsobject.html#visible-prop">visible</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsObject/xChanged" />
<h3 class="fn"><a name="xChanged" />void xChanged ()</h3><p>This is the default overload of this signal.</p><p>This signal gets emitted whenever the x position of the item changes</p>
<p>See also <a href="qgraphicsitem.html#pos">pos</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsObject/yChanged" />
<h3 class="fn"><a name="yChanged" />void yChanged ()</h3><p>This is the default overload of this signal.</p><p>This signal gets emitted whenever the y position of the item changes.</p>
<p>See also <a href="qgraphicsitem.html#pos">pos</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsObject/zChanged" />
<h3 class="fn"><a name="zChanged" />void zChanged ()</h3><p>This is the default overload of this signal.</p><p>This signal gets emitted whenever the z value of the item changes.</p>
<p>See also <a href="qgraphicsitem.html#pos">pos</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>