MCPcopy Create free account
hub / github.com/Liniyous/ElaWidgetTools / rowCount

Method rowCount

ElaWidgetToolsExample/ModelView/T_TreeViewModel.cpp:87–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87int T_TreeViewModel::rowCount(const QModelIndex& parent) const
88{
89 T_TreeItem* parentItem;
90 if (parent.column() > 0)
91 {
92 return 0;
93 }
94 if (!parent.isValid())
95 {
96 parentItem = _rootItem;
97 }
98 else
99 {
100 parentItem = static_cast<T_TreeItem*>(parent.internalPointer());
101 }
102 return parentItem->getChildrenItems().count();
103}
104
105int T_TreeViewModel::columnCount(const QModelIndex& parent) const
106{

Callers

nothing calls this directly

Calls 1

countMethod · 0.80

Tested by

no test coverage detected