classes for I/O started, QtPyLoT.py cleaned
This commit is contained in:
parent
25351d3827
commit
d016a80a72
@ -33,56 +33,56 @@ class MainWindow(QMainWindow):
|
|||||||
|
|
||||||
class PickWindow(QDialog):
|
class PickWindow(QDialog):
|
||||||
|
|
||||||
def __init__(self, station=None, parent=None):
|
def __init__(self, station=None, parent=None):
|
||||||
super(PickWindow, self).__init__(parent)
|
super(PickWindow, self).__init__(parent)
|
||||||
|
|
||||||
filterDockWidget = FilterOptionsDock()
|
filterDockWidget = FilterOptionsDock()
|
||||||
|
|
||||||
class PropertiesWindow(QDialog):
|
class PropertiesWindow(QDialog):
|
||||||
|
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
super(PropertiesWindow, self).__init__(parent)
|
super(PropertiesWindow, self).__init__(parent)
|
||||||
|
|
||||||
class FilterOptionsDock(QDockWidget):
|
class FilterOptionsDock(QDockWidget):
|
||||||
|
|
||||||
def __init__(self, filterOptions=None):
|
def __init__(self, filterOptions=None):
|
||||||
super(FilterOptionsDock, self).__init__()
|
super(FilterOptionsDock, self).__init__()
|
||||||
|
|
||||||
if filterOptions and not isinstance(filterOptions, FilterOptions):
|
if filterOptions and not isinstance(filterOptions, FilterOptions):
|
||||||
try:
|
try:
|
||||||
fOptions = FilterOptions(filterOptions)
|
fOptions = FilterOptions(filterOptions)
|
||||||
except e:
|
except e:
|
||||||
raise OptionsError, '%s' % e
|
raise OptionsError, '%s' % e
|
||||||
|
|
||||||
class FilterOptions(object):
|
class FilterOptions(object):
|
||||||
|
|
||||||
def __init__(self, filtertype=None, freq=None, order=None):
|
def __init__(self, filtertype=None, freq=None, order=None):
|
||||||
self.__filterInformation = {}
|
self.__filterInformation = {}
|
||||||
self._setfilterType(filtertype)
|
self._setfilterType(filtertype)
|
||||||
self._setFreq(freq)
|
self._setFreq(freq)
|
||||||
self._setOrder(order)
|
self._setOrder(order)
|
||||||
|
|
||||||
def _getFreq(self):
|
def _getFreq(self):
|
||||||
return self.__filterInformation['freq']
|
return self.__filterInformation['freq']
|
||||||
|
|
||||||
def _setFreq(self, freq):
|
def _setFreq(self, freq):
|
||||||
self.__filterInformation['freq'] = freq
|
self.__filterInformation['freq'] = freq
|
||||||
|
|
||||||
def _getOrder(self):
|
def _getOrder(self):
|
||||||
return self.__filterInformation['order']
|
return self.__filterInformation['order']
|
||||||
|
|
||||||
def _setOrder(self, order):
|
def _setOrder(self, order):
|
||||||
self.__filterInformation['order'] = order
|
self.__filterInformation['order'] = order
|
||||||
|
|
||||||
def _getFilterType(self):
|
def _getFilterType(self):
|
||||||
return self.__filterInformation['filtertype']
|
return self.__filterInformation['filtertype']
|
||||||
|
|
||||||
def _setFilterType(self, filtertype):
|
def _setFilterType(self, filtertype):
|
||||||
self.__filterInformation['filtertype'] = filtertype
|
self.__filterInformation['filtertype'] = filtertype
|
||||||
|
|
||||||
filterType = property(fget=_getFilterType, fset=_setFilterType)
|
filterType = property(fget=_getFilterType, fset=_setFilterType)
|
||||||
order = property(fget=_getOrder, fset=_setOrder)
|
order = property(fget=_getOrder, fset=_setOrder)
|
||||||
freq = property(fget=_getFreq, fset=_setFreq)
|
freq = property(fget=_getFreq, fset=_setFreq)
|
||||||
|
|
||||||
class OptionsError(Exception): pass
|
class OptionsError(Exception): pass
|
||||||
|
|
||||||
@ -91,27 +91,8 @@ if __name__ == '__main__':
|
|||||||
pylot_app = QApplication(sys.argv)
|
pylot_app = QApplication(sys.argv)
|
||||||
|
|
||||||
pylot_main = MainWindow()
|
pylot_main = MainWindow()
|
||||||
pylot_main.setWindowTitle('TestWindow')
|
pylot_main.setWindowTitle('PyLoT-The Picking and Localization Tool')
|
||||||
|
|
||||||
ok_btn = QPushButton('OK', pylot_main)
|
# Show window and run the app
|
||||||
|
pylot_main.show()
|
||||||
@pyqtSlot()
|
pylot_app.exec_()
|
||||||
def on_click():
|
|
||||||
print('clicked')
|
|
||||||
|
|
||||||
@pyqtSlot()
|
|
||||||
def on_press():
|
|
||||||
print('pressed')
|
|
||||||
|
|
||||||
@pyqtSlot()
|
|
||||||
def on_release():
|
|
||||||
print('released')
|
|
||||||
|
|
||||||
# Connect signals to slots
|
|
||||||
ok_btn.clicked.connect(on_click)
|
|
||||||
ok_btn.pressed.connect(on_press)
|
|
||||||
ok_btn.pressed.connect(on_release)
|
|
||||||
|
|
||||||
# Show window and run the app
|
|
||||||
pylot_main.show()
|
|
||||||
pylot_app.exec_()
|
|
||||||
|
0
pylot/core/readdata/__init__.py
Normal file
0
pylot/core/readdata/__init__.py
Normal file
14
pylot/core/readdata/types.py
Normal file
14
pylot/core/readdata/types.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
#
|
||||||
|
# Provide user the opportunity to read arbitrary organized database
|
||||||
|
# types. This means e.g. seiscomp data structure (SDS) or event based
|
||||||
|
# EGELADOS structure.
|
||||||
|
#
|
||||||
|
|
||||||
|
class GenericDataBase(object):
|
||||||
|
def __init__(self, root=None, kwargs**):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class SeiscompDataStructure(GenericDataBase):
|
||||||
|
pass
|
Loading…
Reference in New Issue
Block a user