Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QTreeViewPrivate Class Reference

#include <qtreeview_p.h>

+ Inheritance diagram for QTreeViewPrivate:
+ Collaboration diagram for QTreeViewPrivate:

Public Member Functions

 QTreeViewPrivate ()
 
 ~QTreeViewPrivate ()
 
void initialize ()
 
int logicalIndexForTree () const
 
bool isTreePosition (int logicalIndex) const
 
QItemViewPaintPairs draggablePaintPairs (const QModelIndexList &indexes, QRect *r) const override
 \reimp
 
void adjustViewOptionsForIndex (QStyleOptionViewItem *option, const QModelIndex &current) const override
 
void expand (int item, bool emitSignal)
 
void collapse (int item, bool emitSignal)
 
void _q_columnsAboutToBeRemoved (const QModelIndex &, int, int) override
 
void _q_columnsRemoved (const QModelIndex &, int, int) override
 
void _q_modelAboutToBeReset ()
 
void _q_sortIndicatorChanged (int column, Qt::SortOrder order)
 
void _q_modelDestroyed () override
 
QRect intersectedRect (const QRect rect, const QModelIndex &topLeft, const QModelIndex &bottomRight) const override
 
void layout (int item, bool recusiveExpanding=false, bool afterIsUninitialized=false)
 
int pageUp (int item) const
 
int pageDown (int item) const
 
int itemForKeyHome () const
 
int itemForKeyEnd () const
 
int itemHeight (int item) const
 
int indentationForItem (int item) const
 
int coordinateForItem (int item) const
 
int itemAtCoordinate (int coordinate) const
 
int viewIndex (const QModelIndex &index) const
 
QModelIndex modelIndex (int i, int column=0) const
 
void insertViewItems (int pos, int count, const QTreeViewItem &viewItem)
 
void removeViewItems (int pos, int count)
 
int firstVisibleItem (int *offset=nullptr) const
 
int lastVisibleItem (int firstVisual=-1, int offset=-1) const
 
int columnAt (int x) const
 
bool hasVisibleChildren (const QModelIndex &parent) const
 
bool expandOrCollapseItemAtPos (const QPoint &pos)
 
void updateScrollBars ()
 
int itemDecorationAt (const QPoint &pos) const
 
QRect itemDecorationRect (const QModelIndex &index) const
 
QList< QPair< int, int > > columnRanges (const QModelIndex &topIndex, const QModelIndex &bottomIndex) const
 
void select (const QModelIndex &start, const QModelIndex &stop, QItemSelectionModel::SelectionFlags command)
 
QPair< int, int > startAndEndColumns (const QRect &rect) const
 
void updateChildCount (const int parentItem, const int delta)
 
void paintAlternatingRowColors (QPainter *painter, QStyleOptionViewItem *option, int y, int bottom) const
 
void calcLogicalIndices (QList< int > *logicalIndices, QList< QStyleOptionViewItem::ViewItemPosition > *itemPositions, int left, int right) const
 
int widthHintForIndex (const QModelIndex &index, int hint, const QStyleOptionViewItem &option, int i) const
 
bool storeExpanded (const QPersistentModelIndex &idx)
 
bool isIndexExpanded (const QModelIndex &idx) const
 
bool isRowHidden (const QModelIndex &idx) const
 
bool isItemHiddenOrDisabled (int i) const
 
int above (int item) const
 
int below (int item) const
 
void invalidateHeightCache (int item) const
 
int accessibleTable2Index (const QModelIndex &index) const
 
int accessibleTree2Index (const QModelIndex &index) const
 
void updateIndentationFromStyle ()
 
- Public Member Functions inherited from QAbstractItemViewPrivate
 QAbstractItemViewPrivate ()
 
virtual ~QAbstractItemViewPrivate ()
 
void init ()
 
virtual void _q_rowsRemoved (const QModelIndex &parent, int start, int end)
 
virtual void _q_rowsInserted (const QModelIndex &parent, int start, int end)
 
virtual void _q_columnsAboutToBeRemoved (const QModelIndex &parent, int start, int end)
 
virtual void _q_columnsRemoved (const QModelIndex &parent, int start, int end)
 
virtual void _q_columnsInserted (const QModelIndex &parent, int start, int end)
 
virtual void _q_modelDestroyed ()
 
virtual void _q_layoutChanged ()
 
virtual void _q_rowsMoved (const QModelIndex &source, int sourceStart, int sourceEnd, const QModelIndex &destination, int destinationStart)
 
