added status label; not sure how to implement loading of data (different types of databases)
This commit is contained in:
parent
ef8adc6c0a
commit
88b2a319fd
@ -26,6 +26,7 @@ import sys
|
|||||||
from PySide.QtCore import *
|
from PySide.QtCore import *
|
||||||
from PySide.QtGui import *
|
from PySide.QtGui import *
|
||||||
import helpform
|
import helpform
|
||||||
|
from obspy.core import (read, UTCDateTime)
|
||||||
from pylot.core.util import _getVersionString
|
from pylot.core.util import _getVersionString
|
||||||
from pylot.core.read.inputs import FilterOptions
|
from pylot.core.read.inputs import FilterOptions
|
||||||
from pylot.core.util import FILTERDEFAULTS
|
from pylot.core.util import FILTERDEFAULTS
|
||||||
@ -47,13 +48,15 @@ class MainWindow(QMainWindow):
|
|||||||
self.filterOptionsS = FilterOptions(**filterOptionsS)
|
self.filterOptionsS = FilterOptions(**filterOptionsS)
|
||||||
|
|
||||||
self.loadData()
|
self.loadData()
|
||||||
|
self.updateArchiveType()
|
||||||
self.updateFilterOptions()
|
self.updateFilterOptions()
|
||||||
|
|
||||||
self.setupUi()
|
self.setupUi()
|
||||||
|
|
||||||
def loadData(self):
|
def loadData(self):
|
||||||
pass
|
loadDataDlg = LoadDataDlg(self)
|
||||||
|
|
||||||
|
dataStream = read()
|
||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
self.setWindowIcon(QIcon("PyLoT.ico"))
|
self.setWindowIcon(QIcon("PyLoT.ico"))
|
||||||
@ -65,16 +68,24 @@ class MainWindow(QMainWindow):
|
|||||||
parent=self,
|
parent=self,
|
||||||
filterOptions=filteroptions)
|
filterOptions=filteroptions)
|
||||||
|
|
||||||
|
self.eventLabel = QLabel()
|
||||||
|
self.eventLabel.setFrameStyle(QFrame.StyledPanel|QFrame.Sunken)
|
||||||
|
status = self.statusBar()
|
||||||
|
status.setSizeGripEnabled(False)
|
||||||
|
status.addPermanentWidget(self.eventLabel)
|
||||||
|
status.showMessage("Ready", 5000)
|
||||||
|
|
||||||
statLayout = self.layoutStationButtons(self.numStations)
|
statLayout = self.layoutStationButtons(self.numStations)
|
||||||
|
|
||||||
maingrid = QGridLayout()
|
maingrid = QGridLayout()
|
||||||
maingrid.setSpacing(10)
|
maingrid.setSpacing(10)
|
||||||
maingrid.addLayout(statLayout, 0, 0)
|
maingrid.addLayout(statLayout, 0, 0)
|
||||||
|
maingrid.addLayout(dataLayout, 1, 0)
|
||||||
maingrid.addWidget()
|
maingrid.addWidget()
|
||||||
|
|
||||||
def setupPlot(self):
|
def setupPlot(self):
|
||||||
# create a matplotlib widget
|
# create a matplotlib widget
|
||||||
self.DataPlot = MPLWidget()
|
self.DataPlot = MPLWidget(parent=self)
|
||||||
# create a layout inside the blank widget and add the matplotlib widget
|
# create a layout inside the blank widget and add the matplotlib widget
|
||||||
layout = QtGui.QVBoxLayout(self.ui.widget_PlotArea)
|
layout = QtGui.QVBoxLayout(self.ui.widget_PlotArea)
|
||||||
layout.addWidget(self.DataPlot, 1)
|
layout.addWidget(self.DataPlot, 1)
|
||||||
@ -83,13 +94,16 @@ class MainWindow(QMainWindow):
|
|||||||
|
|
||||||
def plotData(self, data):
|
def plotData(self, data):
|
||||||
if data is not None and isinstance(data, Stream):
|
if data is not None and isinstance(data, Stream):
|
||||||
self.stats.numStations = data.
|
pass
|
||||||
|
|
||||||
def updateFilterOptions(self):
|
def updateFilterOptions(self):
|
||||||
self.filteroptions = [self.filterOptionsP
|
self.filteroptions = [self.filterOptionsP
|
||||||
if not self.seismicPhase == 'S'
|
if not self.seismicPhase == 'S'
|
||||||
else self.filterOptionsS]
|
else self.filterOptionsS]
|
||||||
|
|
||||||
|
def updateStatus(self, message):
|
||||||
|
self.statusBar().showMessage(message, 5000)
|
||||||
|
|
||||||
def layoutStationButtons(self, numStations):
|
def layoutStationButtons(self, numStations):
|
||||||
layout = QVBoxLayout()
|
layout = QVBoxLayout()
|
||||||
for n in range(numStations):
|
for n in range(numStations):
|
||||||
|
Loading…
Reference in New Issue
Block a user