46 """ |
46 """ |
47 Public method to set the default item show mode. |
47 Public method to set the default item show mode. |
48 |
48 |
49 @param mode default mode (ItemsCollapsed, ItemsExpanded) |
49 @param mode default mode (ItemsCollapsed, ItemsExpanded) |
50 """ |
50 """ |
51 assert mode in [E5TreeWidget.ItemsCollapsed, E5TreeWidget.ItemsExpanded] |
51 assert mode in [E5TreeWidget.ItemsCollapsed, |
|
52 E5TreeWidget.ItemsExpanded] |
52 |
53 |
53 self.__showMode = mode |
54 self.__showMode = mode |
54 |
55 |
55 def allItems(self): |
56 def allItems(self): |
56 """ |
57 """ |
134 |
135 |
135 def addTopLevelItems(self, items): |
136 def addTopLevelItems(self, items): |
136 """ |
137 """ |
137 Public method to add a list of top level items. |
138 Public method to add a list of top level items. |
138 |
139 |
139 @param items items to be added as top level items (list of QTreeWidgetItem) |
140 @param items items to be added as top level items |
|
141 (list of QTreeWidgetItem) |
140 """ |
142 """ |
141 self.__allTreeItems.extend(items) |
143 self.__allTreeItems.extend(items) |
142 super().addTopLevelItems(items) |
144 super().addTopLevelItems(items) |
143 |
145 |
144 def insertTopLevelItem(self, index, item): |
146 def insertTopLevelItem(self, index, item): |
154 def insertTopLevelItems(self, index, items): |
156 def insertTopLevelItems(self, index, items): |
155 """ |
157 """ |
156 Public method to insert a list of top level items. |
158 Public method to insert a list of top level items. |
157 |
159 |
158 @param index index for the insertion (integer) |
160 @param index index for the insertion (integer) |
159 @param items items to be inserted as top level items (list of QTreeWidgetItem) |
161 @param items items to be inserted as top level items |
|
162 (list of QTreeWidgetItem) |
160 """ |
163 """ |
161 self.__allTreeItems.extend(items) |
164 self.__allTreeItems.extend(items) |
162 super().insertTopLevelItems(index, items) |
165 super().insertTopLevelItems(index, items) |
163 |
166 |
164 def deleteItem(self, item): |
167 def deleteItem(self, item): |