updated widgets

This commit is contained in:
Luke Campagnola 2013-12-22 02:18:37 -05:00
parent f630734453
commit cf312e7bac
28 changed files with 74 additions and 74 deletions

View File

@ -1,4 +1,4 @@
from pyqtgraph.Qt import QtGui, QtCore
from ..Qt import QtGui, QtCore
__all__ = ['BusyCursor']

View File

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from pyqtgraph.Qt import QtGui, QtCore
from ..Qt import QtGui, QtCore
from . import VerticalLabel
__all__ = ['CheckTable']

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from pyqtgraph.Qt import QtGui, QtCore
import pyqtgraph.functions as functions
from ..Qt import QtGui, QtCore
from .. import functions as functions
__all__ = ['ColorButton']

View File

@ -1,8 +1,8 @@
from pyqtgraph.Qt import QtGui, QtCore
import pyqtgraph.parametertree as ptree
from ..Qt import QtGui, QtCore
from .. import parametertree as ptree
import numpy as np
from pyqtgraph.pgcollections import OrderedDict
import pyqtgraph.functions as fn
from ..pgcollections import OrderedDict
from .. import functions as fn
__all__ = ['ColorMapWidget']

View File

@ -1,5 +1,5 @@
from pyqtgraph.Qt import QtGui, QtCore
from pyqtgraph.SignalProxy import SignalProxy
from ..Qt import QtGui, QtCore
from ..SignalProxy import SignalProxy
class ComboBox(QtGui.QComboBox):

View File

@ -1,8 +1,8 @@
from pyqtgraph.Qt import QtGui, QtCore
import pyqtgraph.parametertree as ptree
from ..Qt import QtGui, QtCore
from .. import parametertree as ptree
import numpy as np
from pyqtgraph.pgcollections import OrderedDict
import pyqtgraph as pg
from ..pgcollections import OrderedDict
from .. import functions as fn
__all__ = ['DataFilterWidget']
@ -108,7 +108,7 @@ class RangeFilterItem(ptree.types.SimpleParameter):
return mask
def describe(self):
return "%s < %s < %s" % (pg.siFormat(self['Min'], suffix=self.units), self.fieldName, pg.siFormat(self['Max'], suffix=self.units))
return "%s < %s < %s" % (fn.siFormat(self['Min'], suffix=self.units), self.fieldName, fn.siFormat(self['Max'], suffix=self.units))
class EnumFilterItem(ptree.types.SimpleParameter):
def __init__(self, name, opts):

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from pyqtgraph.Qt import QtGui, QtCore
from pyqtgraph.pgcollections import OrderedDict
from ..Qt import QtGui, QtCore
from ..pgcollections import OrderedDict
import types, traceback
import numpy as np

View File

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from pyqtgraph.Qt import QtCore, QtGui
from ..Qt import QtCore, QtGui
__all__ = ['FeedbackButton']

View File

@ -1,4 +1,4 @@
from pyqtgraph.Qt import QtGui, QtCore
from ..Qt import QtGui, QtCore
import sys
__all__ = ['FileDialog']

View File

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from pyqtgraph.Qt import QtGui, QtCore
from ..Qt import QtGui, QtCore
from .GraphicsView import GraphicsView
from pyqtgraph.graphicsItems.GradientEditorItem import GradientEditorItem
from ..graphicsItems.GradientEditorItem import GradientEditorItem
import weakref
import numpy as np

View File

@ -1,5 +1,5 @@
from pyqtgraph.Qt import QtGui
from pyqtgraph.graphicsItems.GraphicsLayout import GraphicsLayout
from ..Qt import QtGui
from ..graphicsItems.GraphicsLayout import GraphicsLayout
from .GraphicsView import GraphicsView
__all__ = ['GraphicsLayoutWidget']

View File

