# Path: Interface/LayerIntf/layeritem.py
# class LayerItem(object):
#     
#     def __init__(self, data, parent=None):
#         self.parent_item = parent
#         self.item_data = data
#         self.children = []
# 
# 
#     def appendChild(self, item):
#         self.children.append(item)
# 
# 
#     def child(self, row):
#         return self.children[row]
# 
# 
#     def childCount(self):
#         return len(self.children)
# 
# 
#     def columnCount(self):
#         return len(self.item_data)
# 
# 
#     def data(self, column):
#         try:
#             return self.item_data[column]
#         except IndexError:
#             return None
# 
# 
#     def parent(self):
#         return self.parent_item
# 
# 
#     def row(self):
#         if self.parent_item:
#             return self.parent_item.children.index(self)
#         return 0


from PyQt4 import QtCore, QtGui
from Interface.LayerIntf.layeritem import LayerItem

        childItem = index.internalPointer()
        parentItem = childItem.parent()

        if parentItem == self.rootItem:
            return QtCore.QModelIndex()

        return self.createIndex(parentItem.row(), 0, parentItem)


    def rowCount(self, parent):
        if parent.column() > 0:
            return 0

        if not parent.isValid():
            parentItem = self.rootItem
        else:
            parentItem = parent.internalPointer()

        return parentItem.childCount()


    def setupModelData(self, lines, parent):
        parents = [parent]
        indentations = [0]

        number = 0

        while number < len(lines):
            position = 0

# Path: Interface/LayerIntf/layeritem.py
# class LayerItem(object):
#     
#     def __init__(self, data, parent=None):
#         self.parent_item = parent
#         self.item_data = data
#         self.children = []
# 
# 
#     def appendChild(self, item):
#         self.children.append(item)
# 
# 
#     def child(self, row):
#         return self.children[row]
# 
# 
#     def childCount(self):
#         return len(self.children)
# 
# 
#     def columnCount(self):
#         return len(self.item_data)
# 
# 
#     def data(self, column):
#         try:
#             return self.item_data[column]
#         except IndexError:
#             return None
# 
# 
#     def parent(self):
#         return self.parent_item
# 
# 
#     def row(self):
#         if self.parent_item:
#             return self.parent_item.children.index(self)
#         return 0


# Path: Interface/LayerIntf/layermodel.py
from PyQt4 import QtCore, QtGui
from Interface.LayerIntf.layeritem import LayerItem


        childItem = index.internalPointer()
        parentItem = childItem.parent()

        if parentItem == self.rootItem:
            return QtCore.QModelIndex()

        return self.createIndex(parentItem.row(), 0, parentItem)


    def rowCount(self, parent):
        if parent.column() > 0:
            return 0

        if not parent.isValid():
            parentItem = self.rootItem
        else:
            parentItem = parent.internalPointer()

        return parentItem.childCount()


    def setupModelData(self, lines, parent):
        parents = [parent]
        indentations = [0]

        number = 0

        while number < len(lines):
            position = 0

            while position < len(lines[number]):