From c26782bf7ca90f5f3166fdd90de51896e3e8bbb0 Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Mon, 31 Mar 2014 12:59:52 +0200 Subject: [PATCH] imports fixed and classes renamed for better readability --- pylot/core/util/__init__.py | 6 ++++-- pylot/core/util/widgets.py | 11 +++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/pylot/core/util/__init__.py b/pylot/core/util/__init__.py index ae9d355b..bfda9905 100755 --- a/pylot/core/util/__init__.py +++ b/pylot/core/util/__init__.py @@ -1,4 +1,6 @@ from pylot.core.util.version import get_git_version as _getVersionString from pylot.core.util.defaults import FILTERDEFAULTS -from pylot.core.util.widgets import * -from pylot.core.util.errors import * +from pylot.core.util.widgets import (PickDlg, MPLWidget, PropertiesDlg, + FilterOptionsDock) +from pylot.core.util.errors import OptionsError +from pylot.core.util.connection import checkurl diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index 35a6c426..1f531d5a 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -12,6 +12,7 @@ matplotlib.rcParams['backend.qt4'] = 'PySide' from matplotlib.figure import Figure from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg +from PySide.QtGui import (QDialog, QDockWidget) class MPLWidget(FigureCanvasQTAgg): @@ -28,16 +29,18 @@ class MPLWidget(FigureCanvasQTAgg): self.axes.set_ylabel(ylabel) self.axes.set_title(title) -class PickWindow(QDialog): + +class PickDlg(QDialog): def __init__(self, station=None, parent=None): - super(PickWindow, self).__init__(parent) + super(PickDlg, self).__init__(parent) filterDockWidget = FilterOptionsDock(titleString="Filter Options", parent=self, filterOptions=filteroptions) -class PropertiesWindow(QDialog): + +class PropertiesDlg(QDialog): def __init__(self, parent=None): super(PropertiesWindow, self).__init__(parent) @@ -54,4 +57,4 @@ class FilterOptionsDock(QDockWidget): fOptions = FilterOptions(**filterOptions) filterOptions = fOptions except e: - raise OptionsError('%s' % e) \ No newline at end of file + raise OptionsError('%s' % e)