25 |
25 |
26 #include "hbgestures_p.h" |
26 #include "hbgestures_p.h" |
27 #include "hbpinchgesture.h" |
27 #include "hbpinchgesture.h" |
28 #include "hbpinchgesture_p.h" |
28 #include "hbpinchgesture_p.h" |
29 |
29 |
|
30 /*! |
|
31 @hbcore |
|
32 \class HbPinchGesture |
|
33 |
|
34 \brief HbPinchGesture is an extension to Qt standard QPinchGesture |
|
35 \sa QPinchGesture |
|
36 */ |
|
37 |
|
38 /*! |
|
39 \brief HbPinchGesture constructor |
|
40 \param parent Owner for gesture |
|
41 */ |
30 HbPinchGesture::HbPinchGesture(QObject *parent) |
42 HbPinchGesture::HbPinchGesture(QObject *parent) |
31 : QPinchGesture(parent), d_ptr(new HbPinchGesturePrivate) |
43 : QPinchGesture(parent), d_ptr(new HbPinchGesturePrivate) |
32 |
44 |
33 { |
45 { |
34 d_ptr->mIsNewSequence = true; |
46 d_ptr->mIsNewSequence = true; |
35 setTotalScaleFactor(1); |
47 setTotalScaleFactor(1); |
36 setLastScaleFactor(1); |
48 setLastScaleFactor(1); |
37 setScaleFactor(1); |
49 setScaleFactor(1); |
38 } |
50 } |
39 |
51 |
|
52 /*! |
|
53 \brief HbPinchGesture constructor |
|
54 \param dd Private data |
|
55 \param parent Owner for gesture |
|
56 */ |
40 HbPinchGesture::HbPinchGesture(HbPinchGesturePrivate &dd, QObject *parent) |
57 HbPinchGesture::HbPinchGesture(HbPinchGesturePrivate &dd, QObject *parent) |
41 : QPinchGesture(parent), d_ptr(&dd) |
58 : QPinchGesture(parent), d_ptr(&dd) |
42 { |
59 { |
43 d_ptr->mIsNewSequence = true; |
60 d_ptr->mIsNewSequence = true; |
44 setTotalScaleFactor(1); |
61 setTotalScaleFactor(1); |
45 setLastScaleFactor(1); |
62 setLastScaleFactor(1); |
46 setScaleFactor(1); |
63 setScaleFactor(1); |
47 } |
64 } |
48 |
65 |
|
66 /*! |
|
67 \brief HbPinchGesture destructor |
|
68 */ |
49 HbPinchGesture::~HbPinchGesture() |
69 HbPinchGesture::~HbPinchGesture() |
50 { |
70 { |
51 delete d_ptr; |
71 delete d_ptr; |
52 } |
72 } |
53 |
73 |
|
74 /*! |
|
75 \property sceneTotalRotationAngle |
|
76 \brief The total angle covered by the gesture in scene coordinates. |
|
77 \sa QPinchGesture::totalRotationAngle() |
|
78 */ |
54 qreal HbPinchGesture::sceneTotalRotationAngle() const |
79 qreal HbPinchGesture::sceneTotalRotationAngle() const |
55 { |
80 { |
56 Q_D(const HbPinchGesture); |
81 Q_D(const HbPinchGesture); |
57 return d->mSceneTotalRotationAngle; |
82 return d->mSceneTotalRotationAngle; |
58 } |
83 } |
61 { |
86 { |
62 Q_D(HbPinchGesture); |
87 Q_D(HbPinchGesture); |
63 d->mSceneTotalRotationAngle = value; |
88 d->mSceneTotalRotationAngle = value; |
64 } |
89 } |
65 |
90 |
|
91 /*! |
|
92 \property sceneLastRotationAngle |
|
93 \brief The last reported angle covered by the gesture motion in scene coordinates. |
|
94 \sa QPinchGesture::lastRotationAngle() |
|
95 */ |
66 qreal HbPinchGesture::sceneLastRotationAngle() const |
96 qreal HbPinchGesture::sceneLastRotationAngle() const |
67 { |
97 { |
68 Q_D(const HbPinchGesture); |
98 Q_D(const HbPinchGesture); |
69 return d->mSceneLastRotationAngle; |
99 return d->mSceneLastRotationAngle; |
70 } |
100 } |
73 { |
103 { |
74 Q_D(HbPinchGesture); |
104 Q_D(HbPinchGesture); |
75 d->mSceneLastRotationAngle = value; |
105 d->mSceneLastRotationAngle = value; |
76 } |
106 } |
77 |
107 |
|
108 /*! |
|
109 \property sceneRotationAngle |
|
110 \brief The angle covered by the gesture motion in scene coordinates. |
|
111 \sa QPinchGesture::rotationAngle() |
|
112 */ |
78 qreal HbPinchGesture::sceneRotationAngle() const |
113 qreal HbPinchGesture::sceneRotationAngle() const |
79 { |
114 { |
80 Q_D(const HbPinchGesture); |
115 Q_D(const HbPinchGesture); |
81 return d->mSceneRotationAngle; |
116 return d->mSceneRotationAngle; |
82 } |
117 } |
85 { |
120 { |
86 Q_D(HbPinchGesture); |
121 Q_D(HbPinchGesture); |
87 d->mSceneRotationAngle = value; |
122 d->mSceneRotationAngle = value; |
88 } |
123 } |
89 |
124 |
|
125 /*! |
|
126 \property sceneStartCenterPoint |
|
127 \brief The starting position of the center point in scene coordinates. |
|
128 \sa QPinchGesture::startCenterPoint() |
|
129 */ |
90 QPointF HbPinchGesture::sceneStartCenterPoint() const |
130 QPointF HbPinchGesture::sceneStartCenterPoint() const |
91 { |
131 { |
92 Q_D(const HbPinchGesture); |
132 Q_D(const HbPinchGesture); |
93 return d->mSceneStartCenterPoint; |
133 return d->mSceneStartCenterPoint; |
94 } |
134 } |
97 { |
137 { |
98 Q_D(HbPinchGesture); |
138 Q_D(HbPinchGesture); |
99 d->mSceneStartCenterPoint = value; |
139 d->mSceneStartCenterPoint = value; |
100 } |
140 } |
101 |
141 |
|
142 /*! |
|
143 \property sceneLastCenterPoint |
|
144 \brief The last position of the center point recorded for this gesture in scene coordinates. |
|
145 \sa QPinchGesture::lastCenterPoint() |
|
146 */ |
102 QPointF HbPinchGesture::sceneLastCenterPoint() const |
147 QPointF HbPinchGesture::sceneLastCenterPoint() const |
103 { |
148 { |
104 Q_D(const HbPinchGesture); |
149 Q_D(const HbPinchGesture); |
105 return d->mSceneLastCenterPoint; |
150 return d->mSceneLastCenterPoint; |
106 } |
151 } |
109 { |
154 { |
110 Q_D(HbPinchGesture); |
155 Q_D(HbPinchGesture); |
111 d->mSceneLastCenterPoint = value; |
156 d->mSceneLastCenterPoint = value; |
112 } |
157 } |
113 |
158 |
|
159 /*! |
|
160 \property sceneCenterPoint |
|
161 \brief The current center point in scene coordinates. |
|
162 \sa QPinchGesture::centerPoint() |
|
163 */ |
114 QPointF HbPinchGesture::sceneCenterPoint() const |
164 QPointF HbPinchGesture::sceneCenterPoint() const |
115 { |
165 { |
116 Q_D(const HbPinchGesture); |
166 Q_D(const HbPinchGesture); |
117 return d->mSceneCenterPoint; |
167 return d->mSceneCenterPoint; |
118 } |
168 } |