virtual void _q_columnsMoved (const QModelIndex &source, int sourceStart, int sourceEnd, const QModelIndex &destination, int destinationStart)
 
virtual QRect intersectedRect (const QRect rect, const QModelIndex &topLeft, const QModelIndex &bottomRight) const
 
void _q_headerDataChanged ()
 
void _q_scrollerStateChanged ()
 
void _q_delegateSizeHintChanged (const QModelIndex &index)
 
void fetchMore ()
 
bool shouldEdit (QAbstractItemView::EditTrigger trigger, const QModelIndex &index) const
 
bool shouldForwardEvent (QAbstractItemView::EditTrigger trigger, const QEvent *event) const
 
bool shouldAutoScroll (const QPoint &pos) const
 
void doDelayedItemsLayout (int delay=0)
 
void interruptDelayedItemsLayout () const
 
void updateGeometry ()
 
void startAutoScroll ()
 
void stopAutoScroll ()
 
bool droppingOnItself (QDropEvent *event, const QModelIndex &index)
 
QWidgeteditor (const QModelIndex &index, const QStyleOptionViewItem &options)
 
bool sendDelegateEvent (const QModelIndex &index, QEvent *event) const
 
bool openEditor (const QModelIndex &index, QEvent *event)
 
void updateEditorData (const QModelIndex &topLeft, const QModelIndex &bottomRight)
 
void selectAllInEditor (QWidget *w)
 
QItemSelectionModel::SelectionFlags multiSelectionCommand (const QModelIndex &index, const QEvent *event) const
 
QItemSelectionModel::SelectionFlags extendedSelectionCommand (const QModelIndex &index, const QEvent *event) const
 
QItemSelectionModel::SelectionFlags contiguousSelectionCommand (const QModelIndex &index, const QEvent *event) const
 
virtual void selectAll (QItemSelectionModel::SelectionFlags command)
 
void setHoverIndex (const QPersistentModelIndex &index)
 
void checkMouseMove (const QPersistentModelIndex &index)
 
void checkMouseMove (const QPoint &pos)
 
QItemSelectionModel::SelectionFlags selectionBehaviorFlags () const
 
virtual QItemViewPaintPairs draggablePaintPairs (const QModelIndexList &indexes, QRect *r) const
 
virtual void adjustViewOptionsForIndex (QStyleOptionViewItem *, const QModelIndex &) const
 
void releaseEditor (QWidget *editor, const QModelIndex &index=QModelIndex()) const
 
void executePostedLayout () const
 
void setDirtyRegion (const QRegion &visualRegion)
 
void scrollDirtyRegion (int dx, int dy)
 
void scrollContentsBy (int dx, int dy)
 
void updateDirtyRegion ()
 
void clearOrRemove ()
 
void checkPersistentEditorFocus ()
 
QPixmap renderToPixmap (const QModelIndexList &indexes, QRect *r) const
 
QPoint offset () const
 
const QEditorInfoeditorForIndex (const QModelIndex &index) const
 
bool hasEditor (const QModelIndex &index) const
 
QModelIndex indexForEditor (QWidget *editor) const
 
void addEditor (const QModelIndex &index, QWidget *editor, bool isStatic)
 
void removeEditor (QWidget *editor)
 
bool isAnimating () const
 
bool isIndexValid (const QModelIndex &index) const
 
bool isIndexSelectable (const QModelIndex &index) const
 
bool isIndexEnabled (const QModelIndex &index) const
 
virtual bool selectionAllowed (const QModelIndex &index) const
 
QPoint contentsOffset () const override
 
int delegateRefCount (const QAbstractItemDelegate *delegate) const
 
bool isPersistent (const QModelIndex &index) const
 
void doDelayedReset ()
 

Public Attributes

QHeaderViewheader
 
int indent
 
QList< QTreeViewItemviewItems
 
int lastViewedItem
 
int defaultItemHeight
 
bool uniformRowHeights
 
bool rootDecoration
 
bool itemsExpandable
 
bool sortingEnabled
 
bool expandsOnDoubleClick
 
bool allColumnsShowFocus
 
bool customIndent
 
QPair< int, int > leftAndRight
 
int current
 
bool spanning
 
QSet< QPersistentModelIndexexpandedIndexes
 
bool animationsEnabled
 
QSet< QPersistentModelIndexhiddenIndexes
 
QSet< QPersistentModelIndexspanningIndexes
 
int columnResizeTimerID
 
QList< int > columnsToUpdate
 
int autoExpandDelay
 
