equal
deleted
inserted
replaced
48 #define EXIT_ACTION(state, action) \ |
48 #define EXIT_ACTION(state, action) \ |
49 connect(state, SIGNAL(exited()), SLOT(action())); |
49 connect(state, SIGNAL(exited()), SLOT(action())); |
50 |
50 |
51 QTM_USE_NAMESPACE |
51 QTM_USE_NAMESPACE |
52 |
52 |
|
53 |
|
54 /*! |
|
55 \class HsWidgetHost |
|
56 \ingroup group_hsdomainmodel |
|
57 \brief |
|
58 */ |
|
59 |
|
60 /*! |
|
61 |
|
62 */ |
53 HsWidgetHost::HsWidgetHost(int databaseId, QGraphicsItem *parent) |
63 HsWidgetHost::HsWidgetHost(int databaseId, QGraphicsItem *parent) |
54 : HbWidget(parent), |
64 : HbWidget(parent), |
55 mDatabaseId(databaseId), |
65 mDatabaseId(databaseId), |
56 mStateMachine(0), |
66 mStateMachine(0), |
57 mWidget(0), |
67 mWidget(0), |
251 setTransformOriginPoint(rect().center()); |
261 setTransformOriginPoint(rect().center()); |
252 |
262 |
253 QParallelAnimationGroup *animationGroup = new QParallelAnimationGroup(); |
263 QParallelAnimationGroup *animationGroup = new QParallelAnimationGroup(); |
254 |
264 |
255 QPropertyAnimation *animation = new QPropertyAnimation(this, "scale"); |
265 QPropertyAnimation *animation = new QPropertyAnimation(this, "scale"); |
256 animation->setDuration(HsConfiguration::widgetDragEffectDuration()); |
266 animation->setDuration(HSCONFIGURATION_GET(widgetDragEffectDuration)); |
257 animation->setEndValue(1.1); |
267 animation->setEndValue(1.1); |
258 animationGroup->addAnimation(animation); |
268 animationGroup->addAnimation(animation); |
259 |
269 |
260 /* TODO: Uncomment after the Qt bug has been fixed. |
270 /* TODO: Uncomment after the Qt bug has been fixed. |
261 animation = new QPropertyAnimation(effect, "offset"); |
271 animation = new QPropertyAnimation(effect, "offset"); |
276 HbInstantFeedback::play(HbFeedback::ItemDrop); |
286 HbInstantFeedback::play(HbFeedback::ItemDrop); |
277 |
287 |
278 QParallelAnimationGroup *animationGroup = new QParallelAnimationGroup; |
288 QParallelAnimationGroup *animationGroup = new QParallelAnimationGroup; |
279 |
289 |
280 QPropertyAnimation *animation = new QPropertyAnimation(this, "scale"); |
290 QPropertyAnimation *animation = new QPropertyAnimation(this, "scale"); |
281 animation->setDuration(HsConfiguration::widgetDropEffectDuration()); |
291 animation->setDuration(HSCONFIGURATION_GET(widgetDropEffectDuration)); |
282 animation->setEndValue(1); |
292 animation->setEndValue(1); |
283 animationGroup->addAnimation(animation); |
293 animationGroup->addAnimation(animation); |
284 |
294 |
285 /* TODO: Uncomment after the Qt bug has been fixed. |
295 /* TODO: Uncomment after the Qt bug has been fixed. |
286 animation = new QPropertyAnimation(effect, "offset"); |
296 animation = new QPropertyAnimation(effect, "offset"); |
525 SLOT(onError())); |
535 SLOT(onError())); |
526 } |
536 } |
527 |
537 |
528 mWidget->installEventFilter(this); |
538 mWidget->installEventFilter(this); |
529 |
539 |
530 HsScene *scene = HsScene::instance(); |
540 setMinimumSize(HSCONFIGURATION_GET(minimumWidgetSizeInPixels)); |
531 setMaximumSize(scene->maximumWidgetSizeInPixels()); |
541 setMaximumSize(HSCONFIGURATION_GET(maximumWidgetSizeInPixels)); |
532 setMinimumSize(scene->minimumWidgetSizeInPixels()); |
542 |
533 |
|
534 loadPresentation(); |
543 loadPresentation(); |
535 |
544 |
536 mWidget->setParentItem(this); |
545 mWidget->setParentItem(this); |
537 |
546 |
538 setNewSize(mWidget->size()); |
547 setNewSize(mWidget->size()); |