From 8213cdc575d2c47cd389b1a8d222aec2c870dc01 Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Wed, 17 Dec 2014 06:33:34 +0100 Subject: [PATCH] PropertiesDlg added to the MainWindow (not tested yet) --- QtPyLoT.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/QtPyLoT.py b/QtPyLoT.py index 83cd356b..22579058 100755 --- a/QtPyLoT.py +++ b/QtPyLoT.py @@ -39,6 +39,7 @@ from pylot.core.util import checkurl from pylot.core.util import layoutStationButtons from pylot.core.util import (FilterOptionsDialog, MPLWidget, + PropertiesDlg, HelpForm) @@ -193,6 +194,9 @@ class MainWindow(QMainWindow): saveEventAction = self.createAction("&Save event ...", self.saveData, QKeySequence.Save, saveIcon, "Save actual event data.") + prefsEventAction = self.createAction("Preferences", self.PyLoTprefs, + QKeySequence.Preferences, None, + "Edit PyLoT app preferences.") quitAction = self.createAction("&Quit", QCoreApplication.instance().quit, QKeySequence.Close, quitIcon, @@ -218,6 +222,7 @@ class MainWindow(QMainWindow): "Print waveform overview.") self.fileMenu = self.menuBar().addMenu('&File') self.fileMenuActions = (openEventAction, saveEventAction, None, + prefsEventAction, None, quitAction) self.fileMenu.aboutToShow.connect(self.updateFileMenu) @@ -327,6 +332,11 @@ class MainWindow(QMainWindow): self.closing.emit() QMainWindow.closeEvent(self, event) + def PyLoTprefs(self): + props = PropertiesDlg(self) + if props.exec_(): + return + def helpHelp(self): if checkurl(): form = HelpForm('https://ariadne.geophysik.ruhr-uni-bochum.de/trac/PyLoT/wiki')