478 """ |
478 """ |
479 parentItem.appendChild(itm) |
479 parentItem.appendChild(itm) |
480 |
480 |
481 def addItem(self, itm, parent=QModelIndex()): |
481 def addItem(self, itm, parent=QModelIndex()): |
482 """ |
482 """ |
483 Puplic slot to add an item. |
483 Public slot to add an item. |
484 |
484 |
485 @param itm item to add (BrowserItem) |
485 @param itm item to add (BrowserItem) |
486 @param parent index of parent item (QModelIndex) |
486 @param parent index of parent item (QModelIndex) |
487 """ |
487 """ |
488 if not parent.isValid(): |
488 if not parent.isValid(): |
763 """ |
763 """ |
764 Class implementing the data structure for browser items. |
764 Class implementing the data structure for browser items. |
765 """ |
765 """ |
766 def __init__(self, parent, data): |
766 def __init__(self, parent, data): |
767 """ |
767 """ |
768 Constructor. |
768 Constructor |
769 |
769 |
770 @param parent reference to the parent item |
770 @param parent reference to the parent item |
771 @param data single data of the item |
771 @param data single data of the item |
772 """ |
772 """ |
773 self.childItems = [] |
773 self.childItems = [] |