QBasicTimer openTimer
 
int hoverBranch
 
bool geometryRecursionBlock
 
bool hasRemovedItems
 
int treePosition
 
- Public Attributes inherited from QAbstractItemViewPrivate
QAbstractItemModelmodel
 
QPointer< QAbstractItemDelegateitemDelegate
 
QMap< int, QPointer< QAbstractItemDelegate > > rowDelegates
 
QMap< int, QPointer< QAbstractItemDelegate > > columnDelegates
 
QPointer< QItemSelectionModelselectionModel
 
QItemSelectionModel::SelectionFlag ctrlDragSelectionFlag
 
bool noSelectionOnMousePress
 
QAbstractItemView::SelectionMode selectionMode
 
QAbstractItemView::SelectionBehavior selectionBehavior
 
QEditorIndexHash editorIndexHash
 
QIndexEditorHash indexEditorHash
 
QSet< QWidget * > persistent
 
QWidgetcurrentlyCommittingEditor
 
QBasicTimer pressClosedEditorWatcher
 
QPersistentModelIndex lastEditedIndex
 
bool pressClosedEditor
 
bool waitForIMCommit
 
QPersistentModelIndex enteredIndex
 
QPersistentModelIndex pressedIndex
 
QPersistentModelIndex currentSelectionStartIndex
 
Qt::KeyboardModifiers pressedModifiers
 
QPoint pressedPosition
 
QPoint draggedPosition
 
bool pressedAlreadySelected
 
bool releaseFromDoubleClick
 
bool viewportEnteredNeeded
 
QAbstractItemView::State state
 
QAbstractItemView::State stateBeforeAnimation
 
QAbstractItemView::EditTriggers editTriggers
 
QAbstractItemView::EditTrigger lastTrigger
 
QPersistentModelIndex root
 
QPersistentModelIndex hover
 
bool tabKeyNavigation
 
QString keyboardInput
 
QElapsedTimer keyboardInputTime
 
bool autoScroll
 
QBasicTimer autoScrollTimer
 
int autoScrollMargin
 
int autoScrollCount
 
bool shouldScrollToCurrentOnShow
 
bool shouldClearStatusTip
 
bool alternatingColors
 
QSize iconSize
 
Qt::TextElideMode textElideMode
 
QRegion updateRegion
 
QPoint scrollDelayOffset
 
QBasicTimer updateTimer
 
QBasicTimer delayedEditing
 
QBasicTimer delayedAutoScroll
 
QBasicTimer delayedReset
 
QAbstractItemView::ScrollMode verticalScrollMode
 
QAbstractItemView::ScrollMode horizontalScrollMode
 
QItemSelection oldSelection
 
QModelIndex oldCurrent
 
bool currentIndexSet
 
bool wrapItemText
 
bool delayedPendingLayout
 
bool moveCursorUpdatedView
 
bool verticalScrollModeSet
 
bool horizontalScrollModeSet
 

Detailed Description

Definition at line 47 of file qtreeview_p.h.

Constructor & Destructor Documentation

◆ QTreeViewPrivate()

QTreeViewPrivate::QTreeViewPrivate ( )
inline

Definition at line 52 of file qtreeview_p.h.

◆ ~QTreeViewPrivate()

QTreeViewPrivate::~QTreeViewPrivate ( )
inline

Definition at line 63 of file qtreeview_p.h.

Member Function Documentation

◆ _q_columnsAboutToBeRemoved()

void QTreeViewPrivate::_q_columnsAboutToBeRemoved ( const QModelIndex parent,
int  start,
int  end 
)
overridevirtual

This slot is called when columns are about to be removed. The deleted columns are those under the given parent from start to end inclusive.

Reimplemented from QAbstractItemViewPrivate.

Definition at line 3293 of file qtreeview.cpp.

References QAbstractItemViewPrivate::_q_columnsAboutToBeRemoved(), QList< T >::clear(), parent, and viewItems.

+ Here is the call graph for this function:

◆ _q_columnsRemoved()

void QTreeViewPrivate::_q_columnsRemoved ( const QModelIndex index,
int  start,
int  end 
)
overridevirtual

This slot is called when columns have been removed. The deleted rows are those under the given parent from start to end inclusive.

Reimplemented from QAbstractItemViewPrivate.

Definition at line 3300 of file qtreeview.cpp.

References QAbstractItemViewPrivate::_q_columnsRemoved(), QAbstractItemViewPrivate::doDelayedItemsLayout(), and parent.

+ Here is the call graph for this function:

