added quit functionality
This commit is contained in:
parent
d405e9e6f9
commit
fc3e1a613e
17
QtPyLoT.py
17
QtPyLoT.py
@ -151,7 +151,8 @@ class MainWindow(QMainWindow):
|
|||||||
self.saveData,
|
self.saveData,
|
||||||
QKeySequence.Save, saveIcon,
|
QKeySequence.Save, saveIcon,
|
||||||
"Save actual event data.")
|
"Save actual event data.")
|
||||||
self.quitAction = self.createAction("&Quit", self.cleanUp,
|
self.quitAction = self.createAction("&Quit",
|
||||||
|
QCoreApplication.instance().quit,
|
||||||
QKeySequence.Close,
|
QKeySequence.Close,
|
||||||
quitIcon,
|
quitIcon,
|
||||||
"Close event and quit PyLoT")
|
"Close event and quit PyLoT")
|
||||||
@ -160,7 +161,7 @@ class MainWindow(QMainWindow):
|
|||||||
"""Toggle un-/filtered waveforms
|
"""Toggle un-/filtered waveforms
|
||||||
to be displayed, according to the
|
to be displayed, according to the
|
||||||
desired seismic phase.""", True)
|
desired seismic phase.""", True)
|
||||||
self.filterEditAction = self.createAction("&Filter ...",
|
self.filterEditAction = self.createAction("&Filter parameter ...",
|
||||||
self.adjustFilterOptions,
|
self.adjustFilterOptions,
|
||||||
"Alt+F", QIcon(None),
|
"Alt+F", QIcon(None),
|
||||||
"""Adjust filter
|
"""Adjust filter
|
||||||
@ -183,7 +184,7 @@ class MainWindow(QMainWindow):
|
|||||||
status = self.statusBar()
|
status = self.statusBar()
|
||||||
status.setSizeGripEnabled(False)
|
status.setSizeGripEnabled(False)
|
||||||
status.addPermanentWidget(self.eventLabel)
|
status.addPermanentWidget(self.eventLabel)
|
||||||
status.showMessage("Ready", 10000)
|
status.showMessage("Ready", 500)
|
||||||
|
|
||||||
#statLayout = layoutStationButtons(self.getData(), self.getComponent())
|
#statLayout = layoutStationButtons(self.getData(), self.getComponent())
|
||||||
#dataLayout = self.getDataWidget()
|
#dataLayout = self.getDataWidget()
|
||||||
@ -205,7 +206,8 @@ class MainWindow(QMainWindow):
|
|||||||
filterDlg = FilterOptionsDialog(titleString=fstring,
|
filterDlg = FilterOptionsDialog(titleString=fstring,
|
||||||
parent=self,
|
parent=self,
|
||||||
filterOptions=self.getFilterOptions())
|
filterOptions=self.getFilterOptions())
|
||||||
filterDlg.accepted.connect(filterDlg.getFilterOptions)
|
filterDlg.show()
|
||||||
|
filterDlg.closeEvent.connect(lambda: self.setFilterOptions(filterDlg.getFilterOptions()))
|
||||||
|
|
||||||
def getFilterOptions(self):
|
def getFilterOptions(self):
|
||||||
return self.filteroptions
|
return self.filteroptions
|
||||||
@ -244,7 +246,8 @@ class MainWindow(QMainWindow):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def cleanUp(self):
|
def cleanUp(self):
|
||||||
pass
|
self
|
||||||
|
return 0
|
||||||
|
|
||||||
def helpHelp(self):
|
def helpHelp(self):
|
||||||
if checkurl():
|
if checkurl():
|
||||||
@ -256,7 +259,7 @@ class MainWindow(QMainWindow):
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
# create the Qt application
|
# create the Qt application
|
||||||
pylot_app = QApplication(['PyLoT'])
|
pylot_app = QApplication(sys.argv[0])
|
||||||
|
|
||||||
# set Application Information
|
# set Application Information
|
||||||
pylot_app.setOrganizationName("Ruhr-University Bochum / MAGS2")
|
pylot_app.setOrganizationName("Ruhr-University Bochum / MAGS2")
|
||||||
@ -269,7 +272,7 @@ def main():
|
|||||||
|
|
||||||
# Show main window and run the app
|
# Show main window and run the app
|
||||||
pylot_form.show()
|
pylot_form.show()
|
||||||
pylot_app.exec_()
|
sys.exit(pylot_app.exec_())
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
Loading…
Reference in New Issue
Block a user