Moved the about dialog functions to main gui class

This commit is contained in:
Veronica K. B. Olsen
2020-08-08 18:37:25 +02:00
parent 76fcc74342
commit d1982c0abb
3 changed files with 20 additions and 24 deletions
+17 -1
View File
@@ -43,7 +43,7 @@ from nw.gui import (
GuiBuildNovel, GuiDocEditor, GuiDocMerge, GuiDocSplit, GuiDocViewDetails,
GuiDocViewer, GuiItemDetails, GuiItemEditor, GuiMainMenu, GuiMainStatus,
GuiOutline, GuiOutlineDetails, GuiPreferences, GuiProjectLoad, GuiTheme,
GuiProjectSettings, GuiProjectTree, GuiWritingStats
GuiProjectSettings, GuiProjectTree, GuiWritingStats, GuiAbout
)
from nw.core import NWProject, NWDoc, NWIndex
from nw.constants import nwFiles, nwItemType, nwAlert
@@ -817,6 +817,22 @@ class GuiMain(QMainWindow):
dlgStats.show()
return True
def showAboutNWDialog(self):
"""Show the about dialog for novelWriter.
"""
if self.mainConf.showGUI:
dlgAbout = GuiAbout(self)
dlgAbout.exec_()
return True
def showAboutQtDialog(self):
"""Show the about dialog for Qt.
"""
if self.mainConf.showGUI:
msgBox = QMessageBox()
msgBox.aboutQt(self, "About Qt")
return True
def makeAlert(self, theMessage, theLevel=nwAlert.INFO):
"""Alert both the user and the logger at the same time. Message
can be either a string or an array of strings. Severity level is