Changeset 846 for trunk/src/gui/itemviews/qtreeview_p.h
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/itemviews/qtreeview_p.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 56 56 #include "private/qabstractitemview_p.h" 57 57 #include <QtCore/qvariantanimation.h> 58 #include <QtCore/qabstractitemmodel.h> 58 59 59 60 #ifndef QT_NO_TREEVIEW … … 63 64 struct QTreeViewItem 64 65 { 65 QTreeViewItem() : expanded(false), spanning(false), hasChildren(false),66 QTreeViewItem() : parentItem(-1), expanded(false), spanning(false), hasChildren(false), 66 67 hasMoreSiblings(false), total(0), level(0), height(0) {} 67 68 QModelIndex index; // we remove items whenever the indexes are invalidated 69 int parentItem; // parent item index in viewItems 68 70 uint expanded : 1; 69 71 uint spanning : 1; … … 75 77 }; 76 78 79 Q_DECLARE_TYPEINFO(QTreeViewItem, Q_MOVABLE_TYPE); 80 77 81 class QTreeViewPrivate : public QAbstractItemViewPrivate 78 82 { … … 88 92 allColumnsShowFocus(false), current(0), spanning(false), 89 93 animationsEnabled(false), columnResizeTimerID(0), 90 autoExpandDelay(-1), hoverBranch(-1), geometryRecursionBlock(false) {}94 autoExpandDelay(-1), hoverBranch(-1), geometryRecursionBlock(false), hasRemovedItems(false) {} 91 95 92 96 ~QTreeViewPrivate() {} … … 124 128 void _q_modelDestroyed(); 125 129 126 void layout(int item );130 void layout(int item, bool recusiveExpanding = false, bool afterIsUninitialized = false); 127 131 128 132 int pageUp(int item) const; … … 137 141 QModelIndex modelIndex(int i, int column = 0) const; 138 142 143 void insertViewItems(int pos, int count, const QTreeViewItem &viewItem); 144 void removeViewItems(int pos, int count); 145 #if 0 146 bool checkViewItems() const; 147 #endif 148 139 149 int firstVisibleItem(int *offset = 0) const; 140 150 int columnAt(int x) const; 141 151 bool hasVisibleChildren( const QModelIndex& parent) const; 142 152 143 void relayout(const QModelIndex &parent);144 153 bool expandOrCollapseItemAtPos(const QPoint &pos); 145 154 … … 156 165 157 166 void updateChildCount(const int parentItem, const int delta); 158 void rowsRemoved(const QModelIndex &parent,159 int start, int end, bool before);160 167 161 168 void paintAlternatingRowColors(QPainter *painter, QStyleOptionViewItemV4 *option, int y, int bottom) const; … … 233 240 // used for blocking recursion when calling setViewportMargins from updateGeometries 234 241 bool geometryRecursionBlock; 242 243 // If we should clean the set 244 bool hasRemovedItems; 235 245 }; 236 246
Note:
See TracChangeset
for help on using the changeset viewer.