128 virtual QListViewItem indexToListViewItem(const QModelIndex &index) const = 0; |
128 virtual QListViewItem indexToListViewItem(const QModelIndex &index) const = 0; |
129 virtual bool doBatchedItemLayout(const QListViewLayoutInfo &info, int max) = 0; |
129 virtual bool doBatchedItemLayout(const QListViewLayoutInfo &info, int max) = 0; |
130 virtual void clear() = 0; |
130 virtual void clear() = 0; |
131 virtual void setRowCount(int) = 0; |
131 virtual void setRowCount(int) = 0; |
132 virtual QVector<QModelIndex> intersectingSet(const QRect &area) const = 0; |
132 virtual QVector<QModelIndex> intersectingSet(const QRect &area) const = 0; |
|
133 virtual void dataChanged(const QModelIndex &, const QModelIndex &) = 0; |
133 |
134 |
134 virtual int horizontalScrollToValue(int index, QListView::ScrollHint hint, |
135 virtual int horizontalScrollToValue(int index, QListView::ScrollHint hint, |
135 bool leftOf, bool rightOf, const QRect &area, const QRect &rect) const; |
136 bool leftOf, bool rightOf, const QRect &area, const QRect &rect) const; |
136 virtual int verticalScrollToValue(int index, QListView::ScrollHint hint, |
137 virtual int verticalScrollToValue(int index, QListView::ScrollHint hint, |
137 bool above, bool below, const QRect &area, const QRect &rect) const; |
138 bool above, bool below, const QRect &area, const QRect &rect) const; |
139 virtual QRect mapToViewport(const QRect &rect) const {return rect;} |
140 virtual QRect mapToViewport(const QRect &rect) const {return rect;} |
140 virtual int horizontalOffset() const; |
141 virtual int horizontalOffset() const; |
141 virtual int verticalOffset() const { return verticalScrollBar()->value(); } |
142 virtual int verticalOffset() const { return verticalScrollBar()->value(); } |
142 virtual void updateHorizontalScrollBar(const QSize &step); |
143 virtual void updateHorizontalScrollBar(const QSize &step); |
143 virtual void updateVerticalScrollBar(const QSize &step); |
144 virtual void updateVerticalScrollBar(const QSize &step); |
144 virtual void dataChanged(const QModelIndex &, const QModelIndex &) { } |
|
145 virtual void appendHiddenRow(int row); |
145 virtual void appendHiddenRow(int row); |
146 virtual void removeHiddenRow(int row); |
146 virtual void removeHiddenRow(int row); |
147 virtual void setPositionForIndex(const QPoint &, const QModelIndex &) { } |
147 virtual void setPositionForIndex(const QPoint &, const QModelIndex &) { } |
148 |
148 |
149 #ifndef QT_NO_DRAGANDDROP |
149 #ifndef QT_NO_DRAGANDDROP |
215 QListViewItem indexToListViewItem(const QModelIndex &index) const; |
215 QListViewItem indexToListViewItem(const QModelIndex &index) const; |
216 bool doBatchedItemLayout(const QListViewLayoutInfo &info, int max); |
216 bool doBatchedItemLayout(const QListViewLayoutInfo &info, int max); |
217 void clear(); |
217 void clear(); |
218 void setRowCount(int rowCount) { flowPositions.resize(rowCount); } |
218 void setRowCount(int rowCount) { flowPositions.resize(rowCount); } |
219 QVector<QModelIndex> intersectingSet(const QRect &area) const; |
219 QVector<QModelIndex> intersectingSet(const QRect &area) const; |
|
220 void dataChanged(const QModelIndex &, const QModelIndex &); |
220 |
221 |
221 int horizontalScrollToValue(int index, QListView::ScrollHint hint, |
222 int horizontalScrollToValue(int index, QListView::ScrollHint hint, |
222 bool leftOf, bool rightOf,const QRect &area, const QRect &rect) const; |
223 bool leftOf, bool rightOf,const QRect &area, const QRect &rect) const; |
223 int verticalScrollToValue(int index, QListView::ScrollHint hint, |
224 int verticalScrollToValue(int index, QListView::ScrollHint hint, |
224 bool above, bool below, const QRect &area, const QRect &rect) const; |
225 bool above, bool below, const QRect &area, const QRect &rect) const; |
229 void updateHorizontalScrollBar(const QSize &step); |
230 void updateHorizontalScrollBar(const QSize &step); |
230 void updateVerticalScrollBar(const QSize &step); |
231 void updateVerticalScrollBar(const QSize &step); |
231 |
232 |
232 #ifndef QT_NO_DRAGANDDROP |
233 #ifndef QT_NO_DRAGANDDROP |
233 void paintDragDrop(QPainter *painter); |
234 void paintDragDrop(QPainter *painter); |
|
235 |
|
236 // The next two methods are to be used on LefToRight flow only. |
|
237 // WARNING: Plenty of duplicated code from QAbstractItemView{,Private}. |
|
238 QAbstractItemView::DropIndicatorPosition position(const QPoint &pos, const QRect &rect, const QModelIndex &idx) const; |
|
239 void dragMoveEvent(QDragMoveEvent *e); |
234 #endif |
240 #endif |
235 |
241 |
236 private: |
242 private: |
237 QPoint initStaticLayout(const QListViewLayoutInfo &info); |
243 QPoint initStaticLayout(const QListViewLayoutInfo &info); |
238 void doStaticLayout(const QListViewLayoutInfo &info); |
244 void doStaticLayout(const QListViewLayoutInfo &info); |
354 int verticalScrollToValue(const QModelIndex &index, const QRect &rect, QListView::ScrollHint hint) const; |
360 int verticalScrollToValue(const QModelIndex &index, const QRect &rect, QListView::ScrollHint hint) const; |
355 |
361 |
356 QItemSelection selection(const QRect &rect) const; |
362 QItemSelection selection(const QRect &rect) const; |
357 void selectAll(QItemSelectionModel::SelectionFlags command); |
363 void selectAll(QItemSelectionModel::SelectionFlags command); |
358 |
364 |
|
365 #ifndef QT_NO_DRAGANDDROP |
|
366 virtual QAbstractItemView::DropIndicatorPosition position(const QPoint &pos, const QRect &rect, const QModelIndex &idx) const; |
|
367 #endif |
|
368 |
359 inline void setGridSize(const QSize &size) { grid = size; } |
369 inline void setGridSize(const QSize &size) { grid = size; } |
360 inline QSize gridSize() const { return grid; } |
370 inline QSize gridSize() const { return grid; } |
361 inline void setWrapping(bool b) { wrap = b; } |
371 inline void setWrapping(bool b) { wrap = b; } |
362 inline bool isWrapping() const { return wrap; } |
372 inline bool isWrapping() const { return wrap; } |
363 inline void setSpacing(int s) { space = s; } |
373 inline void setSpacing(int s) { space = s; } |