◆ _q_modelAboutToBeReset()

void QTreeViewPrivate::_q_modelAboutToBeReset ( )

Definition at line 3288 of file qtreeview.cpp.

References QList< T >::clear(), and viewItems.

+ Here is the call graph for this function:

◆ _q_modelDestroyed()

void QTreeViewPrivate::_q_modelDestroyed ( )
overridevirtual

Reimplemented from QAbstractItemViewPrivate.

Definition at line 1371 of file qtreeview.cpp.

References QAbstractItemViewPrivate::_q_modelDestroyed(), QList< T >::clear(), and viewItems.

+ Here is the call graph for this function:

◆ _q_sortIndicatorChanged()

void QTreeViewPrivate::_q_sortIndicatorChanged ( int  column,
Qt::SortOrder  order 
)

Definition at line 3977 of file qtreeview.cpp.

References QAbstractItemViewPrivate::model.

◆ above()

int QTreeViewPrivate::above ( int  item) const
inline

Definition at line 205 of file qtreeview_p.h.

References i, and item.

◆ accessibleTable2Index()

int QTreeViewPrivate::accessibleTable2Index ( const QModelIndex index) const
inline

Definition at line 212 of file qtreeview_p.h.

References QSqlQueryModel::columnCount(), header(), and model.

+ Here is the call graph for this function:

◆ accessibleTree2Index()

int QTreeViewPrivate::accessibleTree2Index ( const QModelIndex index) const

Definition at line 3982 of file qtreeview.cpp.

◆ adjustViewOptionsForIndex()

void QTreeViewPrivate::adjustViewOptionsForIndex ( QStyleOptionViewItem *  option,
const QModelIndex current 
) const
overridevirtual

◆ below()

int QTreeViewPrivate::below ( int  item) const
inline

Definition at line 207 of file qtreeview_p.h.

References i, item, and QList< T >::size().

+ Here is the call graph for this function:

◆ calcLogicalIndices()

void QTreeViewPrivate::calcLogicalIndices ( QList< int > *  logicalIndices,
QList< QStyleOptionViewItem::ViewItemPosition > *  itemPositions,
int  left,
int  right 
) const

Definition at line 1530 of file qtreeview.cpp.

References QList< T >::append(), QList< T >::at(), QHeaderView::count(), header, QHeaderView::isSectionHidden(), isTreePosition(), QHeaderView::logicalIndex(), pos, QList< T >::resize(), QList< T >::size(), and spanning.

Referenced by adjustViewOptionsForIndex().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ collapse()

void QTreeViewPrivate::collapse ( int  item,
bool  emitSignal 
)

Definition at line 3134 of file qtreeview.cpp.

References QAbstractItemView::AnimatingState, animationsEnabled, QList< T >::at(), QAbstractAnimation::Backward, QAbstractItemView::CollapsingState, QAbstractItemViewPrivate::delayedAutoScroll, emit, QSet< T >::end(), QSet< T >::erase(), QTreeViewItem::expanded, expandedIndexes, QSet< T >::find(), QTreeViewItem::index, QSet< T >::isEmpty(), QAbstractItemViewPrivate::isPersistent(), it, item, modelIndex(), removeViewItems(), QAbstractItemViewPrivate::state, QAbstractItemViewPrivate::stateBeforeAnimation, QBasicTimer::stop(), QTreeViewItem::total, and viewItems.

Referenced by expandOrCollapseItemAtPos().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ columnAt()

int QTreeViewPrivate::columnAt ( int  x) const

Definition at line 3706 of file qtreeview.cpp.

References header, and QHeaderView::logicalIndexAt().

+ Here is the call graph for this function:

◆ columnRanges()

QList< QPair< int, int > > QTreeViewPrivate::columnRanges ( const QModelIndex topIndex,
const QModelIndex bottomIndex 
) const

Definition at line 3834 of file qtreeview.cpp.

References QList< T >::at(), QList< T >::begin(), QModelIndex::column(), current, QList< T >::end(), header, i, QHeaderView::isSectionHidden(), QHeaderView::logicalIndex(), qMax(), qMin(), ret, QList< T >::size(), and QHeaderView::visualIndex().

Referenced by select().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ coordinateForItem()

int QTreeViewPrivate::coordinateForItem ( int  item) const

Returns the viewport y coordinate for item.

Definition at line 3504 of file qtreeview.cpp.

