[rename] functions renamed

This commit is contained in:
Marcel Paffrath 2017-08-07 16:41:50 +02:00
parent 014152e30e
commit 2fa9a60023
2 changed files with 30 additions and 30 deletions

View File

@ -355,23 +355,23 @@ class MainWindow(QMainWindow):
# self.createNewEvent, # self.createNewEvent,
# QKeySequence.New, newIcon, # QKeySequence.New, newIcon,
# "Create a new event.") # "Create a new event.")
self.openmanualpicksaction = self.createAction(self, "Load event ...", self.openEventAction = self.createAction(self, "Load event ...",
self.load_data, self.load_data,
"Ctrl+M", "Ctrl+M",
openEventIcon, openEventIcon,
"Load event information for " "Load event information for "
"the displayed event.") "the displayed event.")
self.openmanualpicksaction.setEnabled(False) self.openEventAction.setEnabled(False)
self.openmanualpicksaction.setData(None) self.openEventAction.setData(None)
self.openautopicksaction = self.createAction(self, "Load event information &automatically ... ", self.openEventsAutoAction = self.createAction(self, "Load event information &automatically ... ",
self.load_multiple_data, self.load_multiple_data,
"Ctrl+A", "Ctrl+A",
openEventsIcon, openEventsIcon,
"Load event data automatically " "Load event data automatically "
"for for all events.") "for for all events.")
self.openautopicksaction.setEnabled(False) self.openEventsAutoAction.setEnabled(False)
self.openautopicksaction.setData(None) self.openEventsAutoAction.setData(None)
self.loadlocationaction = self.createAction(self, "Load &location ...", self.loadlocationaction = self.createAction(self, "Load &location ...",
self.load_loc, "Ctrl+L", self.load_loc, "Ctrl+L",
@ -387,11 +387,11 @@ class MainWindow(QMainWindow):
" in former MatLab based version).") " in former MatLab based version).")
self.loadpilotevent.setEnabled(False) self.loadpilotevent.setEnabled(False)
self.saveManualPicksAction = self.createAction(self, "Save &event information ...", self.saveEventAction = self.createAction(self, "Save &event information ...",
self.saveData, "Ctrl+P", self.saveData, "Ctrl+P",
saveEventsIcon, "Save event pick data," saveEventsIcon, "Save event pick data,"
" source origin and magnitude.") " source origin and magnitude.")
self.disableSaveManualPicksAction() self.disableSaveEventAction()
self.addEventDataAction = self.createAction(self, "Add &events ...", self.addEventDataAction = self.createAction(self, "Add &events ...",
self.add_events, self.add_events,
@ -526,7 +526,7 @@ class MainWindow(QMainWindow):
self.fileMenuActions = (self.newProjectAction, self.addEventDataAction, self.fileMenuActions = (self.newProjectAction, self.addEventDataAction,
self.openProjectAction, self.saveProjectAction, self.openProjectAction, self.saveProjectAction,
self.saveProjectAsAction, self.saveProjectAsAction,
self.openmanualpicksaction, self.saveManualPicksAction, None, self.openEventAction, self.saveEventAction, None,
prefsEventAction, self.parameterAction, quitAction) prefsEventAction, self.parameterAction, quitAction)
self.fileMenu.aboutToShow.connect(self.updateFileMenu) self.fileMenu.aboutToShow.connect(self.updateFileMenu)
self.updateFileMenu() self.updateFileMenu()
@ -550,8 +550,8 @@ class MainWindow(QMainWindow):
self.saveProjectAsAction) self.saveProjectAsAction)
eventToolActions = (self.openmanualpicksaction, self.openautopicksaction, eventToolActions = (self.openEventAction, self.openEventsAutoAction,
self.saveManualPicksAction, self.loadlocationaction, self.saveEventAction, self.loadlocationaction,
self.loadpilotevent) self.loadpilotevent)
@ -1156,7 +1156,7 @@ class MainWindow(QMainWindow):
self.update_status(msg) self.update_status(msg)
print(msg) print(msg)
self.disableSaveManualPicksAction() self.disableSaveEventAction()
return True return True
def exportAllEvents(self, outformats=['.xml']): def exportAllEvents(self, outformats=['.xml']):
@ -1164,11 +1164,11 @@ class MainWindow(QMainWindow):
self.get_data().setEvtData(event) self.get_data().setEvtData(event)
self.saveData(event, event.path, outformats) self.saveData(event, event.path, outformats)
def enableSaveManualPicksAction(self): def enableSaveEventAction(self):
self.saveManualPicksAction.setEnabled(True) self.saveEventAction.setEnabled(True)
def disableSaveManualPicksAction(self): def disableSaveEventAction(self):
self.saveManualPicksAction.setEnabled(False) self.saveEventAction.setEnabled(False)
def getinfile(self): def getinfile(self):
return self.infile return self.infile
@ -1475,14 +1475,14 @@ class MainWindow(QMainWindow):
self.z_action.setEnabled(True) self.z_action.setEnabled(True)
self.e_action.setEnabled(True) self.e_action.setEnabled(True)
self.n_action.setEnabled(True) self.n_action.setEnabled(True)
self.openmanualpicksaction.setEnabled(True) self.openEventAction.setEnabled(True)
self.openautopicksaction.setEnabled(True) self.openEventsAutoAction.setEnabled(True)
self.loadpilotevent.setEnabled(True) self.loadpilotevent.setEnabled(True)
event = self.get_current_event() event = self.get_current_event()
if event.pylot_picks: if event.pylot_picks:
self.pylot_picks = event.pylot_picks self.pylot_picks = event.pylot_picks
self.drawPicks(picktype='manual') self.drawPicks(picktype='manual')
self.enableSaveManualPicksAction() self.enableSaveEventAction()
self.locateEvent.setEnabled(True) self.locateEvent.setEnabled(True)
if event.pylot_autopicks: if event.pylot_autopicks:
self.pylot_autopicks = event.pylot_autopicks self.pylot_autopicks = event.pylot_autopicks
@ -1507,10 +1507,10 @@ class MainWindow(QMainWindow):
self.z_action.setEnabled(False) self.z_action.setEnabled(False)
self.e_action.setEnabled(False) self.e_action.setEnabled(False)
self.n_action.setEnabled(False) self.n_action.setEnabled(False)
self.openmanualpicksaction.setEnabled(False) self.openEventAction.setEnabled(False)
self.openautopicksaction.setEnabled(False) self.openEventsAutoAction.setEnabled(False)
self.loadpilotevent.setEnabled(False) self.loadpilotevent.setEnabled(False)
self.disableSaveManualPicksAction() self.disableSaveEventAction()
self.draw() self.draw()
def plotWaveformDataThread(self): def plotWaveformDataThread(self):
@ -1771,7 +1771,7 @@ class MainWindow(QMainWindow):
self.update_status('picks accepted ({0})'.format(station)) self.update_status('picks accepted ({0})'.format(station))
replot = self.addPicks(station, pickDlg.getPicks()) replot = self.addPicks(station, pickDlg.getPicks())
self.get_current_event().setPick(station, pickDlg.getPicks()) self.get_current_event().setPick(station, pickDlg.getPicks())
self.enableSaveManualPicksAction() self.enableSaveEventAction()
if replot: if replot:
self.plotWaveformDataThread() self.plotWaveformDataThread()
self.drawPicks() self.drawPicks()

View File

@ -2149,7 +2149,7 @@ class TuneAutopicker(QWidget):
pickDlg.update_picks.connect(self.fill_eventbox) pickDlg.update_picks.connect(self.fill_eventbox)
pickDlg.update_picks.connect(self.fill_stationbox) pickDlg.update_picks.connect(self.fill_stationbox)
pickDlg.update_picks.connect(lambda: self.parent.setDirty(True)) pickDlg.update_picks.connect(lambda: self.parent.setDirty(True))
pickDlg.update_picks.connect(self.parent.enableSaveManualPicksAction) pickDlg.update_picks.connect(self.parent.enableSaveEventAction)
self.pickDlg = QtGui.QWidget() self.pickDlg = QtGui.QWidget()
hl = QtGui.QHBoxLayout() hl = QtGui.QHBoxLayout()
self.pickDlg.setLayout(hl) self.pickDlg.setLayout(hl)