Add a toolbar to the Outline view

This commit is contained in:
Veronica Berglyd Olsen
2022-05-22 23:03:30 +02:00
parent 007f2fbff4
commit ecc0585c87
7 changed files with 170 additions and 101 deletions
+9
View File
@@ -273,6 +273,15 @@ class NWTree():
rootClasses.add(nwItem.itemClass)
return rootClasses
def novelRoots(self):
"""Return a doctionary of all novel-like root items.
"""
novelItems = {}
for tHandle, nwItem in self._treeRoots.items():
if nwItem.isNovelLike():
novelItems[tHandle] = nwItem
return novelItems
def isRoot(self, tHandle):
"""Check if a handle is a root item.
"""