equal
deleted
inserted
replaced
29 #include "hbwidget_p.h" |
29 #include "hbwidget_p.h" |
30 #include "hbabstractitemcontainer_p.h" |
30 #include "hbabstractitemcontainer_p.h" |
31 #include "hbabstractviewitem.h" |
31 #include "hbabstractviewitem.h" |
32 #include "hbabstractitemview.h" |
32 #include "hbabstractitemview.h" |
33 #include "hbmodeliterator.h" |
33 #include "hbmodeliterator.h" |
|
34 #include "hbabstractitemview_p.h" |
34 |
35 |
35 #include <QPersistentModelIndex> |
36 #include <QPersistentModelIndex> |
36 |
37 |
37 class HbAbstractViewItem; |
38 class HbAbstractViewItem; |
38 class HbAbstractItemView; |
39 class HbAbstractItemView; |
76 |
77 |
77 virtual void updateItemBuffer(); |
78 virtual void updateItemBuffer(); |
78 void increaseBufferSize(int amount); |
79 void increaseBufferSize(int amount); |
79 void decreaseBufferSize(int amount); |
80 void decreaseBufferSize(int amount); |
80 |
81 |
81 HbAbstractViewItem* item(const QModelIndex &index) const; |
82 virtual HbAbstractViewItem* item(const QModelIndex &index) const; |
82 |
83 |
83 void doRemoveItem(HbAbstractViewItem *item, const QModelIndex &index, bool animate = false); |
84 void doRemoveItem(HbAbstractViewItem *item, const QModelIndex &index, bool animate = false); |
84 |
85 |
85 void deleteItem(HbAbstractViewItem *item, bool animate = false); |
86 void deleteItem(HbAbstractViewItem *item, bool animate = false); |
86 |
87 |
92 void restoreItemPosition(HbAbstractViewItem *item, const QPointF &position); |
93 void restoreItemPosition(HbAbstractViewItem *item, const QPointF &position); |
93 |
94 |
94 void insertItem(HbAbstractViewItem *item, int pos, const QModelIndex &index, bool animate); |
95 void insertItem(HbAbstractViewItem *item, int pos, const QModelIndex &index, bool animate); |
95 |
96 |
96 inline HbModelIterator *modelIterator() const; |
97 inline HbModelIterator *modelIterator() const; |
|
98 |
|
99 inline void adjustContent() const; |
97 |
100 |
98 mutable QList<HbAbstractViewItem*> mPrototypes; |
101 mutable QList<HbAbstractViewItem*> mPrototypes; |
99 QList<StateItem> mItemStateList; |
102 QList<StateItem> mItemStateList; |
100 QHash<QPersistentModelIndex, QHash<QString, QVariant> > mItemStates; |
103 QHash<QPersistentModelIndex, QHash<QString, QVariant> > mItemStates; |
101 |
104 |
117 } else { |
120 } else { |
118 return 0; |
121 return 0; |
119 } |
122 } |
120 } |
123 } |
121 |
124 |
|
125 void HbAbstractItemContainerPrivate::adjustContent() const |
|
126 { |
|
127 if (mItemView) { |
|
128 // this will force the HbScrollArea to adjust the content correctly. Adjustment |
|
129 // is not done in the setPos generated event handling by default to speed up scrolling. |
|
130 HbAbstractItemViewPrivate::d_ptr(mItemView)->adjustContent(); |
|
131 } |
|
132 } |
|
133 |
122 Q_DECLARE_METATYPE(HbAbstractItemContainerPrivate::StateItem) |
134 Q_DECLARE_METATYPE(HbAbstractItemContainerPrivate::StateItem) |
123 |
135 |
124 #endif /* HBABSTRACTITEMCONTAINERPRIVATE_H */ |
136 #endif /* HBABSTRACTITEMCONTAINERPRIVATE_H */ |