[new] added a locate button to the toolbar in the GUI (not working yet)
This commit is contained in:
parent
9c7fbc4725
commit
8ae692db70
39
QtPyLoT.py
39
QtPyLoT.py
@ -162,6 +162,8 @@ class MainWindow(QMainWindow):
|
||||
e_icon.addPixmap(QPixmap(':/icons/key_E.png'))
|
||||
auto_icon = QIcon()
|
||||
auto_icon.addPixmap(QPixmap(':/icons/sync.png'))
|
||||
locate_icon = QIcon()
|
||||
locate_icon.addPixmap(QPixmap(':/icons/locate.png'))
|
||||
|
||||
newEventAction = self.createAction(self, "&New event ...",
|
||||
self.createNewEvent,
|
||||
@ -286,6 +288,16 @@ class MainWindow(QMainWindow):
|
||||
# pickToolBar.setObjectName("PickTools")
|
||||
# self.addActions(pickToolBar, pickToolActions)
|
||||
|
||||
locateEvent = self.createAction(parent=self, text='locateEvent',
|
||||
slot=self.locateEvent, shortcut='Alt+Ctrl+L',
|
||||
icon=locate_icon, tip='Locate the event using '
|
||||
'the picked arrivals.')
|
||||
|
||||
locationToolBar = self.addToolBar("LocationTools")
|
||||
locationToolActions = (locateEvent,)
|
||||
locationToolBar.setObjectName("LocationTools")
|
||||
self.addActions(locationToolBar, locationToolActions)
|
||||
|
||||
self.eventLabel = QLabel()
|
||||
self.eventLabel.setFrameStyle(QFrame.StyledPanel | QFrame.Sunken)
|
||||
status = self.statusBar()
|
||||
@ -752,18 +764,8 @@ class MainWindow(QMainWindow):
|
||||
[mpp + spe, mpp + spe], ylims, colors[1])
|
||||
self.draw()
|
||||
|
||||
def updateStatus(self, message, duration=5000):
|
||||
self.statusBar().showMessage(message, duration)
|
||||
if self.getData() is not None:
|
||||
if not self.getData().isNew():
|
||||
self.setWindowTitle(
|
||||
"PyLoT - processing event %s[*]" % self.getData().getID())
|
||||
elif self.getData().isNew():
|
||||
self.setWindowTitle("PyLoT - New event [*]")
|
||||
else:
|
||||
self.setWindowTitle(
|
||||
"PyLoT - seismic processing the python way[*]")
|
||||
self.setWindowModified(self.dirty)
|
||||
def locateEvent(self):
|
||||
pass
|
||||
|
||||
def check4Loc(self):
|
||||
return self.picksNum() > 4
|
||||
@ -782,6 +784,19 @@ class MainWindow(QMainWindow):
|
||||
def locflag(self, value):
|
||||
self.loc = value
|
||||
|
||||
def updateStatus(self, message, duration=5000):
|
||||
self.statusBar().showMessage(message, duration)
|
||||
if self.getData() is not None:
|
||||
if not self.getData().isNew():
|
||||
self.setWindowTitle(
|
||||
"PyLoT - processing event %s[*]" % self.getData().getID())
|
||||
elif self.getData().isNew():
|
||||
self.setWindowTitle("PyLoT - New event [*]")
|
||||
else:
|
||||
self.setWindowTitle(
|
||||
"PyLoT - seismic processing the python way[*]")
|
||||
self.setWindowModified(self.dirty)
|
||||
|
||||
def tutorUser(self):
|
||||
self.updateStatus('select trace to pick on station ...', 10000)
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
<qresource>
|
||||
<file>icons/pylot.ico</file>
|
||||
<file>icons/pylot.png</file>
|
||||
<file>icons/locate.png</file>
|
||||
<file>icons/printer.png</file>
|
||||
<file>icons/delete.png</file>
|
||||
<file>icons/key_E.png</file>
|
||||
|
BIN
icons/locate.png
Executable file
BIN
icons/locate.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 7.1 KiB |
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user