equal
deleted
inserted
replaced
62 |
62 |
63 /*! |
63 /*! |
64 See also HbAbstractItemView,HbAbstractViewitem,HbGridViewItem,HbScrollArea |
64 See also HbAbstractItemView,HbAbstractViewitem,HbGridViewItem,HbScrollArea |
65 */ |
65 */ |
66 |
66 |
67 |
67 /*! |
|
68 \fn void HbGridView::setUniformItemSizes(bool enabled) is public from HbAbstractItemView but for HbGridView |
|
69 Calling this method make no sense - in grid case it is reimplemented and do not change |
|
70 anything (items are always same size). |
|
71 */ |
|
72 |
68 /*! |
73 /*! |
69 Constructs a new HbGridView with \a parent. |
74 Constructs a new HbGridView with \a parent. |
70 */ |
75 */ |
71 HbGridView::HbGridView(QGraphicsItem *parent) : |
76 HbGridView::HbGridView(QGraphicsItem *parent) : |
72 HbAbstractItemView(*new HbGridViewPrivate(), new HbGridItemContainer(), new HbModelIterator(), parent) |
77 HbAbstractItemView(*new HbGridViewPrivate(), new HbGridItemContainer(), new HbModelIterator(), parent) |
268 { |
273 { |
269 Q_D(HbGridView); |
274 Q_D(HbGridView); |
270 d->mContainer->setPos(0,0); |
275 d->mContainer->setPos(0,0); |
271 d->itemContainer()->orientationChanged(newOrientation); |
276 d->itemContainer()->orientationChanged(newOrientation); |
272 |
277 |
273 scrollTo(d->mVisibleIndex, HbAbstractItemView::PositionAtCenter); |
278 // abstract part is enought - container update buffer |
|
279 HbAbstractItemView::scrollTo(d->mVisibleIndex, HbAbstractItemView::PositionAtCenter); |
274 |
280 |
275 d->mVisibleIndex = QModelIndex(); |
281 d->mVisibleIndex = QModelIndex(); |
276 } |
282 } |
277 |
283 |
278 /*! |
284 /*! |
374 d->mVisibleIndex = d->indexInTheCenter((d->mScrollDirections == Qt::Vertical) |
380 d->mVisibleIndex = d->indexInTheCenter((d->mScrollDirections == Qt::Vertical) |
375 ? Qt::Horizontal : Qt::Vertical); |
381 ? Qt::Horizontal : Qt::Vertical); |
376 d->mContainer->setPos(0,0); |
382 d->mContainer->setPos(0,0); |
377 d->itemContainer()->scrollDirectionChanged(scrollDirection); |
383 d->itemContainer()->scrollDirectionChanged(scrollDirection); |
378 |
384 |
379 scrollTo(d->mVisibleIndex, HbAbstractItemView::PositionAtCenter); |
385 // abstract part is enought - container update buffer |
|
386 HbAbstractItemView::scrollTo(d->mVisibleIndex, HbAbstractItemView::PositionAtCenter); |
380 |
387 |
381 d->mVisibleIndex = QModelIndex(); |
388 d->mVisibleIndex = QModelIndex(); |
382 } |
389 } |
383 |
390 |
384 #include "moc_hbgridview.cpp" |
391 #include "moc_hbgridview.cpp" |