diff options
author | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2009-10-23 07:14:39 (GMT) |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2009-10-23 08:17:32 (GMT) |
commit | a95883e90fadeddd2f49da6765fb2d79f7ce77bd (patch) | |
tree | f1bc97b24b980a5107e5545dcb2580e101dd6584 /src/gui/itemviews/qlistview_p.h | |
parent | a5f7f88932c6911fb65552d65d62efdcf496beec (diff) | |
download | Qt-a95883e90fadeddd2f49da6765fb2d79f7ce77bd.zip Qt-a95883e90fadeddd2f49da6765fb2d79f7ce77bd.tar.gz Qt-a95883e90fadeddd2f49da6765fb2d79f7ce77bd.tar.bz2 |
Added visual DnD indicator for left to right flow in QListView
Extended the behaviour already present in QAbstractItemView into
QListView. This means some code duplication which should maybe be refactored
at some point. (Seems to be the price to pay when some delegate does almost
the same thing as the base class).
No auto-test, as it's a drag-and-drop related task.
Reviewed-by: Thierry
Task-number: QTBUG-3730
Diffstat (limited to 'src/gui/itemviews/qlistview_p.h')
-rw-r--r-- | src/gui/itemviews/qlistview_p.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/itemviews/qlistview_p.h b/src/gui/itemviews/qlistview_p.h index de4c7f3..3f8f9db 100644 --- a/src/gui/itemviews/qlistview_p.h +++ b/src/gui/itemviews/qlistview_p.h @@ -231,6 +231,11 @@ public: #ifndef QT_NO_DRAGANDDROP void paintDragDrop(QPainter *painter); + + // The next two methods are to be used on LefToRight flow only. + // WARNING: Plenty of duplicated code from QAbstractItemView{,Private}. + QAbstractItemView::DropIndicatorPosition position(const QPoint &pos, const QRect &rect, const QModelIndex &idx) const; + void dragMoveEvent(QDragMoveEvent *e); #endif private: @@ -356,6 +361,10 @@ public: QItemSelection selection(const QRect &rect) const; void selectAll(QItemSelectionModel::SelectionFlags command); +#ifndef QT_NO_DRAGANDDROP + virtual QAbstractItemView::DropIndicatorPosition position(const QPoint &pos, const QRect &rect, const QModelIndex &idx) const; +#endif + inline void setGridSize(const QSize &size) { grid = size; } inline QSize gridSize() const { return grid; } inline void setWrapping(bool b) { wrap = b; } |