Importance colours added to the GUI

This commit is contained in:
Veronica K. B. Olsen
2019-05-12 21:54:21 +02:00
parent 8d8fc72cc1
commit 53b97e8399
5 changed files with 56 additions and 13 deletions
+14
View File
@@ -60,6 +60,8 @@ class GuiMain(QMainWindow):
# Minor Gui Elements
self.statusIcons = []
self.statusLabels = []
self.importIcons = []
self.importLabels = []
# Assemble Main Window
self.stackPane = QStackedWidget()
@@ -87,6 +89,7 @@ class GuiMain(QMainWindow):
self.treeView.itemDoubleClicked.connect(self._treeDoubleClick)
self.treeView.buildTree()
self._makeStatusIcons()
self._makeImportIcons()
# Set Main Window Elements
self.setMenuBar(self.mainMenu)
@@ -179,6 +182,7 @@ class GuiMain(QMainWindow):
self.treeView.buildTree()
self._setWindowTitle(self.theProject.projName)
self._makeStatusIcons()
self._makeImportIcons()
self.docEditor.setPwl(path.join(self.theProject.projMeta,"wordlist.txt"))
self.docEditor.setSpellCheck(self.theProject.spellCheck)
self.mainMenu.updateMenu()
@@ -370,6 +374,16 @@ class GuiMain(QMainWindow):
self.statusLabels.append(sLabel)
return
def _makeImportIcons(self):
self.importIcons = []
self.importLabels = []
for sLabel, sR, sG, sB in self.theProject.importCols:
theIcon = QPixmap(32,32)
theIcon.fill(QColor(sR,sG,sB))
self.importIcons.append(QIcon(theIcon))
self.importLabels.append(sLabel)
return
##
# Events
##