summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews/qlistview_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/itemviews/qlistview_p.h')
-rw-r--r--src/widgets/itemviews/qlistview_p.h72
1 files changed, 36 insertions, 36 deletions
diff --git a/src/widgets/itemviews/qlistview_p.h b/src/widgets/itemviews/qlistview_p.h
index 42cb6b4eef..07cbd4036c 100644
--- a/src/widgets/itemviews/qlistview_p.h
+++ b/src/widgets/itemviews/qlistview_p.h
@@ -209,24 +209,24 @@ public:
int batchSavedPosition;
//reimplementations
- int itemIndex(const QListViewItem &item) const { return item.indexHint; }
- QListViewItem indexToListViewItem(const QModelIndex &index) const;
- bool doBatchedItemLayout(const QListViewLayoutInfo &info, int max);
- void clear();
- void setRowCount(int rowCount) { flowPositions.resize(rowCount); }
- QVector<QModelIndex> intersectingSet(const QRect &area) const;
- void dataChanged(const QModelIndex &, const QModelIndex &);
+ int itemIndex(const QListViewItem &item) const override { return item.indexHint; }
+ QListViewItem indexToListViewItem(const QModelIndex &index) const override;
+ bool doBatchedItemLayout(const QListViewLayoutInfo &info, int max) override;
+ void clear() override;
+ void setRowCount(int rowCount) override { flowPositions.resize(rowCount); }
+ QVector<QModelIndex> intersectingSet(const QRect &area) const override;
+ void dataChanged(const QModelIndex &, const QModelIndex &) override;
int horizontalScrollToValue(int index, QListView::ScrollHint hint,
- bool leftOf, bool rightOf,const QRect &area, const QRect &rect) const;
+ bool leftOf, bool rightOf,const QRect &area, const QRect &rect) const override;
int verticalScrollToValue(int index, QListView::ScrollHint hint,
- bool above, bool below, const QRect &area, const QRect &rect) const;
- void scrollContentsBy(int dx, int dy, bool scrollElasticBand);
- QRect mapToViewport(const QRect &rect) const;
- int horizontalOffset() const;
- int verticalOffset() const;
- void updateHorizontalScrollBar(const QSize &step);
- void updateVerticalScrollBar(const QSize &step);
+ bool above, bool below, const QRect &area, const QRect &rect) const override;
+ void scrollContentsBy(int dx, int dy, bool scrollElasticBand) override;
+ QRect mapToViewport(const QRect &rect) const override;
+ int horizontalOffset() const override;
+ int verticalOffset() const override;
+ void updateHorizontalScrollBar(const QSize &step) override;
+ void updateVerticalScrollBar(const QSize &step) override;
#ifndef QT_NO_DRAGANDDROP
// The next two methods are to be used on LefToRight flow only.
@@ -261,24 +261,24 @@ public:
QVector<QModelIndex> *interSectingVector; //used from within intersectingSet
//reimplementations
- int itemIndex(const QListViewItem &item) const;
- QListViewItem indexToListViewItem(const QModelIndex &index) const;
- bool doBatchedItemLayout(const QListViewLayoutInfo &info, int max);
- void clear();
- void setRowCount(int rowCount);
- QVector<QModelIndex> intersectingSet(const QRect &area) const;
-
- void scrollContentsBy(int dx, int dy, bool scrollElasticBand);
- void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
- void appendHiddenRow(int row);
- void removeHiddenRow(int row);
- void setPositionForIndex(const QPoint &position, const QModelIndex &index);
+ int itemIndex(const QListViewItem &item) const override;
+ QListViewItem indexToListViewItem(const QModelIndex &index) const override;
+ bool doBatchedItemLayout(const QListViewLayoutInfo &info, int max) override;
+ void clear() override;
+ void setRowCount(int rowCount) override;
+ QVector<QModelIndex> intersectingSet(const QRect &area) const override;
+
+ void scrollContentsBy(int dx, int dy, bool scrollElasticBand) override;
+ void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) override;
+ void appendHiddenRow(int row) override;
+ void removeHiddenRow(int row) override;
+ void setPositionForIndex(const QPoint &position, const QModelIndex &index) override;
#ifndef QT_NO_DRAGANDDROP
- bool filterDragMoveEvent(QDragMoveEvent *);
- bool filterDragLeaveEvent(QDragLeaveEvent *);
- bool filterDropEvent(QDropEvent *e);
- bool filterStartDrag(Qt::DropActions);
+ bool filterDragMoveEvent(QDragMoveEvent *) override;
+ bool filterDragLeaveEvent(QDragLeaveEvent *) override;
+ bool filterDropEvent(QDropEvent *e) override;
+ bool filterStartDrag(Qt::DropActions) override;
#endif
private:
@@ -349,18 +349,18 @@ public:
QModelIndex closestIndex(const QRect &target, const QVector<QModelIndex> &candidates) const;
QSize itemSize(const QStyleOptionViewItem &option, const QModelIndex &index) const;
- bool selectionAllowed(const QModelIndex &index) const
+ bool selectionAllowed(const QModelIndex &index) const override
{ if (viewMode == QListView::ListMode && !showElasticBand) return index.isValid(); return true; }
int horizontalScrollToValue(const QModelIndex &index, const QRect &rect, QListView::ScrollHint hint) const;
int verticalScrollToValue(const QModelIndex &index, const QRect &rect, QListView::ScrollHint hint) const;
QItemSelection selection(const QRect &rect) const;
- void selectAll(QItemSelectionModel::SelectionFlags command);
+ void selectAll(QItemSelectionModel::SelectionFlags command) override;
#ifndef QT_NO_DRAGANDDROP
- virtual QAbstractItemView::DropIndicatorPosition position(const QPoint &pos, const QRect &rect, const QModelIndex &idx) const;
- bool dropOn(QDropEvent *event, int *row, int *col, QModelIndex *index);
+ QAbstractItemView::DropIndicatorPosition position(const QPoint &pos, const QRect &rect, const QModelIndex &idx) const override;
+ bool dropOn(QDropEvent *event, int *row, int *col, QModelIndex *index) override;
#endif
inline void setGridSize(const QSize &size) { grid = size; }
@@ -383,7 +383,7 @@ public:
void scrollElasticBandBy(int dx, int dy);
- QItemViewPaintPairs draggablePaintPairs(const QModelIndexList &indexes, QRect *r) const;
+ QItemViewPaintPairs draggablePaintPairs(const QModelIndexList &indexes, QRect *r) const override;
void emitIndexesMoved(const QModelIndexList &indexes) { emit q_func()->indexesMoved(indexes); }