References defaultItemHeight, i, item, itemHeight(), Q_ASSERT, QAbstractItemView::ScrollPerPixel, QList< T >::size(), uniformRowHeights, QAbstractItemViewPrivate::verticalScrollMode, and viewItems.

Referenced by itemDecorationRect(), pageDown(), and pageUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ draggablePaintPairs()

QItemViewPaintPairs QTreeViewPrivate::draggablePaintPairs ( const QModelIndexList indexes,
QRect r 
) const
overridevirtual

\reimp

We have a QTreeView way of knowing what elements are on the viewport

Reimplemented from QAbstractItemViewPrivate.

Definition at line 1402 of file qtreeview.cpp.

References QAbstractItemViewPrivate::draggablePaintPairs(), QSet< T >::isEmpty(), list, Q_ASSERT, and spanningIndexes.

+ Here is the call graph for this function:

◆ expand()

void QTreeViewPrivate::expand ( int  item,
bool  emitSignal 
)

Definition at line 3067 of file qtreeview.cpp.

References QAbstractItemView::AnimatingState, animationsEnabled, QList< T >::at(), QAbstractItemModel::canFetchMore(), emit, QTreeViewItem::expanded, QAbstractItemView::ExpandingState, QAbstractItemModel::fetchMore(), QAbstractAnimation::Forward, QTreeViewItem::index, item, Qt::ItemNeverHasChildren, layout, QAbstractItemViewPrivate::model, QAbstractItemViewPrivate::state, QAbstractItemViewPrivate::stateBeforeAnimation, storeExpanded(), and viewItems.

Referenced by expandOrCollapseItemAtPos().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expandOrCollapseItemAtPos()

bool QTreeViewPrivate::expandOrCollapseItemAtPos ( const QPoint pos)

Definition at line 1347 of file qtreeview.cpp.

References QList< T >::at(), collapse(), QAbstractItemView::EditingState, expand(), QTreeViewItem::expanded, hasVisibleChildren(), i, QTreeViewItem::index, QAbstractItemViewPrivate::isAnimating(), itemDecorationAt(), itemsExpandable, QAbstractItemView::NoState, pos, QAbstractItemViewPrivate::state, viewItems, and viewport().

+ Here is the call graph for this function:

◆ firstVisibleItem()

int QTreeViewPrivate::firstVisibleItem ( int *  offset = nullptr) const

Definition at line 3659 of file qtreeview.cpp.

References defaultItemHeight, i, itemHeight(), QAbstractItemView::ScrollPerItem, QList< T >::size(), uniformRowHeights, QAbstractItemViewPrivate::verticalScrollMode, and viewItems.

Referenced by lastVisibleItem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasVisibleChildren()

bool QTreeViewPrivate::hasVisibleChildren ( const QModelIndex parent) const

Definition at line 3956 of file qtreeview.cpp.

References QAbstractItemModel::hasChildren(), hiddenIndexes, i, QSet< T >::isEmpty(), Qt::ItemNeverHasChildren, QAbstractItemViewPrivate::model, parent, and QAbstractItemModel::rowCount().

Referenced by expandOrCollapseItemAtPos(), and itemDecorationRect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ indentationForItem()

int QTreeViewPrivate::indentationForItem ( int  item) const

Definition at line 3471 of file qtreeview.cpp.

References QList< T >::at(), indent, item, QTreeViewItem::level, rootDecoration, QList< T >::size(), and viewItems.

Referenced by itemDecorationRect(), and widthHintForIndex().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initialize()

◆ insertViewItems()

void QTreeViewPrivate::insertViewItems ( int  pos,
int  count,
const QTreeViewItem viewItem 
)

Definition at line 3101 of file qtreeview.cpp.

References QList< T >::data(), i, QList< T >::insert(), items, pos, QList< T >::size(), and viewItems.

+ Here is the call graph for this function:

◆ intersectedRect()

QRect QTreeViewPrivate::intersectedRect ( const QRect  rect,
const QModelIndex topLeft,
const QModelIndex bottomRight 
) const
overridevirtual

Reimplemented from QAbstractItemViewPrivate.

Definition at line 1379 of file qtreeview.cpp.

References QModelIndex::column(), QAbstractItemViewPrivate::executePostedLayout(), QAbstractItemModel::index(), isRowHidden(), QAbstractItemViewPrivate::model, QModelIndex::parent(), rect, and QModelIndex::row().

+ Here is the call graph for this function:

◆ invalidateHeightCache()

void QTreeViewPrivate::invalidateHeightCache ( int  item) const
inline

Definition at line 209 of file qtreeview_p.h.

References item.

