diff options
Diffstat (limited to 'smtreeitem.cpp')
-rw-r--r-- | smtreeitem.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/smtreeitem.cpp b/smtreeitem.cpp index ed9f73e..ab5e636 100644 --- a/smtreeitem.cpp +++ b/smtreeitem.cpp @@ -42,6 +42,17 @@ SmTreeItem *SmTreeItem::child(int row) const{ return 0; } +SmTreeItem *SmTreeItem::next() const{ + int pos = row(); + if(pos + 1 < parent()->childCount()){ + return parent()->child(pos + 1); + } + if(parent() == 0){ + return 0; + } + return parent()->next(); +} + int SmTreeItem::childCount() const{ return mChildren.count(); } |