def getVisibleItemIds(self):
        visible = list()
        # Iterates trough hierarchical tree using a stack of iterators
        iteratorStack = deque()
        ids = self.rootItemIds()
        if ids is not None:
            iteratorStack.append(ids)
        while len(iteratorStack) > 0:
            # Gets the iterator for current tree level
            i = iter( iteratorStack[-1] )

            # If the level is finished, back to previous tree level
            try:
                itemId = i.next()
                visible.append(itemId)
                # Adds children if expanded, or close the tag
                if self.isExpanded(itemId) and self.hasChildren(itemId):
                    iteratorStack.append( self.getChildren(itemId) )
            except StopIteration:
                # Removes used iterator from the stack
                # Adds the item on current level
                iteratorStack.pop()

        return visible
Gets the visible item ids.
dataset/ETHPy150Open rwl/muntjac/muntjac/ui/tree.py/Tree.getVisibleItemIds