114 |
111 |
115 virtual void scrollTo(const QModelIndex &index, HbAbstractItemView::ScrollHint hint); |
112 virtual void scrollTo(const QModelIndex &index, HbAbstractItemView::ScrollHint hint); |
116 void revealItem(const HbAbstractViewItem *item, HbAbstractItemView::ScrollHint hint); |
113 void revealItem(const HbAbstractViewItem *item, HbAbstractItemView::ScrollHint hint); |
117 void checkBoundaries(QPointF &newPos); |
114 void checkBoundaries(QPointF &newPos); |
118 |
115 |
119 void updateScrollBarForUniformSizedItems(); |
|
120 void updateScrollBarForVariableSizedItems(); |
|
121 void setScrollBarMetrics(Qt::Orientation orientation); |
116 void setScrollBarMetrics(Qt::Orientation orientation); |
122 bool handleScrollBar(Qt::Orientation orientation); |
117 virtual bool handleScrollBar(Qt::Orientation orientation); |
|
118 void updateScrollBar(Qt::Orientation orientation); |
123 |
119 |
124 void rowsRemoved(const QModelIndex &parent, int start, int end); |
120 void rowsRemoved(const QModelIndex &parent, int start, int end); |
125 |
121 |
126 virtual QItemSelectionModel::SelectionFlags selectionFlags( |
122 virtual QItemSelectionModel::SelectionFlags selectionFlags( |
127 const HbAbstractViewItem *item, |
123 const HbAbstractViewItem *item, |
128 const QEvent *event); |
124 const QEvent *event); |
129 void resetContainer(); |
125 void resetContainer(); |
130 void startAppearEffect(const QModelIndex &parent, int start, int end); |
126 void startAppearEffect(const QString &itemType, const QString &effectEvent, const QModelIndex &parent, int start, int end); |
|
127 |
|
128 virtual bool animationEnabled(bool insertOperation); |
|
129 |
131 virtual void ensureVisible(QPointF position, qreal xMargin, qreal yMargin); |
130 virtual void ensureVisible(QPointF position, qreal xMargin, qreal yMargin); |
132 |
131 |
133 void _q_modelDestroyed(); |
132 void _q_modelDestroyed(); |
134 void _q_layoutChanged(); |
|
135 void _q_animationEnabled(); |
133 void _q_animationEnabled(); |
136 void _q_animationFinished(const HbEffect::EffectStatus &status); |
134 void _q_animationFinished(const HbEffect::EffectStatus &status); |
|
135 void _q_scrolling(QPointF newPosition); |
|
136 void _q_scrollingEnded(); |
|
137 void _q_scrollingStarted(); |
|
138 |
|
139 void setContentPosition(qreal value, Qt::Orientation orientation, bool animate); |
|
140 |
|
141 virtual bool panTriggered(QGestureEvent *event); |
137 |
142 |
138 public: |
143 public: |
139 QPersistentModelIndex mCurrentIndex; |
144 QPersistentModelIndex mCurrentIndex; |
140 |
145 |
141 HbAbstractItemView::SelectionMode mSelectionMode; |
146 HbAbstractItemView::SelectionMode mSelectionMode; |
142 |
147 |
143 ItemViewOptions mOptions; |
148 ItemViewOptions mOptions; |
144 |
149 |
145 SelectionSettings mSelectionSettings; |
150 SelectionSettings mSelectionSettings; |
146 |
151 |
147 QPointer<HbAbstractViewItem> mHitItem; |
|
148 |
|
149 // mContainer can always be assumed to be valid in the code |
152 // mContainer can always be assumed to be valid in the code |
150 HbAbstractItemContainer *mContainer; |
153 HbAbstractItemContainer *mContainer; |
151 |
154 |
152 QModelIndex mVisibleIndex; |
155 QModelIndex mVisibleIndex; |
153 |
156 |
154 QItemSelectionModel *mSelectionModel; |
157 QItemSelectionModel *mSelectionModel; |
155 QItemSelectionModel::SelectionFlag mContSelectionAction; |
158 QItemSelectionModel::SelectionFlag mContSelectionAction; |
156 |
159 |
157 bool mWasScrolling; |
|
158 QString mLayoutOptionName; |
160 QString mLayoutOptionName; |
159 bool mFilterRemoved; |
|
160 bool mClearingSelection; |
161 bool mClearingSelection; |
161 |
162 |
162 bool mAnimateItems; |
163 bool mAnimateItems; |
163 QList< QGraphicsItem * >mItemsAboutToBeDeleted; |
164 QList< QGraphicsItem * >mItemsAboutToBeDeleted; |
164 |
165 |
165 // introduced to solve scrollto problem when view is not visible |
166 // introduced to solve scrollto problem when view is not visible |
166 QPersistentModelIndex mPostponedScrollIndex; |
167 QPersistentModelIndex mPostponedScrollIndex; |
167 HbAbstractItemView::ScrollHint mPostponedScrollHint; |
168 HbAbstractItemView::ScrollHint mPostponedScrollHint; |
168 QModelIndex mPreviousSelectedIndex; |
169 QModelIndex mPreviousSelectedIndex; |
169 QItemSelectionModel::SelectionFlags mPreviousSelectedCommand; |
170 QItemSelectionModel::SelectionFlags mPreviousSelectedCommand; |
170 Hb::InteractionModifiers mInstantClickedModifiers; |
|
171 |
171 |
172 QTimer *mAnimationTimer; |
172 QTimer *mAnimationTimer; |
173 QList< QPersistentModelIndex > mAppearAnimationIndexes; |
173 QList< QPersistentModelIndex > mAppearAnimationIndexes; |
174 |
174 |
175 HbModelIterator *mModelIterator; |
175 HbModelIterator *mModelIterator; |
176 HbAbstractItemView::ItemAnimations mEnabledAnimations; |
176 HbAbstractItemView::ItemAnimations mEnabledAnimations; |
|
177 |
|
178 bool mLongPressEnabled; |
|
179 |
|
180 bool mOrigFriction; |
|
181 bool mDoingContiguousSelection; |
|
182 QPointF mPositionInContiguousSelection; |
177 |
183 |
178 private: |
184 private: |
179 static HbAbstractItemViewPrivate *d_ptr(HbAbstractItemView *abstractItemView) { |
185 static HbAbstractItemViewPrivate *d_ptr(HbAbstractItemView *abstractItemView) { |
180 Q_ASSERT(abstractItemView); |
186 Q_ASSERT(abstractItemView); |
181 return abstractItemView->d_func(); |
187 return abstractItemView->d_func(); |