equal
deleted
inserted
replaced
33 #include "hblistview.h" |
33 #include "hblistview.h" |
34 #include "hbmodeliterator.h" |
34 #include "hbmodeliterator.h" |
35 |
35 |
36 #include <qmath.h> |
36 #include <qmath.h> |
37 #include <QDebug> |
37 #include <QDebug> |
|
38 #include <QMetaObject> |
38 |
39 |
39 const int Hb_Recycle_Buffer_Shrink_Threshold = 2; // Rather arbitrary |
40 const int Hb_Recycle_Buffer_Shrink_Threshold = 2; // Rather arbitrary |
40 |
41 |
41 HbListItemContainerPrivate::HbListItemContainerPrivate() : |
42 HbListItemContainerPrivate::HbListItemContainerPrivate() : |
42 HbAbstractItemContainerPrivate(), |
43 HbAbstractItemContainerPrivate(), |
252 HbAbstractItemContainer::removeItem(index, animate); |
253 HbAbstractItemContainer::removeItem(index, animate); |
253 } |
254 } |
254 |
255 |
255 /*! |
256 /*! |
256 Sets the modelIndexes of \a count container items starting from item at \a containerStartRow row of the container |
257 Sets the modelIndexes of \a count container items starting from item at \a containerStartRow row of the container |
257 to model's indexes starting from \a modelStartRow |
258 to model's indexes starting from \a modelStartRow |
258 */ |
259 */ |
259 void HbListItemContainer::setItemModelIndexes(int containerStartRow, int modelStartRow, int count) |
260 void HbListItemContainer::setItemModelIndexes(int containerStartRow, int modelStartRow, int count) |
260 { |
261 { |
261 Q_D(HbListItemContainer); |
262 Q_D(HbListItemContainer); |
262 |
263 |
474 void HbListItemContainer::animationFinished(const HbEffect::EffectStatus &status) |
475 void HbListItemContainer::animationFinished(const HbEffect::EffectStatus &status) |
475 { |
476 { |
476 Q_D(HbListItemContainer); |
477 Q_D(HbListItemContainer); |
477 |
478 |
478 HbAbstractViewItem *item = static_cast<HbAbstractViewItem *>(status.item); |
479 HbAbstractViewItem *item = static_cast<HbAbstractViewItem *>(status.item); |
479 item->setFlag(QGraphicsItem::ItemSendsGeometryChanges, false); |
|
480 |
480 |
481 // Remove item from mAnimatedItems list. |
481 // Remove item from mAnimatedItems list. |
482 int itemCount = d->mAnimatedItems.count(); |
482 int itemCount = d->mAnimatedItems.count(); |
483 for (int i = 0; i < itemCount; ++i) { |
483 for (int i = 0; i < itemCount; ++i) { |
484 QPair<HbAbstractViewItem *, int> animatedItem = d->mAnimatedItems.at(i); |
484 QPair<HbAbstractViewItem *, int> animatedItem = d->mAnimatedItems.at(i); |
517 setPos(newPos); |
517 setPos(newPos); |
518 } |
518 } |
519 |
519 |
520 d->adjustContent(); |
520 d->adjustContent(); |
521 } else { |
521 } else { |
522 item->deleteLater(); |
522 item->hide(); |
|
523 QMetaObject::invokeMethod(item, "deleteLater", Qt::QueuedConnection); |
523 } |
524 } |
524 } |
525 } |
525 |
526 |
526 /*! |
527 /*! |
527 \reimp |
528 \reimp |