~ubuntu-branches/ubuntu/precise/python-qt4/precise-proposed

« back to all changes in this revision

Viewing changes to doc/html/qgraphicstransform.html

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell, Jonathan Riddell
  • Date: 2010-11-08 16:13:33 UTC
  • mfrom: (1.5.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20101108161333-0nec4wu0nz3wpf9r
Tags: 4.8.1-0ubuntu1
[ Jonathan Riddell ]
* New upstream release
* Build against python-sip-dev 4.11.2
* Remove kubuntu_02_fix-scpk-and-flag-issue.diff merged upstream
* Install __init__.py into /usr/lib/python3.2/dist-packages/PyQt4,
  fixes Python 3 support
* Add QtDeclarative to python-qt4
* Add kubuntu_03_uiparser.diff from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
td.postheader { font-family: sans-serif }
7
7
tr.address { font-family: sans-serif }
8
8
body { background: #ffffff; color: black; }
9
 
</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">QGraphicsTransform Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QGraphicsTransform class is an abstract base class for building advanced transformations on QGraphicsItems. <a href="#details">More...</a></p>
10
 
<p>Inherits <a href="qobject.html">QObject</a>.</p><p>Inherited by <a href="qgraphicsrotation.html">QGraphicsRotation</a> and <a href="qgraphicsscale.html">QGraphicsScale</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qgraphicstransform.html#QGraphicsTransform">__init__</a></b> (<i>self</i>, QObject&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qgraphicstransform.html#applyTo">applyTo</a></b> (<i>self</i>, QMatrix4x4)</li><li><div class="fn" /><b><a href="qgraphicstransform.html#update">update</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QGraphicsTransform class is an abstract base class for building advanced transformations on QGraphicsItems.</p>
11
 
<p>As an alternative to QGraphicsItem.transform, QGraphicsTransform lets you create and control advanced transformations that can be configured independently using specialized properties.</p>
12
 
<p><a href="qgraphicsitem.html">QGraphicsItem</a> allows you to assign any number of QGraphicsTransform instances to one <a href="qgraphicsitem.html">QGraphicsItem</a>. Each QGraphicsTransform is applied in order, one at a time, to the <a href="qgraphicsitem.html">QGraphicsItem</a> it's assigned to.</p>
13
 
<p>QGraphicsTransform is particularily useful for animations. Whereas <a href="qgraphicsitem.html#setTransform">QGraphicsItem.setTransform</a>() lets you assign any transform directly to an item, there is no direct way to interpolate between two different transformations (e.g., when transitioning between two states, each for which the item has a different arbitrary transform assigned). Using QGraphicsTransform you can interpolate the property values of each independent transformation. The resulting operation is then combined into a single transform which is applied to <a href="qgraphicsitem.html">QGraphicsItem</a>.</p>
14
 
<p>Transformations are computed in true 3D space using <a href="qmatrix4x4.html">QMatrix4x4</a>. When the transformation is applied to a <a href="qgraphicsitem.html">QGraphicsItem</a>, it will be projected back to a 2D <a href="qtransform.html">QTransform</a>. When multiple QGraphicsTransform objects are applied to a <a href="qgraphicsitem.html">QGraphicsItem</a>, all of the transformations are computed in true 3D space, with the projection back to 2D only occurring after the last QGraphicsTransform is applied. The exception to this is <a href="qgraphicsrotation.html">QGraphicsRotation</a>, which projects back to 2D after each rotation to preserve the perspective effect around the X and Y axes.</p>
15
 
<p>If you want to create your own configurable transformation, you can create a subclass of QGraphicsTransform (or any or the existing subclasses), and reimplement the pure virtual <a href="qgraphicstransform.html#applyTo">applyTo</a>() function, which takes a pointer to a <a href="qmatrix4x4.html">QMatrix4x4</a>. Each operation you would like to apply should be exposed as properties (e.g., customTransform-&gt;setVerticalShear(2.5)). Inside you reimplementation of <a href="qgraphicstransform.html#applyTo">applyTo</a>(), you can modify the provided transform respectively.</p>
16
 
<p>QGraphicsTransform can be used together with <a href="qgraphicsitem.html#setTransform">QGraphicsItem.setTransform</a>(), <a href="qgraphicsitem.html#setRotation">QGraphicsItem.setRotation</a>(), and <a href="qgraphicsitem.html#setScale">QGraphicsItem.setScale</a>().</p>
17
 
<p>See also <a href="qgraphicsitem.html#transform">QGraphicsItem.transform</a>(), <a href="qgraphicsscale.html">QGraphicsScale</a>, and <a href="qgraphicsrotation.html">QGraphicsRotation</a>.</p>
18
 
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QGraphicsTransform" />QGraphicsTransform.__init__ (<i>self</i>, <a href="qobject.html">QObject</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 new <a href="qgraphicstransform.html">QGraphicsTransform</a> with the given <i>parent</i>.</p>
19
 
<a name="//apple_ref/cpp/instm/QGraphicsTransform/~QGraphicsTransform" />
20
 
<h3 class="fn"><a name="applyTo" />QGraphicsTransform.applyTo (<i>self</i>, <a href="qmatrix4x4.html">QMatrix4x4</a>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>This pure virtual method has to be reimplemented in derived classes.</p>
 
9
</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">QGraphicsTransform Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QGraphicsTransform class is an abstract base class for
 
10
building advanced transformations on QGraphicsItems. <a href="#details">More...</a></p>
 
11
 
 
12
<p>Inherits <a href="qobject.html">QObject</a>.</p><p>Inherited by <a href="qgraphicsrotation.html">QGraphicsRotation</a> and <a href="qgraphicsscale.html">QGraphicsScale</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qgraphicstransform.html#QGraphicsTransform">__init__</a></b> (<i>self</i>, QObject&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qgraphicstransform.html#applyTo">applyTo</a></b> (<i>self</i>, QMatrix4x4)</li><li><div class="fn" /><b><a href="qgraphicstransform.html#update">update</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QGraphicsTransform class is an abstract base class for
 
13
building advanced transformations on QGraphicsItems.</p>
 
14
<p>As an alternative to QGraphicsItem.transform,
 
15
QGraphicsTransform lets you create and control advanced
 
16
transformations that can be configured independently using
 
17
specialized properties.</p>
 
18
<p><a href="qgraphicsitem.html">QGraphicsItem</a> allows you to
 
19
assign any number of QGraphicsTransform instances to one <a href="qgraphicsitem.html">QGraphicsItem</a>. Each QGraphicsTransform is
 
20
applied in order, one at a time, to the <a href="qgraphicsitem.html">QGraphicsItem</a> it's assigned to.</p>
 
21
<p>QGraphicsTransform is particularily useful for animations.
 
22
Whereas <a href="qgraphicsitem.html#setTransform">QGraphicsItem.setTransform</a>()
 
23
lets you assign any transform directly to an item, there is no
 
24
direct way to interpolate between two different transformations
 
25
(e.g., when transitioning between two states, each for which the
 
26
item has a different arbitrary transform assigned). Using
 
27
QGraphicsTransform you can interpolate the property values of each
 
28
independent transformation. The resulting operation is then
 
29
combined into a single transform which is applied to <a href="qgraphicsitem.html">QGraphicsItem</a>.</p>
 
30
<p>Transformations are computed in true 3D space using <a href="qmatrix4x4.html">QMatrix4x4</a>. When the transformation is
 
31
applied to a <a href="qgraphicsitem.html">QGraphicsItem</a>, it
 
32
will be projected back to a 2D <a href="qtransform.html">QTransform</a>. When multiple QGraphicsTransform
 
33
objects are applied to a <a href="qgraphicsitem.html">QGraphicsItem</a>, all of the transformations
 
34
are computed in true 3D space, with the projection back to 2D only
 
35
occurring after the last QGraphicsTransform is applied. The
 
36
exception to this is <a href="qgraphicsrotation.html">QGraphicsRotation</a>, which projects back
 
37
to 2D after each rotation to preserve the perspective effect around
 
38
the X and Y axes.</p>
 
39
<p>If you want to create your own configurable transformation, you
 
40
can create a subclass of QGraphicsTransform (or any or the existing
 
41
subclasses), and reimplement the pure virtual <a href="qgraphicstransform.html#applyTo">applyTo</a>() function, which
 
42
takes a pointer to a <a href="qmatrix4x4.html">QMatrix4x4</a>. Each
 
43
operation you would like to apply should be exposed as properties
 
44
(e.g., customTransform-&gt;setVerticalShear(2.5)). Inside you
 
45
reimplementation of <a href="qgraphicstransform.html#applyTo">applyTo</a>(), you can modify the
 
46
provided transform respectively.</p>
 
47
<p>QGraphicsTransform can be used together with <a href="qgraphicsitem.html#setTransform">QGraphicsItem.setTransform</a>(),
 
48
<a href="qgraphicsitem.html#setRotation">QGraphicsItem.setRotation</a>(),
 
49
and <a href="qgraphicsitem.html#setScale">QGraphicsItem.setScale</a>().</p>
 
50
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QGraphicsTransform" />QGraphicsTransform.__init__ (<i>self</i>, <a href="qobject.html">QObject</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 new <a href="qgraphicstransform.html">QGraphicsTransform</a> with the given
 
51
<i>parent</i>.</p>
 
52
 
 
53
 
 
54
<h3 class="fn"><a name="applyTo" />QGraphicsTransform.applyTo (<i>self</i>, <a href="qmatrix4x4.html">QMatrix4x4</a>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>This pure virtual method has to be reimplemented in derived
 
55
classes.</p>
21
56
<p>It applies this transformation to <i>matrix</i>.</p>
22
 
<p>See also <a href="qgraphicsitem.html#transform">QGraphicsItem.transform</a>() and <a href="qmatrix4x4.html#toTransform">QMatrix4x4.toTransform</a>().</p>
23
 
<a name="//apple_ref/cpp/instm/QGraphicsTransform/update" />
24
 
<h3 class="fn"><a name="update" />QGraphicsTransform.update (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void update()</tt>.</p><p>Notifies that this transform operation has changed its parameters in such a way that <a href="qgraphicstransform.html#applyTo">applyTo</a>() will return a different result than before.</p>
25
 
<p>When implementing you own custom graphics transform, you must call this function every time you change a parameter, to let <a href="qgraphicsitem.html">QGraphicsItem</a> know that its transformation needs to be updated.</p>
 
57
<p>See also <a href="qgraphicsitem.html#transform">QGraphicsItem.transform</a>() and
 
58
<a href="qmatrix4x4.html#toTransform">QMatrix4x4.toTransform</a>().</p>
 
59
 
 
60
 
 
61
<h3 class="fn"><a name="update" />QGraphicsTransform.update (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void update()</tt>.</p><p>Notifies that this transform operation has changed its
 
62
parameters in such a way that <a href="qgraphicstransform.html#applyTo">applyTo</a>() will return a
 
63
different result than before.</p>
 
64
<p>When implementing you own custom graphics transform, you must
 
65
call this function every time you change a parameter, to let
 
66
<a href="qgraphicsitem.html">QGraphicsItem</a> know that its
 
67
transformation needs to be updated.</p>
26
68
<p>See also <a href="qgraphicstransform.html#applyTo">applyTo</a>().</p>
27
 
<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.7 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.3</td></tr></table></div></address></body></html>
 
 
b'\\ No newline at end of file'
 
69
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.8.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.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt&#160;4.7.0</td></tr></table></div></address></body></html>
 
 
b'\\ No newline at end of file'