| 72 | } |
| 73 | |
| 74 | void UITreeView::traverseTree( TreeViewCallback callback ) const { |
| 75 | if ( !getModel() ) |
| 76 | return; |
| 77 | Lock l( const_cast<Model*>( getModel() )->resourceMutex() ); |
| 78 | TraverseTreeVars v{ |
| 79 | std::move( callback ), *getModel(), 0, getHeaderHeight(), -1, getRowHeight(), |
| 80 | }; |
| 81 | int rootCount = v.model.rowCount(); |
| 82 | for ( int rootIndex = 0; rootIndex < rootCount; ++rootIndex ) { |
| 83 | IterationDecision decision = |
| 84 | traverseIndex( v, v.model.index( rootIndex, v.model.treeColumn(), ModelIndex() ) ); |
| 85 | if ( decision == IterationDecision::Break || decision == IterationDecision::Stop ) |
| 86 | break; |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | void UITreeView::createOrUpdateColumns( bool resetColumnData ) { |
| 91 | if ( !getModel() ) { |
nothing calls this directly
no test coverage detected