◆ isIndexExpanded()

bool QTreeViewPrivate::isIndexExpanded ( const QModelIndex idx) const
inline

Definition at line 183 of file qtreeview_p.h.

References QSet< T >::contains(), QModelIndex::flags(), QAbstractItemViewPrivate::isPersistent(), and Qt::ItemNeverHasChildren.

+ Here is the call graph for this function:

◆ isItemHiddenOrDisabled()

bool QTreeViewPrivate::isItemHiddenOrDisabled ( int  i) const
inline

Definition at line 198 of file qtreeview_p.h.

References QList< T >::at(), i, QAbstractItemViewPrivate::isIndexEnabled(), and QList< T >::size().

Referenced by itemForKeyEnd(), itemForKeyHome(), pageDown(), and pageUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isRowHidden()

bool QTreeViewPrivate::isRowHidden ( const QModelIndex idx) const
inline

Definition at line 191 of file qtreeview_p.h.

References QSet< T >::contains(), QSet< T >::isEmpty(), and QAbstractItemViewPrivate::isPersistent().

Referenced by intersectedRect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isTreePosition()

bool QTreeViewPrivate::isTreePosition ( int  logicalIndex) const
inline

Definition at line 66 of file qtreeview_p.h.

Referenced by calcLogicalIndices(), itemDecorationAt(), and widthHintForIndex().

+ Here is the caller graph for this function:

◆ itemAtCoordinate()

int QTreeViewPrivate::itemAtCoordinate ( int  coordinate) const

Returns the index of the view item at the given viewport coordinate.

See also
modelIndex()

Definition at line 3555 of file qtreeview.cpp.

References defaultItemHeight, itemHeight(), QAbstractItemView::ScrollPerPixel, QList< T >::size(), uniformRowHeights, QAbstractItemViewPrivate::verticalScrollMode, and viewItems.

Referenced by itemDecorationAt(), pageDown(), and pageUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ itemDecorationAt()

int QTreeViewPrivate::itemDecorationAt ( const QPoint pos) const

Definition at line 3785 of file qtreeview.cpp.

References QRect::contains(), QAbstractItemViewPrivate::executePostedLayout(), header, QSet< T >::isEmpty(), isTreePosition(), itemAtCoordinate(), itemDecorationRect(), QHeaderView::logicalIndexAt(), modelIndex(), pos, and spanningIndexes.

Referenced by expandOrCollapseItemAtPos().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ itemDecorationRect()

QRect QTreeViewPrivate::itemDecorationRect ( const QModelIndex index) const

Definition at line 3807 of file qtreeview.cpp.

References QList< T >::at(), coordinateForItem(), hasVisibleChildren(), header, indent, indentationForItem(), QTreeViewItem::index, QStyleOption::initFrom(), itemHeight(), logicalIndexForTree(), opt, position(), rect, QStyleOption::rect, QAbstractItemViewPrivate::root, rootDecoration, QStyle::SE_TreeViewDisclosureItem, QHeaderView::sectionSize(), QHeaderView::sectionViewportPosition(), viewIndex(), and viewItems.

Referenced by itemDecorationAt().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ itemForKeyEnd()

int QTreeViewPrivate::itemForKeyEnd ( ) const

Definition at line 3463 of file qtreeview.cpp.

References isItemHiddenOrDisabled(), QList< T >::size(), and viewItems.

+ Here is the call graph for this function:

◆ itemForKeyHome()

int QTreeViewPrivate::itemForKeyHome ( ) const

Definition at line 3455 of file qtreeview.cpp.

References isItemHiddenOrDisabled(), QList< T >::size(), and viewItems.

+ Here is the call graph for this function:

◆ itemHeight()

int QTreeViewPrivate::itemHeight ( int  item) const

Definition at line 3481 of file qtreeview.cpp.

References QList< T >::at(), defaultItemHeight, QTreeViewItem::height, QTreeViewItem::index, QList< T >::isEmpty(), item, Q_ASSERT, qMax(), QList< T >::size(), uniformRowHeights, and viewItems.

Referenced by coordinateForItem(), firstVisibleItem(), itemAtCoordinate(), itemDecorationRect(), lastVisibleItem(), and updateScrollBars().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lastVisibleItem()

int QTreeViewPrivate::lastVisibleItem ( int  firstVisual = -1,
int  offset = -1 
) const

Definition at line 3688 of file qtreeview.cpp.

References firstVisibleItem(), i, itemHeight(), QAbstractItemViewPrivate::offset(), QList< T >::size(), viewItems, and viewport().