@ -5,23 +5,22 @@ Copyright 2010 Luke Campagnola
Distributed under MIT/X11 license. See license.txt for more infomation.
"""
from pyqtgraph.Qt import QtCore, QtGui
import pyqtgraph as pg
from ..Qt import QtCore, QtGui, USE_PYSIDE
try:
from pyqtgraph.Qt import QtOpenGL
from ..Qt import QtOpenGL
HAVE_OPENGL = True
except ImportError:
HAVE_OPENGL = False
from pyqtgraph.Point import Point
from ..Point import Point
import sys, os
from .FileDialog import FileDialog
from pyqtgraph.GraphicsScene import GraphicsScene
from ..GraphicsScene import GraphicsScene
import numpy as np
import pyqtgraph.functions as fn
import pyqtgraph.debug as debug
import pyqtgraph
from .. import functions as fn
from .. import debug as debug
from .. import getConfigOption
__all__ = ['GraphicsView']
@ -73,7 +72,7 @@ class GraphicsView(QtGui.QGraphicsView):
QtGui.QGraphicsView.__init__(self, parent)
if useOpenGL is None:
useOpenGL = pyqtgraph.getConfigOption('useOpenGL')
useOpenGL = getConfigOption('useOpenGL')
self.useOpenGL(useOpenGL)
@ -108,7 +107,7 @@ class GraphicsView(QtGui.QGraphicsView):
## Workaround for PySide crash
## This ensures that the scene will outlive the view.
if pyqtgraph.Qt.USE_PYSIDE:
if USE_PYSIDE:
self.sceneObj._view_ref_workaround = self
## by default we set up a central widget with a grid layout.
@ -138,7 +137,7 @@ class GraphicsView(QtGui.QGraphicsView):
"""
self._background = background
if background == 'default':
background = pyqtgraph.getConfigOption('background')
background = getConfigOption('background')
brush = fn.mkBrush(background)
self.setBackgroundBrush(brush)

View File

@ -3,9 +3,9 @@ Widget displaying an image histogram along with gradient editor. Can be used to
This is a wrapper around HistogramLUTItem
"""
from pyqtgraph.Qt import QtGui, QtCore
from ..Qt import QtGui, QtCore
from .GraphicsView import GraphicsView
from pyqtgraph.graphicsItems.HistogramLUTItem import HistogramLUTItem
from ..graphicsItems.HistogramLUTItem import HistogramLUTItem
__all__ = ['HistogramLUTWidget']

View File

@ -1,4 +1,4 @@
from pyqtgraph.Qt import QtGui, QtCore
from ..Qt import QtGui, QtCore
__all__ = ['JoystickButton']

View File

@ -1,4 +1,4 @@
from pyqtgraph.Qt import QtGui, QtCore
from ..Qt import QtGui, QtCore
__all__ = ['LayoutWidget']
class LayoutWidget(QtGui.QWidget):

View File

@ -1,4 +1,4 @@
from pyqtgraph.Qt import QtGui, QtCore, USE_PYSIDE
from ..Qt import QtGui, QtCore, USE_PYSIDE
import matplotlib
if USE_PYSIDE:

View File

@ -6,7 +6,7 @@ Distributed under MIT/X11 license. See license.txt for more infomation.
"""
from .GraphicsView import GraphicsView
import pyqtgraph.graphicsItems.MultiPlotItem as MultiPlotItem
from ..graphicsItems import MultiPlotItem as MultiPlotItem
__all__ = ['MultiPlotWidget']
class MultiPlotWidget(GraphicsView):

View File

@ -1,5 +1,6 @@
from pyqtgraph.Qt import QtGui, QtCore
import pyqtgraph as pg
from ..Qt import QtGui, QtCore
from .. import functions as fn
__all__ = ['PathButton']
@ -20,10 +21,10 @@ class PathButton(QtGui.QPushButton):
def setBrush(self, brush):
self.brush = pg.mkBrush(brush)
self.brush = fn.mkBrush(brush)
def setPen(self, pen):
self.pen = pg.mkPen(pen)
self.pen = fn.mkPen(pen)
def setPath(self, path):
self.path = path

View File

