I have the code that does something like that but I can't show it to youI can give you a hint though. Think how to map indexes between a flat model and a hierarchical one. Write down the solution on a piece of paper and then implement mapFromIndex() and mapToIndex() according to your notes. The rest should be easy.
Bookmarks