E5Gui/E5TreeWidget.py

changeset 2990
583beaf0b4b8
parent 2953
703452a2876f
child 3057
10516539f238
child 3160
209a07d7e401
equal deleted inserted replaced
2989:7efa8b8b6903 2990:583beaf0b4b8
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):

eric ide

mercurial