@ -5,9 +5,9 @@ Copyright 2010 Luke Campagnola
Distributed under MIT/X11 license. See license.txt for more infomation.
"""
from pyqtgraph.Qt import QtCore, QtGui
from ..Qt import QtCore, QtGui
from .GraphicsView import *
from pyqtgraph.graphicsItems.PlotItem import *
from ..graphicsItems.PlotItem import *
__all__ = ['PlotWidget']
class PlotWidget(GraphicsView):

View File

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from pyqtgraph.Qt import QtGui, QtCore
from ..Qt import QtGui, QtCore
__all__ = ['ProgressDialog']
class ProgressDialog(QtGui.QProgressDialog):

View File

@ -1,12 +1,12 @@
from pyqtgraph.Qt import QtCore, QtGui
from ..Qt import QtCore, QtGui
try:
from pyqtgraph.Qt import QtOpenGL
from ..Qt import QtOpenGL
from OpenGL.GL import *
HAVE_OPENGL = True
except ImportError:
HAVE_OPENGL = False
import pyqtgraph.functions as fn
from .. import functions as fn
import numpy as np
class RawImageWidget(QtGui.QWidget):

View File

@ -1,8 +1,7 @@
from pyqtgraph.Qt import QtGui, QtCore, USE_PYSIDE
from ..Qt import QtGui, QtCore, USE_PYSIDE
if not USE_PYSIDE:
import sip
import pyqtgraph.multiprocess as mp
import pyqtgraph as pg
from .. import multiprocess as mp
from .GraphicsView import GraphicsView
import numpy as np
import mmap, tempfile, ctypes, atexit, sys, random

View File

@ -1,12 +1,13 @@
from pyqtgraph.Qt import QtGui, QtCore
from ..Qt import QtGui, QtCore
from .PlotWidget import PlotWidget
from .DataFilterWidget import DataFilterParameter
from .ColorMapWidget import ColorMapParameter
import pyqtgraph.parametertree as ptree
import pyqtgraph.functions as fn
from .. import parametertree as ptree
from .. import functions as fn
from .. import getConfigOption
from ..graphicsItems.TextItem import TextItem
import numpy as np
from pyqtgraph.pgcollections import OrderedDict
import pyqtgraph as pg
from ..pgcollections import OrderedDict
__all__ = ['ScatterPlotWidget']
@ -48,9 +49,9 @@ class ScatterPlotWidget(QtGui.QSplitter):
self.ctrlPanel.addWidget(self.ptree)
self.addWidget(self.plot)
bg = pg.mkColor(pg.getConfigOption('background'))
bg = fn.mkColor(getConfigOption('background'))
bg.setAlpha(150)
self.filterText = pg.TextItem(border=pg.getConfigOption('foreground'), color=bg)
self.filterText = TextItem(border=getConfigOption('foreground'), color=bg)
self.filterText.setPos(60,20)
self.filterText.setParentItem(self.plot.plotItem)
@ -193,7 +194,7 @@ class ScatterPlotWidget(QtGui.QSplitter):
imax = int(xy[ax].max()) if len(xy[ax]) > 0 else 0
for i in range(imax+1):
keymask = xy[ax] == i
scatter = pg.pseudoScatter(xy[1-ax][keymask], bidir=True)
scatter = fn.pseudoScatter(xy[1-ax][keymask], bidir=True)
if len(scatter) == 0:
continue
smax = np.abs(scatter).max()

View File

@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-
from pyqtgraph.Qt import QtGui, QtCore
from pyqtgraph.python2_3 import asUnicode
from pyqtgraph.SignalProxy import SignalProxy
from ..Qt import QtGui, QtCore
from ..python2_3 import asUnicode
from ..SignalProxy import SignalProxy
import pyqtgraph.functions as fn
from .. import functions as fn
from math import log
from decimal import Decimal as D ## Use decimal to avoid accumulating floating-point errors
from decimal import *

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from pyqtgraph.Qt import QtGui, QtCore
from pyqtgraph.python2_3 import asUnicode
from ..Qt import QtGui, QtCore
from ..python2_3 import asUnicode
import numpy as np
try:

View File

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from pyqtgraph.Qt import QtGui, QtCore
from ..Qt import QtGui, QtCore
from weakref import *
__all__ = ['TreeWidget', 'TreeWidgetItem']

View File

@ -1,6 +1,6 @@
from pyqtgraph.Qt import QtCore, QtGui
from pyqtgraph.ptime import time
import pyqtgraph as pg
from ..Qt import QtCore, QtGui
from ..ptime import time
from .. import functions as fn
from functools import reduce
__all__ = ['ValueLabel']
@ -67,7 +67,7 @@ class ValueLabel(QtGui.QLabel):
avg = self.averageValue()
val = self.values[-1][1]
if self.siPrefix:
return pg.siFormat(avg, suffix=self.suffix)
return fn.siFormat(avg, suffix=self.suffix)
else:
return self.formatStr.format(value=val, avgValue=avg, suffix=self.suffix)

View File

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from pyqtgraph.Qt import QtGui, QtCore
from ..Qt import QtGui, QtCore
__all__ = ['VerticalLabel']
#class VerticalLabel(QtGui.QLabel):