Added project word count
This commit is contained in:
@@ -380,6 +380,7 @@ class GuiDocEditor(QTextEdit):
|
||||
self.paraCount = self.wCounter.paraCount
|
||||
self.theParent.statusBar.setCounts(self.charCount,self.wordCount,self.paraCount)
|
||||
self.theParent.treeView.propagateCount(tHandle, self.wordCount)
|
||||
self.theParent.treeView.projectWordCount()
|
||||
|
||||
return
|
||||
|
||||
|
||||
+11
-1
@@ -50,7 +50,7 @@ class GuiDocTree(QTreeWidget):
|
||||
self.setExpandsOnDoubleClick(True)
|
||||
self.setIndentation(13)
|
||||
self.setColumnCount(4)
|
||||
self.setHeaderLabels(["Name","Count","Flags","Handle"])
|
||||
self.setHeaderLabels(["Name","Words","Flags","Handle"])
|
||||
if not self.debugGUI:
|
||||
self.hideColumn(self.C_HANDLE)
|
||||
|
||||
@@ -286,6 +286,16 @@ class GuiDocTree(QTreeWidget):
|
||||
self.propagateCount(pHandle, pCount, nDepth+1)
|
||||
return
|
||||
|
||||
def projectWordCount(self):
|
||||
nWords = 0
|
||||
for n in range(self.topLevelItemCount()):
|
||||
tItem = self.topLevelItem(n)
|
||||
if tItem == self.orphRoot:
|
||||
continue
|
||||
nWords += int(tItem.text(self.C_COUNT))
|
||||
self.theParent.statusBar.setStats(nWords,0)
|
||||
return
|
||||
|
||||
def buildTree(self):
|
||||
self.clear()
|
||||
for nwItem in self.theProject.getProjectItems():
|
||||
|
||||
Reference in New Issue
Block a user