reformatting code
This commit is contained in:
parent
320b7b7219
commit
a2640e3126
18
QtPyLoT.py
18
QtPyLoT.py
@ -87,7 +87,7 @@ class MainWindow(QMainWindow):
|
|||||||
self.dispComponent = str(settings.value("plotting/dispComponent", "Z"))
|
self.dispComponent = str(settings.value("plotting/dispComponent", "Z"))
|
||||||
if settings.value("data/dataRoot", None) is None:
|
if settings.value("data/dataRoot", None) is None:
|
||||||
dirname = QFileDialog().getExistingDirectory(
|
dirname = QFileDialog().getExistingDirectory(
|
||||||
caption='Choose data root ...')
|
caption='Choose data root ...')
|
||||||
settings.setValue("data/dataRoot", dirname)
|
settings.setValue("data/dataRoot", dirname)
|
||||||
settings.sync()
|
settings.sync()
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ class MainWindow(QMainWindow):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
self.startTime = min(
|
self.startTime = min(
|
||||||
[tr.stats.starttime for tr in self.data.wfdata])
|
[tr.stats.starttime for tr in self.data.wfdata])
|
||||||
except:
|
except:
|
||||||
self.startTime = UTCDateTime()
|
self.startTime = UTCDateTime()
|
||||||
|
|
||||||
@ -373,7 +373,7 @@ class MainWindow(QMainWindow):
|
|||||||
filter=filt)
|
filter=filt)
|
||||||
fname = fname[0]
|
fname = fname[0]
|
||||||
else:
|
else:
|
||||||
fname = unicode(action.data().toString())
|
fname = str(action.data().toString())
|
||||||
self.setFileName(fname)
|
self.setFileName(fname)
|
||||||
self.data += Data(self, evtdata=self.getFileName())
|
self.data += Data(self, evtdata=self.getFileName())
|
||||||
self.updatePicks(type=type)
|
self.updatePicks(type=type)
|
||||||
@ -439,7 +439,7 @@ class MainWindow(QMainWindow):
|
|||||||
directory = os.path.join(self.getRoot(), self.getEventFileName())
|
directory = os.path.join(self.getRoot(), self.getEventFileName())
|
||||||
file_filter = "QuakeML file (*.xml);;VELEST observation file format (*.cnv);;NonLinLoc observation file (*.obs)"
|
file_filter = "QuakeML file (*.xml);;VELEST observation file format (*.cnv);;NonLinLoc observation file (*.obs)"
|
||||||
fname, selected_filter = QFileDialog.getSaveFileName(self, 'Save event data ...',
|
fname, selected_filter = QFileDialog.getSaveFileName(self, 'Save event data ...',
|
||||||
directory, file_filter)
|
directory, file_filter)
|
||||||
|
|
||||||
fbasename, exform = os.path.splitext(fname)
|
fbasename, exform = os.path.splitext(fname)
|
||||||
|
|
||||||
@ -630,8 +630,8 @@ class MainWindow(QMainWindow):
|
|||||||
else:
|
else:
|
||||||
self.updateStatus('Filter loaded ... '
|
self.updateStatus('Filter loaded ... '
|
||||||
'[{0}: {1} Hz]'.format(
|
'[{0}: {1} Hz]'.format(
|
||||||
self.getFilterOptions().getFilterType(),
|
self.getFilterOptions().getFilterType(),
|
||||||
self.getFilterOptions().getFreq()))
|
self.getFilterOptions().getFreq()))
|
||||||
if self.filterAction.isChecked():
|
if self.filterAction.isChecked():
|
||||||
self.filterWaveformData()
|
self.filterWaveformData()
|
||||||
|
|
||||||
@ -836,12 +836,12 @@ class MainWindow(QMainWindow):
|
|||||||
if self.getData() is not None:
|
if self.getData() is not None:
|
||||||
if not self.getData().isNew():
|
if not self.getData().isNew():
|
||||||
self.setWindowTitle(
|
self.setWindowTitle(
|
||||||
"PyLoT - processing event %s[*]" % self.getData().getID())
|
"PyLoT - processing event %s[*]" % self.getData().getID())
|
||||||
elif self.getData().isNew():
|
elif self.getData().isNew():
|
||||||
self.setWindowTitle("PyLoT - New event [*]")
|
self.setWindowTitle("PyLoT - New event [*]")
|
||||||
else:
|
else:
|
||||||
self.setWindowTitle(
|
self.setWindowTitle(
|
||||||
"PyLoT - seismic processing the python way[*]")
|
"PyLoT - seismic processing the python way[*]")
|
||||||
self.setWindowModified(self.dirty)
|
self.setWindowModified(self.dirty)
|
||||||
|
|
||||||
def tutorUser(self):
|
def tutorUser(self):
|
||||||
@ -879,7 +879,7 @@ class MainWindow(QMainWindow):
|
|||||||
def helpHelp(self):
|
def helpHelp(self):
|
||||||
if checkurl():
|
if checkurl():
|
||||||
form = HelpForm(
|
form = HelpForm(
|
||||||
'https://ariadne.geophysik.ruhr-uni-bochum.de/trac/PyLoT/wiki')
|
'https://ariadne.geophysik.ruhr-uni-bochum.de/trac/PyLoT/wiki')
|
||||||
else:
|
else:
|
||||||
form = HelpForm(':/help.html')
|
form = HelpForm(':/help.html')
|
||||||
form.show()
|
form.show()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user