Moved item status recrod keeping into a separate iterable class

This commit is contained in:
Veronica K. B. Olsen
2019-05-19 19:03:59 +02:00
parent 37ec8e6280
commit 540aa7fcbc
10 changed files with 200 additions and 109 deletions
+10 -16
View File
@@ -61,10 +61,8 @@ class GuiMain(QMainWindow):
self.statusBar = GuiMainStatus(self)
# Minor Gui Elements
self.statusIcons = []
self.statusLabels = []
self.importIcons = []
self.importLabels = []
self.statusIcons = []
self.importIcons = []
# Assemble Main Window
self.treePane = QFrame()
@@ -397,23 +395,19 @@ class GuiMain(QMainWindow):
return True
def _makeStatusIcons(self):
self.statusIcons = []
self.statusLabels = []
for sLabel, sR, sG, sB in self.theProject.statusCols:
self.statusIcons = {}
for sLabel, sCol in self.theProject.statusItems:
theIcon = QPixmap(32,32)
theIcon.fill(QColor(sR,sG,sB))
self.statusIcons.append(QIcon(theIcon))
self.statusLabels.append(sLabel)
theIcon.fill(QColor(*sCol))
self.statusIcons[sLabel] = QIcon(theIcon)
return
def _makeImportIcons(self):
self.importIcons = []
self.importLabels = []
for sLabel, sR, sG, sB in self.theProject.importCols:
self.importIcons = {}
for sLabel, sCol in self.theProject.importItems:
theIcon = QPixmap(32,32)
theIcon.fill(QColor(sR,sG,sB))
self.importIcons.append(QIcon(theIcon))
self.importLabels.append(sLabel)
theIcon.fill(QColor(*sCol))
self.importIcons[sLabel] = QIcon(theIcon)
return
##