+ Here is the call graph for this function:

◆ layout()

void QTreeViewPrivate::layout ( int  i,
bool  recursiveExpanding = false,
bool  afterIsUninitialized = false 
)

creates and initialize the viewItem structure of the children of the element

set recursiveExpanding if the function has to expand all the children (called from expandAll) afterIsUninitialized is when we recurse from layout(-1), it means all the items after 'i' are not yet initialized and need not to be moved

Definition at line 3314 of file qtreeview.cpp.

References current, i, modelIndex(), parent, qScopeGuard(), QAbstractItemViewPrivate::root, QList< T >::size(), and viewItems.

+ Here is the call graph for this function:

◆ logicalIndexForTree()

int QTreeViewPrivate::logicalIndexForTree ( ) const

Definition at line 1319 of file qtreeview.cpp.

References header, QHeaderView::logicalIndex(), and treePosition.

Referenced by itemDecorationRect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ modelIndex()

QModelIndex QTreeViewPrivate::modelIndex ( int  i,
int  column = 0 
) const

Definition at line 3648 of file qtreeview.cpp.

References QList< T >::at(), i, QTreeViewItem::index, ret, QList< T >::size(), and viewItems.

Referenced by collapse(), itemDecorationAt(), layout(), and select().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pageDown()

int QTreeViewPrivate::pageDown ( int  item) const

Definition at line 3443 of file qtreeview.cpp.

References coordinateForItem(), i, isItemHiddenOrDisabled(), itemAtCoordinate(), QList< T >::size(), viewItems, and viewport().

+ Here is the call graph for this function:

◆ pageUp()

int QTreeViewPrivate::pageUp ( int  item) const

Definition at line 3431 of file qtreeview.cpp.

References coordinateForItem(), i, isItemHiddenOrDisabled(), itemAtCoordinate(), QList< T >::size(), viewItems, and viewport().

+ Here is the call graph for this function:

◆ paintAlternatingRowColors()

void QTreeViewPrivate::paintAlternatingRowColors ( QPainter painter,
QStyleOptionViewItem *  option,
int  y,
int  bottom 
) const

Definition at line 1327 of file qtreeview.cpp.

References QAbstractItemViewPrivate::alternatingColors, current, defaultItemHeight, QSize::height(), QAbstractItemViewPrivate::itemDelegate, painter, QStyle::PE_PanelItemViewRow, QStyle::SH_ItemView_PaintAlternatingRowColorsForEmptyArea, QAbstractItemDelegate::sizeHint(), and viewport().

+ Here is the call graph for this function:

◆ removeViewItems()

void QTreeViewPrivate::removeViewItems ( int  pos,
int  count 
)

Definition at line 3110 of file qtreeview.cpp.

References QList< T >::data(), i, items, pos, QList< T >::remove(), QList< T >::size(), and viewItems.

Referenced by collapse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ select()

◆ startAndEndColumns()

QPair< int, int > QTreeViewPrivate::startAndEndColumns ( const QRect rect) const

Definition at line 3941 of file qtreeview.cpp.

References QHeaderView::count(), header, qMakePair(), qMax(), qMin(), rect, and QHeaderView::visualIndexAt().

+ Here is the call graph for this function:

◆ storeExpanded()

bool QTreeViewPrivate::storeExpanded ( const QPersistentModelIndex idx)
inline

Definition at line 176 of file qtreeview_p.h.

References QSet< T >::contains(), and QSet< T >::insert().

Referenced by expand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateChildCount()

void QTreeViewPrivate::updateChildCount ( const int  parentItem,
const int  delta 
)

◆ updateIndentationFromStyle()

void QTreeViewPrivate::updateIndentationFromStyle ( )

Definition at line 3990 of file qtreeview.cpp.

References indent, and QStyle::PM_TreeViewIndentation.

Referenced by initialize().

+ Here is the caller graph for this function:

◆ updateScrollBars()

◆ viewIndex()

int QTreeViewPrivate::viewIndex ( const QModelIndex index) const

Definition at line 3604 of file qtreeview.cpp.

References QList< T >::at(), i, QTreeViewItem::index, QModelIndex::internalId(), QList< T >::isEmpty(), QModelIndex::isValid(), j, lastViewedItem, qMax(), qMin(), QModelIndex::row(), QModelIndex::sibling(), QList< T >::size(), and viewItems.

Referenced by adjustViewOptionsForIndex(), itemDecorationRect(), and select().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ widthHintForIndex()

