summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews/qlistview_p.h
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-07-24 09:45:33 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-07-27 13:04:30 (GMT)
commit3643028959f0b38350e57e60ba4000435b75e592 (patch)
treec129e4dee11487abd437ab8ebd993ba261e06fa6 /src/gui/itemviews/qlistview_p.h
parentcf66c667a97c0079141eb3f2d9e997b7378ae792 (diff)
parentc36139c665e61866aff4bf8572890a735167a7d0 (diff)
downloadQt-3643028959f0b38350e57e60ba4000435b75e592.zip
Qt-3643028959f0b38350e57e60ba4000435b75e592.tar.gz
Qt-3643028959f0b38350e57e60ba4000435b75e592.tar.bz2
Merge commit 'qt/master-stable'
Conflicts: configure.exe qmake/Makefile.unix qmake/generators/makefile.cpp src/corelib/global/qglobal.h src/corelib/kernel/kernel.pri src/corelib/kernel/qcoreevent.cpp src/corelib/kernel/qsharedmemory_unix.cpp src/gui/graphicsview/qgraphicsscene.cpp src/gui/kernel/qaction.cpp src/gui/kernel/qaction.h src/gui/kernel/qaction_p.h src/gui/kernel/qapplication.cpp src/gui/kernel/qapplication.h src/gui/kernel/qwidget.cpp src/gui/kernel/qwidget.h src/gui/kernel/qwidget_mac.mm src/gui/painting/qgraphicssystemfactory.cpp src/gui/styles/qwindowsstyle.cpp src/gui/text/qfontengine_qpf.cpp src/gui/widgets/qabstractscrollarea_p.h src/network/access/qnetworkaccessdebugpipebackend.cpp src/network/socket/qlocalsocket_unix.cpp src/network/socket/qnativesocketengine_p.h src/network/socket/qnativesocketengine_unix.cpp src/openvg/qpaintengine_vg.cpp tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp tests/auto/qcssparser/qcssparser.pro tests/auto/qdir/tst_qdir.cpp tests/auto/qfile/tst_qfile.cpp tests/auto/qobject/tst_qobject.cpp tests/auto/qpathclipper/qpathclipper.pro tests/auto/qprocess/tst_qprocess.cpp tests/auto/qsettings/tst_qsettings.cpp tests/auto/qsharedpointer/qsharedpointer.pro tests/auto/qsqlquerymodel/qsqlquerymodel.pro tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro tests/auto/qsqltablemodel/qsqltablemodel.pro tests/auto/qsqlthread/qsqlthread.pro tests/auto/qwidget/tst_qwidget.cpp
Diffstat (limited to 'src/gui/itemviews/qlistview_p.h')
-rw-r--r--src/gui/itemviews/qlistview_p.h24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/gui/itemviews/qlistview_p.h b/src/gui/itemviews/qlistview_p.h
index a7a7000..1727ba4 100644
--- a/src/gui/itemviews/qlistview_p.h
+++ b/src/gui/itemviews/qlistview_p.h
@@ -153,9 +153,6 @@ public:
inline bool isHidden(int row) const;
inline int hiddenCount() const;
- inline void clearIntersections() const;
- inline void appendToIntersections(const QModelIndex &idx) const;
-
inline bool isRightToLeft() const;
QListViewPrivate *dd;
@@ -186,7 +183,7 @@ public:
QPoint initStaticLayout(const QListViewLayoutInfo &info);
void doStaticLayout(const QListViewLayoutInfo &info);
- void intersectingStaticSet(const QRect &area) const;
+ QVector<QModelIndex> intersectingStaticSet(const QRect &area) const;
int itemIndex(const QListViewItem &item) const;
@@ -216,7 +213,7 @@ class QDynamicListViewBase : public QCommonListViewBase
friend class QListViewPrivate;
public:
QDynamicListViewBase(QListView *q, QListViewPrivate *d) : QCommonListViewBase(q, d),
- batchStartRow(0), batchSavedDeltaSeg(0) {}
+ batchStartRow(0), batchSavedDeltaSeg(0), interSectingVector(0) {}
QBspTree tree;
QVector<QListViewItem> items;
@@ -230,6 +227,7 @@ public:
// used when laying out in batches
int batchStartRow;
int batchSavedDeltaSeg;
+ QVector<QModelIndex> *interSectingVector; //used from within intersectingDynamicSet
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
bool doBatchedItemLayout(const QListViewLayoutInfo &info, int max);
@@ -237,7 +235,7 @@ public:
void initBspTree(const QSize &contents);
QPoint initDynamicLayout(const QListViewLayoutInfo &info);
void doDynamicLayout(const QListViewLayoutInfo &info);
- void intersectingDynamicSet(const QRect &area) const;
+ QVector<QModelIndex> intersectingDynamicSet(const QRect &area) const;
static void addLeaf(QVector<int> &leaf, const QRect &area,
uint visited, QBspTree::Data data);
@@ -277,11 +275,11 @@ public:
bool doItemsLayout(int num);
- inline void intersectingSet(const QRect &area, bool doLayout = true) const {
+ inline QVector<QModelIndex> intersectingSet(const QRect &area, bool doLayout = true) const {
if (doLayout) executePostedLayout();
QRect a = (q_func()->isRightToLeft() ? flipX(area.normalized()) : area.normalized());
- if (viewMode == QListView::ListMode) staticListView->intersectingStaticSet(a);
- else dynamicListView->intersectingDynamicSet(a);
+ return (viewMode == QListView::ListMode) ? staticListView->intersectingStaticSet(a)
+ : dynamicListView->intersectingDynamicSet(a);
}
// ### FIXME:
@@ -351,6 +349,8 @@ public:
void scrollElasticBandBy(int dx, int dy);
+ QItemViewPaintPairs draggablePaintPairs(const QModelIndexList &indexes, QRect *r) const;
+
// ### FIXME: we only need one at a time
QDynamicListViewBase *dynamicListView;
QStaticListViewBase *staticListView;
@@ -383,9 +383,6 @@ public:
QRect layoutBounds;
- // used for intersecting set
- mutable QVector<QModelIndex> intersectVector;
-
// timers
QBasicTimer batchLayoutTimer;
@@ -438,9 +435,6 @@ inline QAbstractItemDelegate *QCommonListViewBase::delegate(const QModelIndex &i
inline bool QCommonListViewBase::isHidden(int row) const { return dd->isHidden(row); }
inline int QCommonListViewBase::hiddenCount() const { return dd->hiddenRows.count(); }
-inline void QCommonListViewBase::clearIntersections() const { dd->intersectVector.clear(); }
-inline void QCommonListViewBase::appendToIntersections(const QModelIndex &idx) const { dd->intersectVector.append(idx); }
-
inline bool QCommonListViewBase::isRightToLeft() const { return qq->isRightToLeft(); }
QT_END_NAMESPACE