Fiexd the about entries in the menu

This commit is contained in:
Veronica K. B. Olsen
2019-05-04 10:54:03 +02:00
parent 933c555410
commit ca022c31a6
2 changed files with 26 additions and 3 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ __copyright__ = "Copyright 2016-2018, Veronica Berglyd Olsen"
__credits__ = ["Veronica Berglyd Olsen"]
__license__ = "GPLv3"
__version__ = "0.0.1"
__date__ = "2018"
__date__ = "2019.xx.xx"
__maintainer__ = "Veronica Berglyd Olsen"
__email__ = "code@vkbo.net"
__status__ = "Development"
+25 -2
View File
@@ -13,7 +13,7 @@
import logging
import nw
from PyQt5.QtWidgets import qApp, QMenuBar, QAction
from PyQt5.QtWidgets import qApp, QMenuBar, QAction, QMessageBox
from PyQt5.QtGui import QIcon
from nw.enum import nwItemType, nwItemClass, nwDocAction
@@ -80,7 +80,29 @@ class GuiMainMenu(QMenuBar):
return True
def _showAbout(self):
self.docTabs.createTab(None,nw.DOCTYPE_ABOUT)
msgBox = QMessageBox()
msgBox.about(self.theParent, "About %s" % nw.__package__, (
"<h3>About {name:s}</h3>"
"<p>Version: {version:s}<br>Release Date: {date:s}</p>"
"<p>{name:s} is a text editor designed for writing novels. "
"It is written in Python 3 with a Qt5 GUI. The Python and Qt layers are connected with PyQt5</p>"
"<p>{name:s} is is licensed under GPL v3.0</p>"
"<p>Copyright 2018&ndash;{year:s} {author:s}</p>"
"<h4>Credits</h4>"
"<p>{credits:s}</p>"
).format(
name = nw.__package__,
version = nw.__version__,
date = nw.__date__,
year = nw.__date__[:4],
author = nw.__author__,
credits = "<br>".join(nw.__credits__),
))
return True
def _showAboutQt(self):
msgBox = QMessageBox()
msgBox.aboutQt(self.theParent,"About Qt")
return True
##
@@ -397,6 +419,7 @@ class GuiMainMenu(QMenuBar):
# Help > About Qt5
menuItem = QAction(QIcon.fromTheme("help-about"), "About Qt5", self)
menuItem.setStatusTip("About Qt5")
menuItem.triggered.connect(self._showAboutQt)
self.helpMenu.addAction(menuItem)
return