equal
deleted
inserted
replaced
33 #include "hbmodeliterator.h" |
33 #include "hbmodeliterator.h" |
34 |
34 |
35 #include <qmath.h> |
35 #include <qmath.h> |
36 |
36 |
37 #include <QDebug> |
37 #include <QDebug> |
|
38 #include <QMetaObject> |
38 |
39 |
39 const int Hb_Recycle_Buffer_Shrink_Threshold = 2; |
40 const int Hb_Recycle_Buffer_Shrink_Threshold = 2; |
40 |
41 |
41 HbTreeItemContainerPrivate::HbTreeItemContainerPrivate() : |
42 HbTreeItemContainerPrivate::HbTreeItemContainerPrivate() : |
42 HbAbstractItemContainerPrivate(), |
43 HbAbstractItemContainerPrivate(), |
524 void HbTreeItemContainer::animationFinished(const HbEffect::EffectStatus &status) |
525 void HbTreeItemContainer::animationFinished(const HbEffect::EffectStatus &status) |
525 { |
526 { |
526 Q_D(HbTreeItemContainer); |
527 Q_D(HbTreeItemContainer); |
527 |
528 |
528 HbAbstractViewItem *item = static_cast<HbAbstractViewItem *>(status.item); |
529 HbAbstractViewItem *item = static_cast<HbAbstractViewItem *>(status.item); |
529 item->setFlag(QGraphicsItem::ItemSendsGeometryChanges, false); |
|
530 |
530 |
531 // Remove item from mAnimatedItems list. |
531 // Remove item from mAnimatedItems list. |
532 int itemCount = d->mAnimatedItems.count(); |
532 int itemCount = d->mAnimatedItems.count(); |
533 for (int i = 0; i < itemCount; ++i) { |
533 for (int i = 0; i < itemCount; ++i) { |
534 QPair<HbAbstractViewItem *, int> animatedItem = d->mAnimatedItems.at(i); |
534 QPair<HbAbstractViewItem *, int> animatedItem = d->mAnimatedItems.at(i); |
564 if (bufferIndex == 0) { |
564 if (bufferIndex == 0) { |
565 QPointF newPos = pos(); |
565 QPointF newPos = pos(); |
566 newPos.setY(newPos.y() - item->preferredHeight()); |
566 newPos.setY(newPos.y() - item->preferredHeight()); |
567 setPos(newPos); |
567 setPos(newPos); |
568 } |
568 } |
|
569 d->adjustContent(); |
569 } else { |
570 } else { |
570 item->deleteLater(); |
571 item->hide(); |
|
572 QMetaObject::invokeMethod(item, "deleteLater", Qt::QueuedConnection); |
571 } |
573 } |
572 } |
574 } |
573 |
575 |
574 /*! |
576 /*! |
575 \reimp |
577 \reimp |