64 |
64 |
65 \sa QTapGesture, HbTapGesture::TapStyleHint |
65 \sa QTapGesture, HbTapGesture::TapStyleHint |
66 |
66 |
67 */ |
67 */ |
68 |
68 |
|
69 /*! |
|
70 \brief HbTapGesture constructor |
|
71 \param parent Parent for the gesture |
|
72 */ |
69 HbTapGesture::HbTapGesture(QObject *parent) |
73 HbTapGesture::HbTapGesture(QObject *parent) |
70 : QTapGesture(parent), d_ptr(new HbTapGesturePrivate) |
74 : QTapGesture(parent), d_ptr(new HbTapGesturePrivate) |
71 { |
75 { |
72 DEBUG() << "Creating" << this; |
76 DEBUG() << "Creating" << this; |
73 } |
77 } |
74 |
78 |
|
79 /*! |
|
80 \brief HbTapGesture constructor |
|
81 \param dd Custom private data |
|
82 \param parent Parent for the gesture |
|
83 |
|
84 */ |
75 HbTapGesture::HbTapGesture( HbTapGesturePrivate &dd, QObject *parent ) |
85 HbTapGesture::HbTapGesture( HbTapGesturePrivate &dd, QObject *parent ) |
76 : QTapGesture(parent), d_ptr( &dd ) |
86 : QTapGesture(parent), d_ptr( &dd ) |
77 { |
87 { |
78 DEBUG() << "Creating" << this; |
88 DEBUG() << "Creating" << this; |
79 } |
89 } |
80 |
90 |
|
91 /*! |
|
92 \brief HbTapGesture destructor |
|
93 */ |
81 HbTapGesture::~HbTapGesture() |
94 HbTapGesture::~HbTapGesture() |
82 { |
95 { |
83 DEBUG() << "Deleting" << this; |
96 DEBUG() << "Deleting" << this; |
84 delete d_ptr; |
97 delete d_ptr; |
85 } |
98 } |
86 |
99 |
87 /*! |
100 /*! |
88 |
|
89 \property startPos |
101 \property startPos |
90 |
102 \brief Stores the starting position of the tap gesture in screen coordinates. |
91 Stores the starting position of the tap gesture in screen coordinates. |
|
92 |
|
93 */ |
103 */ |
94 QPointF HbTapGesture::startPos() const |
104 QPointF HbTapGesture::startPos() const |
95 { |
105 { |
96 Q_D(const HbTapGesture); |
106 Q_D(const HbTapGesture); |
97 return d->mStartPos; |
107 return d->mStartPos; |
102 Q_D(HbTapGesture); |
112 Q_D(HbTapGesture); |
103 d->mStartPos = startPos; |
113 d->mStartPos = startPos; |
104 } |
114 } |
105 |
115 |
106 /*! |
116 /*! |
107 |
|
108 \property sceneStartPos |
117 \property sceneStartPos |
109 |
118 \brief Stores the starting position of the tap gesture in scene coordinates. |
110 Stores the starting position of the tap gesture in scene coordinates. |
|
111 |
|
112 */ |
119 */ |
113 QPointF HbTapGesture::sceneStartPos() const |
120 QPointF HbTapGesture::sceneStartPos() const |
114 { |
121 { |
115 Q_D(const HbTapGesture); |
122 Q_D(const HbTapGesture); |
116 return d->mSceneStartPos; |
123 return d->mSceneStartPos; |
121 Q_D(HbTapGesture); |
128 Q_D(HbTapGesture); |
122 d->mSceneStartPos = startPos; |
129 d->mSceneStartPos = startPos; |
123 } |
130 } |
124 |
131 |
125 /*! |
132 /*! |
126 |
133 \property scenePosition |
127 \property startPos |
134 \brief Stores the current position of the tap gesture in scene coordinates. |
128 |
135 \sa QTapGesture::position() |
129 Stores the starting position of the tap gesture in scene coordinates. |
|
130 |
|
131 */ |
136 */ |
132 QPointF HbTapGesture::scenePosition() const |
137 QPointF HbTapGesture::scenePosition() const |
133 { |
138 { |
134 Q_D(const HbTapGesture); |
139 Q_D(const HbTapGesture); |
135 return d->mScenePosition; |
140 return d->mScenePosition; |
141 d->mScenePosition = startPos; |
146 d->mScenePosition = startPos; |
142 } |
147 } |
143 |
148 |
144 /*! |
149 /*! |
145 \property tapStyleHint |
150 \property tapStyleHint |
|
151 \brief Indicates whether tap is normal tap or long press. |
146 |
152 |
147 TapStyleHint is by default Tap and in case of long press, the gesture |
153 TapStyleHint is by default Tap and in case of long press, the gesture |
148 update event is sent and TapStyleHint changed to TapAndHold. |
154 update event is sent and TapStyleHint changed to TapAndHold. |
149 */ |
155 */ |
150 HbTapGesture::TapStyleHint HbTapGesture::tapStyleHint() const |
156 HbTapGesture::TapStyleHint HbTapGesture::tapStyleHint() const |