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):
|
||||
|
||||
def __init__(self, station=None, parent=None):
|
||||
super(PickWindow, self).__init__(parent)
|
||||
def __init__(self, station=None, parent=None):
|
||||
super(PickWindow, self).__init__(parent)
|
||||
|
||||
filterDockWidget = FilterOptionsDock()
|
||||
filterDockWidget = FilterOptionsDock()
|
||||
|
||||
class PropertiesWindow(QDialog):
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super(PropertiesWindow, self).__init__(parent)
|
||||
def __init__(self, parent=None):
|
||||
super(PropertiesWindow, self).__init__(parent)
|
||||
|
||||
class FilterOptionsDock(QDockWidget):
|
||||
|
||||
def __init__(self, filterOptions=None):
|
||||
super(FilterOptionsDock, self).__init__()
|
||||
def __init__(self, filterOptions=None):
|
||||
super(FilterOptionsDock, self).__init__()
|
||||
|
||||
if filterOptions and not isinstance(filterOptions, FilterOptions):
|
||||
try:
|
||||
fOptions = FilterOptions(filterOptions)
|
||||
except e:
|
||||
raise OptionsError, '%s' % e
|
||||
if filterOptions and not isinstance(filterOptions, FilterOptions):
|
||||
try:
|
||||
fOptions = FilterOptions(filterOptions)
|
||||
except e:
|
||||
raise OptionsError, '%s' % e
|
||||
|
||||
class FilterOptions(object):
|
||||
|
||||
def __init__(self, filtertype=None, freq=None, order=None):
|
||||
self.__filterInformation = {}
|
||||
self._setfilterType(filtertype)
|
||||
self._setFreq(freq)
|
||||
self._setOrder(order)
|
||||
def __init__(self, filtertype=None, freq=None, order=None):
|
||||
self.__filterInformation = {}
|
||||
self._setfilterType(filtertype)
|
||||
self._setFreq(freq)
|
||||
self._setOrder(order)
|
||||
|
||||
def _getFreq(self):
|
||||
return self.__filterInformation['freq']
|
||||
def _getFreq(self):
|
||||
return self.__filterInformation['freq']
|
||||
|
||||
def _setFreq(self, freq):
|
||||
self.__filterInformation['freq'] = freq
|
||||
def _setFreq(self, freq):
|
||||
self.__filterInformation['freq'] = freq
|
||||
|
||||
def _getOrder(self):
|
||||
return self.__filterInformation['order']
|
||||
def _getOrder(self):
|
||||
return self.__filterInformation['order']
|
||||
|
||||
def _setOrder(self, order):
|
||||
self.__filterInformation['order'] = order
|
||||
def _setOrder(self, order):
|
||||
self.__filterInformation['order'] = order
|
||||
|
||||
def _getFilterType(self):
|
||||
return self.__filterInformation['filtertype']
|
||||
def _getFilterType(self):
|
||||
return self.__filterInformation['filtertype']
|
||||
|
||||
def _setFilterType(self, filtertype):
|
||||
self.__filterInformation['filtertype'] = filtertype
|
||||
def _setFilterType(self, filtertype):
|
||||
self.__filterInformation['filtertype'] = filtertype
|
||||
|
||||
filterType = property(fget=_getFilterType, fset=_setFilterType)
|
||||
order = property(fget=_getOrder, fset=_setOrder)
|
||||
freq = property(fget=_getFreq, fset=_setFreq)
|
||||
filterType = property(fget=_getFilterType, fset=_setFilterType)
|
||||
order = property(fget=_getOrder, fset=_setOrder)
|
||||
freq = property(fget=_getFreq, fset=_setFreq)
|
||||
|
||||
class OptionsError(Exception): pass
|
||||
|
||||
@ -91,27 +91,8 @@ if __name__ == '__main__':
|
||||
pylot_app = QApplication(sys.argv)
|
||||
|
||||
pylot_main = MainWindow()
|
||||
pylot_main.setWindowTitle('TestWindow')
|
||||
pylot_main.setWindowTitle('PyLoT-The Picking and Localization Tool')
|
||||
|
||||
ok_btn = QPushButton('OK', pylot_main)
|
||||
|
||||
@pyqtSlot()
|
||||
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_()
|
||||
# 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