From 0af8ab2b0885d37ece74b1b9e1af652103312b66 Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Fri, 28 Mar 2014 05:28:16 +0100 Subject: [PATCH] holds now all widgets' classes used in the main application --- pylot/core/util/widgets.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index d99fe947..35a6c426 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -27,3 +27,31 @@ class MPLWidget(FigureCanvasQTAgg): self.axes.set_xlabel(xlabel) self.axes.set_ylabel(ylabel) self.axes.set_title(title) + +class PickWindow(QDialog): + + def __init__(self, station=None, parent=None): + super(PickWindow, self).__init__(parent) + + filterDockWidget = FilterOptionsDock(titleString="Filter Options", + parent=self, + filterOptions=filteroptions) + +class PropertiesWindow(QDialog): + + def __init__(self, parent=None): + super(PropertiesWindow, self).__init__(parent) + + +class FilterOptionsDock(QDockWidget): + + def __init__(self, parent=None, titleString="Filter options", + filterOptions=None): + super(FilterOptionsDock, self).__init__() + + if filterOptions and not isinstance(filterOptions, FilterOptions): + try: + fOptions = FilterOptions(**filterOptions) + filterOptions = fOptions + except e: + raise OptionsError('%s' % e) \ No newline at end of file