icon for P and S phase selection added
This commit is contained in:
parent
d47623ed65
commit
9dc57e3977
26
QtPyLoT.py
26
QtPyLoT.py
@ -11,6 +11,9 @@ Additionally PyLoT is meant as an interface to autoPyLoT which can
|
|||||||
automatically pick seismic phases, if the parameters have properly been
|
automatically pick seismic phases, if the parameters have properly been
|
||||||
chosen for the particular data set.
|
chosen for the particular data set.
|
||||||
|
|
||||||
|
Some icons are out of a free of charge icon set, which can be found here:
|
||||||
|
https://www.iconfinder.com/iconsets/flavour
|
||||||
|
|
||||||
:author:
|
:author:
|
||||||
Sebastian Wehling-Benatelli
|
Sebastian Wehling-Benatelli
|
||||||
:copyright:
|
:copyright:
|
||||||
@ -97,7 +100,7 @@ class MainWindow(QMainWindow):
|
|||||||
return self.DataPlot
|
return self.DataPlot
|
||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
self.setWindowIcon(QIcon(":/pylot.ico"))
|
self.setWindowIcon(QIcon(":/icon.ico"))
|
||||||
|
|
||||||
xlab = self.startTime.strftime('seconds since %d %b %Y %H:%M:%S (%Z)')
|
xlab = self.startTime.strftime('seconds since %d %b %Y %H:%M:%S (%Z)')
|
||||||
plottitle = self._getCurrentPlotType()
|
plottitle = self._getCurrentPlotType()
|
||||||
@ -110,14 +113,16 @@ class MainWindow(QMainWindow):
|
|||||||
|
|
||||||
self.setCentralWidget(self.getDataWidget())
|
self.setCentralWidget(self.getDataWidget())
|
||||||
|
|
||||||
|
openIcon = self.style().standardIcon(QStyle.SP_DirOpenIcon)
|
||||||
|
quitIcon = self.style().standardIcon(QStyle.SP_MediaStop)
|
||||||
self.openEventAction = self.createAction("&Open event ...",
|
self.openEventAction = self.createAction("&Open event ...",
|
||||||
self.loadData,
|
self.loadData,
|
||||||
QKeySequence.Open,
|
QKeySequence.Open,
|
||||||
self.style().standardIcon(QStyle.SP_DirOpenIcon),
|
openIcon,
|
||||||
"Open an event.")
|
"Open an event.")
|
||||||
self.quitAction = self.createAction("&Quit", self.cleanUp,
|
self.quitAction = self.createAction("&Quit", self.cleanUp,
|
||||||
QKeySequence.Close,
|
QKeySequence.Close,
|
||||||
self.style().standardIcon(QStyle.SP_MediaStop),
|
quitIcon,
|
||||||
"Close event and quit PyLoT")
|
"Close event and quit PyLoT")
|
||||||
self.filterAction = self.createAction("&Filter ...", self.filterData,
|
self.filterAction = self.createAction("&Filter ...", self.filterData,
|
||||||
"Ctrl+F", ":/filter.png",
|
"Ctrl+F", ":/filter.png",
|
||||||
@ -131,7 +136,11 @@ class MainWindow(QMainWindow):
|
|||||||
self.selectSAction = self.createAction("&S", self.alterPhase, "Ctrl+S",
|
self.selectSAction = self.createAction("&S", self.alterPhase, "Ctrl+S",
|
||||||
":/sicon.png", "Toggle S phase",
|
":/sicon.png", "Toggle S phase",
|
||||||
True)
|
True)
|
||||||
self.printAction = self.createAction("&Print event ...", self.printEvent, QKeySequence.Print, QIcon(":/printer.png"), tip, checkable)
|
self.printAction = self.createAction("&Print event ...",
|
||||||
|
self.printEvent,
|
||||||
|
QKeySequence.Print,
|
||||||
|
QIcon(":/printer.png"),
|
||||||
|
"Print waveform overview.")
|
||||||
|
|
||||||
self.eventLabel = QLabel()
|
self.eventLabel = QLabel()
|
||||||
self.eventLabel.setFrameStyle(QFrame.StyledPanel|QFrame.Sunken)
|
self.eventLabel.setFrameStyle(QFrame.StyledPanel|QFrame.Sunken)
|
||||||
@ -174,15 +183,16 @@ class MainWindow(QMainWindow):
|
|||||||
if not self.seismicPhase == 'S'
|
if not self.seismicPhase == 'S'
|
||||||
else self.filterOptionsS]
|
else self.filterOptionsS]
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
self.updateStatus('Error: %s' % e + ' ... no filteroptions loaded')
|
self.updateStatus('Error ...')
|
||||||
|
QErrorMessage(e)
|
||||||
else:
|
else:
|
||||||
self.updateStatus('Filteroptions succesfully loaded ...')
|
self.updateStatus('Filter loaded ...')
|
||||||
|
|
||||||
def getSeismicPhase(self):
|
def getSeismicPhase(self):
|
||||||
return self.seismicPhase
|
return self.seismicPhase
|
||||||
|
|
||||||
def setSeismicPhase(self, phase):
|
def setSeismicPhase(self, phase):
|
||||||
self.seismicPhase = self.seismicPhaseButton.getValue()
|
self.seismicPhase = self.seismicPhaseButtonGroup.getValue()
|
||||||
|
|
||||||
def updateStatus(self, message):
|
def updateStatus(self, message):
|
||||||
self.statusBar().showMessage(message, 5000)
|
self.statusBar().showMessage(message, 5000)
|
||||||
@ -203,7 +213,7 @@ def main():
|
|||||||
pylot_app.setOrganizationName("Ruhr-University Bochum / MAGS2")
|
pylot_app.setOrganizationName("Ruhr-University Bochum / MAGS2")
|
||||||
pylot_app.setOrganizationDomain("rub.de")
|
pylot_app.setOrganizationDomain("rub.de")
|
||||||
pylot_app.setApplicationName("PyLoT")
|
pylot_app.setApplicationName("PyLoT")
|
||||||
pylot_app.setWindowIcon(QIcon(":/pylot.ico"))
|
pylot_app.setWindowIcon(QIcon(":/icon.ico"))
|
||||||
|
|
||||||
# create the main window
|
# create the main window
|
||||||
pylot_form = MainWindow()
|
pylot_form = MainWindow()
|
||||||
|
BIN
icons/picon.png
Normal file
BIN
icons/picon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 674 B |
BIN
icons/sicon.png
Normal file
BIN
icons/sicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 726 B |
@ -2,7 +2,8 @@
|
|||||||
<qresource>
|
<qresource>
|
||||||
<file alias="icon.ico">icons/pylot.ico</file>
|
<file alias="icon.ico">icons/pylot.ico</file>
|
||||||
<file alias="printer.png">icons/printer.png</file>
|
<file alias="printer.png">icons/printer.png</file>
|
||||||
|
<file alias="picon.png">icons/picon.png</file>
|
||||||
|
<file alias="sicon.png">icons/sicon.png</file>
|
||||||
<file alias="help.html">help/index.html</file>
|
<file alias="help.html">help/index.html</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
Loading…
Reference in New Issue
Block a user