int QTreeViewPrivate::widthHintForIndex ( const QModelIndex index,
int  hint,
const QStyleOptionViewItem &  option,
int  i 
) const

Get sizeHint width for single index (providing existing hint and style option) and index in viewIndex i.

Definition at line 1586 of file qtreeview.cpp.

References QSet< T >::contains(), QPointer< T >::data(), QAbstractItemViewPrivate::editor(), QAbstractItemViewPrivate::editorForIndex(), hint(), i, indentationForItem(), isTreePosition(), QWidget::maximumSize, QWidget::minimumSize, QAbstractItemViewPrivate::persistent, qBound(), qMax(), QWidget::sizeHint, QEditorInfo::widget, and QSize::width().

+ Here is the call graph for this function:

Member Data Documentation

◆ allColumnsShowFocus

bool QTreeViewPrivate::allColumnsShowFocus

Definition at line 164 of file qtreeview_p.h.

◆ animationsEnabled

bool QTreeViewPrivate::animationsEnabled

Definition at line 174 of file qtreeview_p.h.

Referenced by collapse(), expand(), and initialize().

◆ autoExpandDelay

int QTreeViewPrivate::autoExpandDelay

Definition at line 228 of file qtreeview_p.h.

◆ columnResizeTimerID

int QTreeViewPrivate::columnResizeTimerID

Definition at line 224 of file qtreeview_p.h.

◆ columnsToUpdate

QList<int> QTreeViewPrivate::columnsToUpdate

Definition at line 225 of file qtreeview_p.h.

◆ current

int QTreeViewPrivate::current
mutable

◆ customIndent

bool QTreeViewPrivate::customIndent

Definition at line 165 of file qtreeview_p.h.

◆ defaultItemHeight

int QTreeViewPrivate::defaultItemHeight

◆ expandedIndexes

QSet<QPersistentModelIndex> QTreeViewPrivate::expandedIndexes

Definition at line 173 of file qtreeview_p.h.

Referenced by collapse().

◆ expandsOnDoubleClick

bool QTreeViewPrivate::expandsOnDoubleClick

Definition at line 163 of file qtreeview_p.h.

◆ geometryRecursionBlock

bool QTreeViewPrivate::geometryRecursionBlock

Definition at line 235 of file qtreeview_p.h.

◆ hasRemovedItems

bool QTreeViewPrivate::hasRemovedItems

Definition at line 238 of file qtreeview_p.h.

◆ header

◆ hiddenIndexes

QSet<QPersistentModelIndex> QTreeViewPrivate::hiddenIndexes

Definition at line 189 of file qtreeview_p.h.

Referenced by hasVisibleChildren().

◆ hoverBranch

int QTreeViewPrivate::hoverBranch
mutable

Definition at line 232 of file qtreeview_p.h.

◆ indent

int QTreeViewPrivate::indent

◆ itemsExpandable

bool QTreeViewPrivate::itemsExpandable

Definition at line 161 of file qtreeview_p.h.

Referenced by expandOrCollapseItemAtPos().

◆ lastViewedItem

int QTreeViewPrivate::lastViewedItem
mutable

Definition at line 157 of file qtreeview_p.h.

Referenced by viewIndex().

◆ leftAndRight

QPair<int,int> QTreeViewPrivate::leftAndRight
mutable

Definition at line 168 of file qtreeview_p.h.

◆ openTimer

QBasicTimer QTreeViewPrivate::openTimer

Definition at line 229 of file qtreeview_p.h.

◆ rootDecoration

bool QTreeViewPrivate::rootDecoration

Definition at line 160 of file qtreeview_p.h.

Referenced by indentationForItem(), and itemDecorationRect().

◆ sortingEnabled

bool QTreeViewPrivate::sortingEnabled

◆ spanning

bool QTreeViewPrivate::spanning
mutable

Definition at line 170 of file qtreeview_p.h.

Referenced by adjustViewOptionsForIndex(), and calcLogicalIndices().

◆ spanningIndexes

QSet<QPersistentModelIndex> QTreeViewPrivate::spanningIndexes

Definition at line 221 of file qtreeview_p.h.

Referenced by draggablePaintPairs(), and itemDecorationAt().

◆ treePosition

int QTreeViewPrivate::treePosition

Definition at line 241 of file qtreeview_p.h.

Referenced by logicalIndexForTree().

◆ uniformRowHeights

bool QTreeViewPrivate::uniformRowHeights

◆ viewItems


The documentation for this class was generated from the following files: