MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / index

Method index

Engine/FileSystemModel.cpp:750–772  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

748} // FileSystemModel::data
749
750QModelIndex
751FileSystemModel::index(int row,
752 int column,
753 const QModelIndex &parent) const
754{
755 // As the Name column is a tree, we will only create index whose parent is in the Name column
756 if ( parent.isValid() && ( (Sections)parent.column() != Name ) ) {
757 return QModelIndex();
758 }
759
760 FileSystemItemPtr parentItem = getItem(parent);
761
762
763 if (parentItem) {
764 FileSystemItemPtr childItem = parentItem->childAt(row);
765
766 if (childItem) {
767 return createIndex( row, column, childItem.get() );
768 }
769 }
770
771 return QModelIndex();
772}
773
774QModelIndex
775FileSystemModel::parent(const QModelIndex &index) const

Callers

nothing calls this directly

Calls 6

QModelIndexClass · 0.85
columnMethod · 0.80
childAtMethod · 0.80
indexInParentMethod · 0.80
isValidMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected