equal
deleted
inserted
replaced
61 mLayout->setColumnCount(mColumnCount); |
61 mLayout->setColumnCount(mColumnCount); |
62 } |
62 } |
63 |
63 |
64 qreal HbGridItemContainerPrivate::getDiffWithoutScrollareaCompensation(const QPointF &delta) const |
64 qreal HbGridItemContainerPrivate::getDiffWithoutScrollareaCompensation(const QPointF &delta) const |
65 { |
65 { |
66 // substract invisible space from delta - part of scrolling that can |
66 // subtract invisible space from delta - part of scrolling that can |
67 // be done by scroll area |
67 // be done by scroll area |
68 Q_Q(const HbGridItemContainer); |
68 Q_Q(const HbGridItemContainer); |
69 const QSizeF containerSize(q->size()); |
69 const QSizeF containerSize(q->size()); |
70 const QPointF containerPos(q->pos()); |
70 const QPointF containerPos(q->pos()); |
71 qreal diff = 0.0; |
71 qreal diff = 0.0; |
545 { |
545 { |
546 Q_Q(HbGridItemContainer); |
546 Q_Q(HbGridItemContainer); |
547 QModelIndex index; |
547 QModelIndex index; |
548 if (mItems.size() == 0) { |
548 if (mItems.size() == 0) { |
549 // in case when buffer was empty and to be sure |
549 // in case when buffer was empty and to be sure |
550 // it allways has at least one item - to make rest |
550 // it always has at least one item - to make rest |
551 // code simpler |
551 // code simpler |
552 index = mItemView->model()->index(startingIndex, 0); |
552 index = mItemView->model()->index(startingIndex, 0); |
553 if (index.isValid()) { |
553 if (index.isValid()) { |
554 q->insertItem(0, index); |
554 q->insertItem(0, index); |
555 } |
555 } |