added help menu to the menubar

This commit is contained in:
Sebastian Wehling-Benatelli 2015-01-20 13:56:15 +01:00
parent ff98371a04
commit 4769b447a8

View File

@ -200,6 +200,7 @@ class MainWindow(QMainWindow):
openIcon = self.style().standardIcon(QStyle.SP_DirOpenIcon) openIcon = self.style().standardIcon(QStyle.SP_DirOpenIcon)
quitIcon = self.style().standardIcon(QStyle.SP_MediaStop) quitIcon = self.style().standardIcon(QStyle.SP_MediaStop)
saveIcon = self.style().standardIcon(QStyle.SP_DriveHDIcon) saveIcon = self.style().standardIcon(QStyle.SP_DriveHDIcon)
helpIcon = self.style().standardIcon(QStyle.SP_DialogHelpButton)
openEventAction = self.createAction("&Open event ...", self.loadData, openEventAction = self.createAction("&Open event ...", self.loadData,
QKeySequence.Open, openIcon, QKeySequence.Open, openIcon,
"Open an event.") "Open an event.")
@ -233,6 +234,11 @@ class MainWindow(QMainWindow):
self.printEvent, QKeySequence.Print, self.printEvent, QKeySequence.Print,
QIcon(":/printer.png"), QIcon(":/printer.png"),
"Print waveform overview.") "Print waveform overview.")
helpAction = self.createAction("&Help ...", self.helpHelp,
QKeySequence.HelpContents, helpIcon,
"""Show either the documentation
homepage (internet connection available),
or shipped documentation files.""")
self.fileMenu = self.menuBar().addMenu('&File') self.fileMenu = self.menuBar().addMenu('&File')
self.fileMenuActions = (openEventAction, saveEventAction, self.fileMenuActions = (openEventAction, saveEventAction,
prefsEventAction, quitAction) prefsEventAction, quitAction)