equal
deleted
inserted
replaced
14 * Description: |
14 * Description: |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #include <QGraphicsSceneResizeEvent> |
18 #include <QGraphicsSceneResizeEvent> |
19 #include <hbmainwindow> |
19 #include <HbMainWindow> |
20 #include <hbscrollbar.h> |
20 #include <HbScrollBar> |
21 #include <qapplication.h> |
21 #include <QApplication> |
22 #include <hgwidgets/hgwidgets.h> |
22 #include <hgwidgets/hgwidgets.h> |
23 #include <hbstyleloader.h> |
23 #include <HbStyleLoader> |
24 |
24 |
25 #include "hgwidgets_p.h" |
25 #include "hgwidgets_p.h" |
26 #include "hgcontainer.h" |
26 #include "hgcontainer.h" |
27 #include "hgwidgetitem.h" |
27 #include "hgwidgetitem.h" |
28 #include "hgscrollbuffermanager.h" |
28 #include "hgscrollBufferManager.h" |
29 #include "hggridcontainer.h" |
29 #include "hggridcontainer.h" |
30 #include "trace.h" |
30 #include "trace.h" |
31 |
31 |
32 |
32 |
33 |
33 |
170 Q_D( HgWidget ); |
170 Q_D( HgWidget ); |
171 |
171 |
172 if (d->mHandleLongPress != value) |
172 if (d->mHandleLongPress != value) |
173 { |
173 { |
174 d->mHandleLongPress = value; |
174 d->mHandleLongPress = value; |
175 if (value) |
|
176 { |
|
177 grabGesture(Qt::TapAndHoldGesture); |
|
178 } |
|
179 else |
|
180 { |
|
181 ungrabGesture(Qt::TapAndHoldGesture); |
|
182 } |
|
183 } |
175 } |
184 |
176 |
185 // TODO, should we do something like this????? |
177 // TODO, should we do something like this????? |
186 // if (isChanged) { |
178 // if (isChanged) { |
187 // d->updateGestures(); |
179 // d->updateGestures(); |
245 Q_D(HgWidget); |
237 Q_D(HgWidget); |
246 switch (event->type() ) |
238 switch (event->type() ) |
247 { |
239 { |
248 case QEvent::ApplicationActivate: |
240 case QEvent::ApplicationActivate: |
249 { |
241 { |
250 d->gainedForeground(); |
242 // d->gainedForeground(); |
251 break; |
243 break; |
252 } |
244 } |
253 case QEvent::ApplicationDeactivate: |
245 case QEvent::ApplicationDeactivate: |
254 { |
246 { |
255 d->lostForeground(); |
247 // d->lostForeground(); |
256 break; |
248 break; |
257 } |
249 } |
258 case QEvent::GraphicsSceneResize: |
250 case QEvent::GraphicsSceneResize: |
259 { |
251 { |
260 d->adjustGeometry(); |
252 d->adjustGeometry(); |