From 50df2b2def326257151863aacdcd912b2cf7f3a9 Mon Sep 17 00:00:00 2001 From: Luke Campagnola Date: Mon, 23 Dec 2013 10:06:26 -0500 Subject: [PATCH] dockarea, imageview, metaarray --- pyqtgraph/dockarea/Container.py | 2 +- pyqtgraph/dockarea/Dock.py | 4 ++-- pyqtgraph/dockarea/DockArea.py | 4 ++-- pyqtgraph/dockarea/DockDrop.py | 2 +- pyqtgraph/imageview/ImageView.py | 20 +++++++++---------- pyqtgraph/imageview/ImageViewTemplate_pyqt.py | 6 +++--- .../imageview/ImageViewTemplate_pyside.py | 6 +++--- pyqtgraph/metaarray/MetaArray.py | 4 ++-- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pyqtgraph/dockarea/Container.py b/pyqtgraph/dockarea/Container.py index 01ae51d3..277375f3 100644 --- a/pyqtgraph/dockarea/Container.py +++ b/pyqtgraph/dockarea/Container.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from pyqtgraph.Qt import QtCore, QtGui +from ..Qt import QtCore, QtGui import weakref class Container(object): diff --git a/pyqtgraph/dockarea/Dock.py b/pyqtgraph/dockarea/Dock.py index 09a97813..f83397c7 100644 --- a/pyqtgraph/dockarea/Dock.py +++ b/pyqtgraph/dockarea/Dock.py @@ -1,7 +1,7 @@ -from pyqtgraph.Qt import QtCore, QtGui +from ..Qt import QtCore, QtGui from .DockDrop import * -from pyqtgraph.widgets.VerticalLabel import VerticalLabel +from ..widgets.VerticalLabel import VerticalLabel class Dock(QtGui.QWidget, DockDrop): diff --git a/pyqtgraph/dockarea/DockArea.py b/pyqtgraph/dockarea/DockArea.py index 882b29a3..5c367f0b 100644 --- a/pyqtgraph/dockarea/DockArea.py +++ b/pyqtgraph/dockarea/DockArea.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- -from pyqtgraph.Qt import QtCore, QtGui +from ..Qt import QtCore, QtGui from .Container import * from .DockDrop import * from .Dock import Dock -import pyqtgraph.debug as debug +from .. import debug as debug import weakref ## TODO: diff --git a/pyqtgraph/dockarea/DockDrop.py b/pyqtgraph/dockarea/DockDrop.py index acab28cd..bd364f50 100644 --- a/pyqtgraph/dockarea/DockDrop.py +++ b/pyqtgraph/dockarea/DockDrop.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from pyqtgraph.Qt import QtCore, QtGui +from ..Qt import QtCore, QtGui class DockDrop(object): """Provides dock-dropping methods""" diff --git a/pyqtgraph/imageview/ImageView.py b/pyqtgraph/imageview/ImageView.py index 25700d93..d4458a0e 100644 --- a/pyqtgraph/imageview/ImageView.py +++ b/pyqtgraph/imageview/ImageView.py @@ -12,29 +12,29 @@ Widget used for displaying 2D or 3D data. Features: - ROI plotting - Image normalization through a variety of methods """ -from pyqtgraph.Qt import QtCore, QtGui, USE_PYSIDE +from ..Qt import QtCore, QtGui, USE_PYSIDE if USE_PYSIDE: from .ImageViewTemplate_pyside import * else: from .ImageViewTemplate_pyqt import * -from pyqtgraph.graphicsItems.ImageItem import * -from pyqtgraph.graphicsItems.ROI import * -from pyqtgraph.graphicsItems.LinearRegionItem import * -from pyqtgraph.graphicsItems.InfiniteLine import * -from pyqtgraph.graphicsItems.ViewBox import * +from ..graphicsItems.ImageItem import * +from ..graphicsItems.ROI import * +from ..graphicsItems.LinearRegionItem import * +from ..graphicsItems.InfiniteLine import * +from ..graphicsItems.ViewBox import * #from widgets import ROI import sys #from numpy import ndarray -import pyqtgraph.ptime as ptime +from .. import ptime as ptime import numpy as np -import pyqtgraph.debug as debug +from .. import debug as debug -from pyqtgraph.SignalProxy import SignalProxy +from ..SignalProxy import SignalProxy #try: - #import pyqtgraph.metaarray as metaarray + #from .. import metaarray as metaarray #HAVE_METAARRAY = True #except: #HAVE_METAARRAY = False diff --git a/pyqtgraph/imageview/ImageViewTemplate_pyqt.py b/pyqtgraph/imageview/ImageViewTemplate_pyqt.py index e6423276..8bdf1081 100644 --- a/pyqtgraph/imageview/ImageViewTemplate_pyqt.py +++ b/pyqtgraph/imageview/ImageViewTemplate_pyqt.py @@ -155,6 +155,6 @@ class Ui_Form(object): self.normTimeRangeCheck.setText(QtGui.QApplication.translate("Form", "Time range", None, QtGui.QApplication.UnicodeUTF8)) self.normFrameCheck.setText(QtGui.QApplication.translate("Form", "Frame", None, QtGui.QApplication.UnicodeUTF8)) -from pyqtgraph.widgets.GraphicsView import GraphicsView -from pyqtgraph.widgets.PlotWidget import PlotWidget -from pyqtgraph.widgets.HistogramLUTWidget import HistogramLUTWidget +from ..widgets.GraphicsView import GraphicsView +from ..widgets.PlotWidget import PlotWidget +from ..widgets.HistogramLUTWidget import HistogramLUTWidget diff --git a/pyqtgraph/imageview/ImageViewTemplate_pyside.py b/pyqtgraph/imageview/ImageViewTemplate_pyside.py index c17bbfe1..1732d60e 100644 --- a/pyqtgraph/imageview/ImageViewTemplate_pyside.py +++ b/pyqtgraph/imageview/ImageViewTemplate_pyside.py @@ -150,6 +150,6 @@ class Ui_Form(object): self.normTimeRangeCheck.setText(QtGui.QApplication.translate("Form", "Time range", None, QtGui.QApplication.UnicodeUTF8)) self.normFrameCheck.setText(QtGui.QApplication.translate("Form", "Frame", None, QtGui.QApplication.UnicodeUTF8)) -from pyqtgraph.widgets.GraphicsView import GraphicsView -from pyqtgraph.widgets.PlotWidget import PlotWidget -from pyqtgraph.widgets.HistogramLUTWidget import HistogramLUTWidget +from ..widgets.GraphicsView import GraphicsView +from ..widgets.PlotWidget import PlotWidget +from ..widgets.HistogramLUTWidget import HistogramLUTWidget diff --git a/pyqtgraph/metaarray/MetaArray.py b/pyqtgraph/metaarray/MetaArray.py index f55c60dc..d24a7d05 100644 --- a/pyqtgraph/metaarray/MetaArray.py +++ b/pyqtgraph/metaarray/MetaArray.py @@ -929,7 +929,7 @@ class MetaArray(object): if proc == False: raise Exception('remote read failed') if proc == None: - import pyqtgraph.multiprocess as mp + from .. import multiprocess as mp #print "new process" proc = mp.Process(executable='/usr/bin/python') proc.setProxyOptions(deferGetattr=True) @@ -1471,4 +1471,4 @@ if __name__ == '__main__': ma2 = MetaArray(file=tf, mmap=True) print("\nArrays are equivalent:", (ma == ma2).all()) os.remove(tf) - \ No newline at end of file +