Project class should not contain any GUI elements. Status icons moved to main GUI class.

This commit is contained in:
Veronica K. B. Olsen
2019-05-12 14:08:52 +02:00
parent edab608c3b
commit f1d30ae253
4 changed files with 34 additions and 30 deletions
+3 -2
View File
@@ -35,6 +35,7 @@ class GuiDocDetails(QFrame):
logger.debug("Initialising DocDetails ...")
self.mainConf = nw.CONFIG
self.debugGUI = self.mainConf.debugGUI
self.theParent = theParent
self.theProject = theProject
self.mainBox = QGridLayout(self)
@@ -70,11 +71,11 @@ class GuiDocDetails(QFrame):
colTwo = [""]*4
else:
itemStatus = nwItem.itemStatus
if itemStatus < 0 or itemStatus >= len(self.theProject.statusLabels):
if itemStatus < 0 or itemStatus >= len(self.theParent.statusLabels):
itemStatus = 0
colTwo = [
nwItem.itemName,
self.theProject.statusLabels[itemStatus],
self.theParent.statusLabels[itemStatus],
nwLabels.CLASS_NAME[nwItem.itemClass],
nwLabels.LAYOUT_NAME[nwItem.itemLayout],
]