File: qgraphicsrotation.html

package info (click to toggle)
qt4-x11 4%3A4.8.2%2Bdfsg-11
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 701,696 kB
  • sloc: cpp: 2,686,179; ansic: 375,485; python: 25,859; sh: 19,349; xml: 17,091; perl: 14,765; yacc: 5,383; asm: 5,038; makefile: 1,259; lex: 555; ruby: 526; objc: 347; cs: 112; pascal: 112; php: 54; sed: 34
file content (211 lines) | stat: -rw-r--r-- 15,497 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qgraphicstransform.cpp -->
  <title>Qt 4.8: QGraphicsRotation Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="content"> 
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
  </div>
  <div class="breadcrumb toolblock">
    <ul>
      <li class="first"><a href="index.html">Home</a></li>
      <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtgui.html">QtGui</a></li>
<li>QGraphicsRotation</li>
    </ul>
  </div>
</div>
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QGraphicsRotation Class Reference</h1>
<!-- $$$QGraphicsRotation-brief -->
<p>The QGraphicsRotation class provides a rotation transformation around a given axis. <a href="#details">More...</a></p>
<!-- @@@QGraphicsRotation -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QGraphicsRotation&gt;</span></pre><p><b>Inherits: </b><a href="qgraphicstransform.html">QGraphicsTransform</a>.</p>
<p>This class was introduced in Qt 4.6.</p>
<ul>
<li><a href="qgraphicsrotation-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li class="fn"><b><a href="qgraphicsrotation.html#angle-prop">angle</a></b> : qreal</li>
<li class="fn"><b><a href="qgraphicsrotation.html#axis-prop">axis</a></b> : QVector3D</li>
<li class="fn"><b><a href="qgraphicsrotation.html#origin-prop">origin</a></b> : QVector3D</li>
</ul>
<ul>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsrotation.html#QGraphicsRotation">QGraphicsRotation</a></b> ( QObject * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsrotation.html#dtor.QGraphicsRotation">~QGraphicsRotation</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsrotation.html#angle-prop">angle</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVector3D </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsrotation.html#axis-prop">axis</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVector3D </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsrotation.html#origin-prop">origin</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsrotation.html#angle-prop">setAngle</a></b> ( qreal )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsrotation.html#axis-prop">setAxis</a></b> ( const QVector3D &amp; <i>axis</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsrotation.html#axis-prop">setAxis</a></b> ( Qt::Axis <i>axis</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsrotation.html#origin-prop">setOrigin</a></b> ( const QVector3D &amp; <i>point</i> )</td></tr>
</table>
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsrotation.html#applyTo">applyTo</a></b> ( QMatrix4x4 * <i>matrix</i> ) const</td></tr>
</table>
<ul>
<li class="fn">1 public function inherited from <a href="qgraphicstransform.html#public-functions">QGraphicsTransform</a></li>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsrotation.html#angleChanged">angleChanged</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsrotation.html#axisChanged">axisChanged</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsrotation.html#originChanged">originChanged</a></b> ()</td></tr>
</table>
<ul>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li class="fn">1 protected slot inherited from <a href="qgraphicstransform.html#protected-slots">QGraphicsTransform</a></li>
</ul>
<a name="details"></a>
<!-- $$$QGraphicsRotation-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QGraphicsRotation class provides a rotation transformation around a given axis.</p>
<p>You can provide the desired axis by assigning a <a href="qvector3d.html">QVector3D</a> to the axis property or by passing a member if <a href="qt.html#Axis-enum">Qt::Axis</a> to the setAxis convenience function. By default the axis is (0, 0, 1) i.e&#x2e;, rotation around the Z axis.</p>
<p>The angle property, which is provided by QGraphicsRotation, now describes the number of degrees to rotate around this axis.</p>
<p>QGraphicsRotation provides certain parameters to help control how the rotation should be applied.</p>
<p>The origin is the point that the item is rotated around (i.e&#x2e;, it stays fixed relative to the parent as the rest of the item is rotated). By default the origin is <a href="qpointf.html">QPointF</a>(0, 0).</p>
<p>The angle property provides the number of degrees to rotate the item clockwise around the origin. This value also be negative, indicating a counter-clockwise rotation. For animation purposes it may also be useful to provide rotation angles exceeding (-360, 360) degrees, for instance to animate how an item rotates several times.</p>
<p>Note: the final rotation is the combined effect of a rotation in 3D space followed by a projection back to 2D. If several rotations are performed in succession, they will not behave as expected unless they were all around the Z axis.</p>
</div>
<p><b>See also </b><a href="qgraphicstransform.html">QGraphicsTransform</a>, <a href="qgraphicsitem.html#setRotation">QGraphicsItem::setRotation</a>(), and <a href="qtransform.html#rotate">QTransform::rotate</a>().</p>
<!-- @@@QGraphicsRotation -->
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$angle-prop$$$angle$$$setAngleqreal$$$angleChanged -->
<h3 class="fn"><a name="angle-prop"></a><span class="name">angle</span> : <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span></h3>
<p>This property holds the angle for clockwise rotation, in degrees.</p>
<p>The angle can be any real number; the default value is 0.0&#x2e; A value of 180 will rotate 180 degrees, clockwise. If you provide a negative number, the item will be rotated counter-clockwise. Normally the rotation angle will be in the range (-360, 360), but you can also provide numbers outside of this range (e.g&#x2e;, a angle of 370 degrees gives the same result as 10 degrees). Setting the angle to NaN results in no rotation.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> qreal </td><td class="memItemRight bottomAlign"><span class="name"><b>angle</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setAngle</b></span> ( qreal )</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qgraphicsrotation.html#angleChanged">angleChanged</a></b></span> ()</td></tr>
</table>
<p><b>See also </b><a href="qgraphicsrotation.html#origin-prop">origin</a>.</p>
<!-- @@@angle -->
<!-- $$$axis-prop$$$axis$$$setAxisconstQVector3D&$$$setAxisQt::Axis$$$axisChanged -->
<h3 class="fn"><a name="axis-prop"></a><span class="name">axis</span> : <span class="type"><a href="qvector3d.html">QVector3D</a></span></h3>
<p>This property holds a rotation axis, specified by a vector in 3D space.</p>
<p>This can be any axis in 3D space. By default the axis is (0, 0, 1), which is aligned with the Z axis. If you provide another axis, <a href="qgraphicsrotation.html">QGraphicsRotation</a> will provide a transformation that rotates around this axis. For example, if you would like to rotate an item around its X axis, you could pass (1, 0, 0) as the axis.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QVector3D </td><td class="memItemRight bottomAlign"><span class="name"><b>axis</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setAxis</b></span> ( const QVector3D &amp; <i>axis</i> )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setAxis</b></span> ( Qt::Axis <i>axis</i> )</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qgraphicsrotation.html#axisChanged">axisChanged</a></b></span> ()</td></tr>
</table>
<p><b>See also </b><a href="qtransform.html">QTransform</a> and <a href="qgraphicsrotation.html#angle-prop">QGraphicsRotation::angle</a>.</p>
<!-- @@@axis -->
<!-- $$$origin-prop$$$origin$$$setOriginconstQVector3D&$$$originChanged -->
<h3 class="fn"><a name="origin-prop"></a><span class="name">origin</span> : <span class="type"><a href="qvector3d.html">QVector3D</a></span></h3>
<p>This property holds the origin of the rotation in 3D space.</p>
<p>All rotations will be done relative to this point (i.e&#x2e;, this point will stay fixed, relative to the parent, when the item is rotated).</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QVector3D </td><td class="memItemRight bottomAlign"><span class="name"><b>origin</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setOrigin</b></span> ( const QVector3D &amp; <i>point</i> )</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qgraphicsrotation.html#originChanged">originChanged</a></b></span> ()</td></tr>
</table>
<p><b>See also </b><a href="qgraphicsrotation.html#angle-prop">angle</a>.</p>
<!-- @@@origin -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QGraphicsRotation[overload1]$$$QGraphicsRotationQObject* -->
<h3 class="fn"><a name="QGraphicsRotation"></a>QGraphicsRotation::<span class="name">QGraphicsRotation</span> ( <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs a new <a href="qgraphicsrotation.html">QGraphicsRotation</a> with the given <i>parent</i>.</p>
<!-- @@@QGraphicsRotation -->
<!-- $$$~QGraphicsRotation[overload1]$$$~QGraphicsRotation -->
<h3 class="fn"><a name="dtor.QGraphicsRotation"></a>QGraphicsRotation::<span class="name">~QGraphicsRotation</span> ()</h3>
<p>Destroys the graphics rotation.</p>
<!-- @@@~QGraphicsRotation -->
<!-- $$$angleChanged[overload1]$$$angleChanged -->
<h3 class="fn"><a name="angleChanged"></a><span class="type">void</span> QGraphicsRotation::<span class="name">angleChanged</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the angle has changed.</p>
<p><b>See also </b><a href="qgraphicsrotation.html#angle-prop">QGraphicsRotation::angle</a>.</p>
<!-- @@@angleChanged -->
<!-- $$$applyTo[overload1]$$$applyToQMatrix4x4* -->
<h3 class="fn"><a name="applyTo"></a><span class="type">void</span> QGraphicsRotation::<span class="name">applyTo</span> ( <span class="type"><a href="qmatrix4x4.html">QMatrix4x4</a></span> * <i>matrix</i> ) const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qgraphicstransform.html#applyTo">QGraphicsTransform::applyTo</a>().</p>
<!-- @@@applyTo -->
<!-- $$$axisChanged[overload1]$$$axisChanged -->
<h3 class="fn"><a name="axisChanged"></a><span class="type">void</span> QGraphicsRotation::<span class="name">axisChanged</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the axis of the object changes.</p>
<p><b>See also </b><a href="qgraphicsrotation.html#axis-prop">QGraphicsRotation::axis</a>.</p>
<!-- @@@axisChanged -->
<!-- $$$originChanged[overload1]$$$originChanged -->
<h3 class="fn"><a name="originChanged"></a><span class="type">void</span> QGraphicsRotation::<span class="name">originChanged</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the origin has changed.</p>
<p><b>See also </b><a href="qgraphicsrotation.html#origin-prop">QGraphicsRotation::origin</a>.</p>
<!-- @@@originChanged -->
</div>
  <div class="ft">
    <span></span>
  </div>
</div> 
<div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2012 Nokia Corporation and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Nokia, Qt and their respective logos are trademarks of Nokia Corporation 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
</div>
</body>
</html>