summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews/qabstractitemview_p.h
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-07-11 14:56:28 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-07-11 14:56:28 (GMT)
commita701175aef8912b69afe61d23749dcfca765a231 (patch)
treeb0b383440a2d1a31fb82030f80f80f13d7efd4ec /src/gui/itemviews/qabstractitemview_p.h
parentc9122b19bfd86005080631da8b8f69a01d1ab7e8 (diff)
downloadQt-a701175aef8912b69afe61d23749dcfca765a231.zip
Qt-a701175aef8912b69afe61d23749dcfca765a231.tar.gz
Qt-a701175aef8912b69afe61d23749dcfca765a231.tar.bz2
ItemViews: make dragging faster when lots of items are selected
QListView know exactly what they have on their viewport and we only paint items clipped to the viewport. So we don't need to ask for each item its visualRect. NB: QTreeView and QTableView probably deservee the same treatment
Diffstat (limited to 'src/gui/itemviews/qabstractitemview_p.h')
-rw-r--r--src/gui/itemviews/qabstractitemview_p.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/itemviews/qabstractitemview_p.h b/src/gui/itemviews/qabstractitemview_p.h
index 7443d50..557e98b 100644
--- a/src/gui/itemviews/qabstractitemview_p.h
+++ b/src/gui/itemviews/qabstractitemview_p.h
@@ -86,6 +86,9 @@ struct QEditorInfo
};
+typedef QPair<QRect, QModelIndex> QItemViewPaintPair;
+typedef QList<QItemViewPaintPair> QItemViewPaintPairs;
+
class QEmptyModel : public QAbstractItemModel
{
public:
@@ -176,7 +179,9 @@ public:
q_func()->style()->drawPrimitive(QStyle::PE_IndicatorItemViewItemDrop, &opt, painter, q_func());
}
}
+
#endif
+ virtual QItemViewPaintPairs draggablePaintPairs(const QModelIndexList &indexes, QRect *r) const;
inline void releaseEditor(QWidget *editor) const {
if (editor) {