MCPcopy Create free account
hub / github.com/baldurk/renderdoc / rowCount

Method rowCount

qrenderdoc/Windows/EventBrowser.cpp:691–720  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

689 }
690
691 int rowCount(const QModelIndex &parent = QModelIndex()) const override
692 {
693 if(!m_Ctx.IsCaptureLoaded())
694 return 0;
695
696 // only one root
697 if(!parent.isValid())
698 return 1;
699
700 // only column 1 has children (Qt convention)
701 if(parent.column() != 0)
702 return 0;
703
704 if(parent.internalId() == TagRoot)
705 return m_Nodes[0].rowCount;
706
707 if(parent.internalId() == TagCaptureStart)
708 return 0;
709
710 // otherwise it's an event
711 uint32_t eid = (uint32_t)parent.internalId();
712
713 // if it's a node, return the row count
714 auto it = m_Nodes.find(eid);
715 if(it != m_Nodes.end())
716 return it->rowCount;
717
718 // no other nodes have children
719 return 0;
720 }
721
722 int columnCount(const QModelIndex &parent = QModelIndex()) const override { return COL_COUNT; }
723 QVariant headerData(int section, Qt::Orientation orientation, int role) const override

Callers 6

filterAcceptsRowMethod · 0.45
GetMaxNameLengthMethod · 0.45
ExportActionMethod · 0.45
events_contextMenuMethod · 0.45

Calls 6

QModelIndexClass · 0.50
IsCaptureLoadedMethod · 0.45
isValidMethod · 0.45
columnMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected