src/hbwidgets/itemviews/hbtreemodeliterator_p.cpp
changeset 5 627c4a0fd0e7
parent 1 f7ac710697a9
child 6 c3690ec91ef8
--- a/src/hbwidgets/itemviews/hbtreemodeliterator_p.cpp	Thu May 27 13:10:59 2010 +0300
+++ b/src/hbwidgets/itemviews/hbtreemodeliterator_p.cpp	Fri Jun 11 13:58:22 2010 +0300
@@ -41,7 +41,7 @@
 
 /*!
     \reimp
-
+    Returns count of visible indexes under \a parent.
     Children of collapsed parents are not taken into account.
 */
 int HbTreeModelIterator::indexCount(const QModelIndex &parent) const
@@ -73,7 +73,8 @@
 
 /*!
     \reimp
-    Position depends on item state - expanded/colapsed
+    Returns ordinal of index starting from root. Ordinal for first index under root is 0.
+    Indexes in collapsed parents are taken into account.
 */
 int HbTreeModelIterator::indexPosition(const QModelIndex &index) const
 {
@@ -94,7 +95,8 @@
 
 /*!
     \reimp
-    Index is calculated from position and it depends on item state - expanded/colapsed
+    Returnes index of item, which is visible at pos ordinal under parent. 
+    Indexes in collapsed parents are not taken into account.
     Very slow - need to interate throught whole model in worst case!
 */
 QModelIndex HbTreeModelIterator::index(int pos, const QModelIndex &parent) const
@@ -175,12 +177,13 @@
 /*!
     \reimp
 
-    Next index for valid index is determined in following way:
-    - If index is in collapsed branch QModelIndex is returned
+    Next visible index for valid index is determined in following way:
+    - If index is in collapsed branch QModelIndex is returned. 
     - If index has children and it is expanded then first child is returned
     - Otherwise if index has next sibling then that is returned
     - Otherwise next valid sibling for parent is returned
     - Otherwise QModelIndex is returned
+    If index was invalid then first valid index is returned.
 
     \a index must belong to mRootIndex branch, otherwise result is not determined.
 
@@ -231,7 +234,7 @@
 /*!
     \reimp
 
-    Previous index for valid index is determined in following way:
+    Previous visible index for valid index is determined in following way:
     - If index is in collapsed branch QModelIndex is returned
     - If index has previous sibling last child from it is returned
     - Otherwise previous sibling is returned