| 85 | } |
| 86 | |
| 87 | int 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 | |
| 105 | int T_TreeViewModel::columnCount(const QModelIndex& parent) const |
| 106 | { |