Moved theme class to gui folder

This commit is contained in:
Veronica K. B. Olsen
2019-11-08 15:41:24 +01:00
parent e7561cb3e3
commit 69bfb4a209
3 changed files with 9 additions and 8 deletions
+2
View File
@@ -3,6 +3,7 @@
# Main Window Elements # Main Window Elements
from nw.gui.mainmenu import GuiMainMenu from nw.gui.mainmenu import GuiMainMenu
from nw.gui.statusbar import GuiMainStatus from nw.gui.statusbar import GuiMainStatus
from nw.gui.theme import GuiTheme
# Dialogs # Dialogs
from nw.gui.dialogs.configeditor import GuiConfigEditor from nw.gui.dialogs.configeditor import GuiConfigEditor
@@ -28,6 +29,7 @@ from nw.gui.tools.wordcounter import WordCounter
__all__ = [ __all__ = [
"GuiMainMenu", "GuiMainMenu",
"GuiMainStatus", "GuiMainStatus",
"GuiTheme",
"GuiConfigEditor", "GuiConfigEditor",
"GuiExport", "GuiExport",
"GuiItemEditor", "GuiItemEditor",
+2 -2
View File
@@ -23,7 +23,7 @@ from nw.constants import nwAlert
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
class Theme: class GuiTheme:
# Icons should either have a valid icon name by using Qt internal # Icons should either have a valid icon name by using Qt internal
# QIcon.fromTheme, as specified here: # QIcon.fromTheme, as specified here:
@@ -353,4 +353,4 @@ class Theme:
return confParser.get(cnfSec, cnfName) return confParser.get(cnfSec, cnfName)
return cnfDefault return cnfDefault
# End Class Theme # End Class GuiTheme
+5 -6
View File
@@ -24,14 +24,13 @@ from PyQt5.QtWidgets import (
) )
from nw.gui import ( from nw.gui import (
GuiMainMenu, GuiMainStatus, GuiDocTree, GuiDocEditor, GuiDocViewer, GuiMainMenu, GuiMainStatus, GuiTheme, GuiDocTree, GuiDocEditor,
GuiDocDetails, GuiSearchBar, GuiNoticeBar, GuiDocViewDetails, GuiDocViewer, GuiDocDetails, GuiSearchBar, GuiNoticeBar,
GuiConfigEditor, GuiProjectEditor, GuiExport, GuiItemEditor, GuiDocViewDetails, GuiConfigEditor, GuiProjectEditor, GuiExport,
GuiTimeLineView, GuiSessionLogView GuiItemEditor, GuiTimeLineView, GuiSessionLogView
) )
from nw.project import NWProject, NWDoc, NWItem, NWIndex, NWBackup from nw.project import NWProject, NWDoc, NWItem, NWIndex, NWBackup
from nw.tools import countWords from nw.tools import countWords
from nw.theme import Theme
from nw.constants import nwFiles, nwItemType, nwAlert from nw.constants import nwFiles, nwItemType, nwAlert
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@@ -44,7 +43,7 @@ class GuiMain(QMainWindow):
logger.info("Starting %s" % nw.__package__) logger.info("Starting %s" % nw.__package__)
logger.debug("Initialising GUI ...") logger.debug("Initialising GUI ...")
self.mainConf = nw.CONFIG self.mainConf = nw.CONFIG
self.theTheme = Theme(self) self.theTheme = GuiTheme(self)
self.theProject = NWProject(self) self.theProject = NWProject(self)
self.theIndex = NWIndex(self.theProject, self) self.theIndex = NWIndex(self.theProject, self)
self.hasProject = False self.hasProject = False