Commit 374e1340 authored by Megan Kratz's avatar Megan Kratz
Browse files

merge from Luke

parents c8123fef 9cb199d9
......@@ -3,7 +3,7 @@ from pyqtgraph.Qt import QtCore, QtGui
import weakref
import pyqtgraph.ptime as ptime
class MouseDragEvent:
class MouseDragEvent(object):
"""
Instances of this class are delivered to items in a :class:`GraphicsScene <pyqtgraph.GraphicsScene>` via their mouseDragEvent() method when the item is being mouse-dragged.
......@@ -144,7 +144,7 @@ class MouseDragEvent:
class MouseClickEvent:
class MouseClickEvent(object):
"""
Instances of this class are delivered to items in a :class:`GraphicsScene <pyqtgraph.GraphicsScene>` via their mouseClickEvent() method when the item is clicked.
......@@ -229,7 +229,7 @@ class MouseClickEvent:
class HoverEvent:
class HoverEvent(object):
"""
Instances of this class are delivered to items in a :class:`GraphicsScene <pyqtgraph.GraphicsScene>` via their hoverEvent() method when the mouse is hovering over the item.
This event class both informs items that the mouse cursor is nearby and allows items to
......
......@@ -317,7 +317,7 @@ def objectSize(obj, ignore=None, verbose=False, depth=0, recursive=False):
#print indent + ' -', k, len(refs)
return size
class GarbageWatcher:
class GarbageWatcher(object):
"""
Convenient dictionary for holding weak references to objects.
Mainly used to check whether the objects have been collect yet or not.
......@@ -356,7 +356,7 @@ class GarbageWatcher:
return self.objs[item]
class Profiler:
class Profiler(object):
"""Simple profiler allowing measurement of multiple time intervals.
Example:
......@@ -451,7 +451,7 @@ def lookup(oid, objects=None):
class ObjTracker:
class ObjTracker(object):
"""
Tracks all objects under the sun, reporting the changes between snapshots: what objects are created, deleted, and persistent.
This class is very useful for tracking memory leaks. The class goes to great (but not heroic) lengths to avoid tracking
......
GLSurfacePlotItem
=================
.. autoclass:: pyqtgraph.opengl.GLSurfacePlotItem
:members:
.. automethod:: pyqtgraph.opengl.GLSurfacePlotItem.__init__
......@@ -16,9 +16,10 @@ Contents:
glviewwidget
glgriditem
glmeshitem
glsurfaceplotitem
glvolumeitem
glimageitem
glmeshitem
glaxisitem
glgraphicsitem
glscatterplotitem
......
......@@ -5,5 +5,4 @@ MeshData
:members:
.. automethod:: pyqtgraph.opengl.MeshData.MeshData.__init__
.. automethod:: pyqtgraph.opengl.MeshData.MeshData.__iter__
FillBetweenItem
===============
.. autoclass:: pyqtgraph.FillBetweenItem
:members:
.. automethod:: pyqtgraph.FillBetweenItem.__init__
GraphicsWidgetAnchor
====================
.. autoclass:: pyqtgraph.GraphicsWidgetAnchor
:members:
.. automethod:: pyqtgraph.GraphicsWidgetAnchor.__init__
......@@ -23,6 +23,7 @@ Contents:
axisitem
textitem
arrowitem
fillbetweenitem
curvepoint
curvearrow
griditem
......@@ -38,4 +39,5 @@ Contents:
graphicswidget
graphicsitem
uigraphicsitem
graphicswidgetanchor
BusyCursor
==========
.. autoclass:: pyqtgraph.BusyCursor
:members:
.. automethod:: pyqtgraph.BusyCursor.__init__
ComboBox
========
.. autoclass:: pyqtgraph.ComboBox
:members:
.. automethod:: pyqtgraph.ComboBox.__init__
FeedbackButton
==============
.. autoclass:: pyqtgraph.FeedbackButton
:members:
.. automethod:: pyqtgraph.FeedbackButton.__init__
......@@ -30,4 +30,11 @@ Contents:
joystickbutton
multiplotwidget
verticallabel
remotegraphicsview
matplotlibwidget
feedbackbutton
combobox
layoutwidget
pathbutton
valuelabel
busycursor
LayoutWidget
============
.. autoclass:: pyqtgraph.LayoutWidget
:members:
.. automethod:: pyqtgraph.LayoutWidget.__init__
MatplotlibWidget
================
.. autoclass:: pyqtgraph.widgets.MatplotlibWidget.MatplotlibWidget
:members:
.. automethod:: pyqtgraph.widgets.MatplotlibWidget.MatplotlibWidget.__init__
PathButton
==========
.. autoclass:: pyqtgraph.PathButton
:members:
.. automethod:: pyqtgraph.PathButton.__init__
RemoteGraphicsView
==================
.. autoclass:: pyqtgraph.widgets.RemoteGraphicsView.RemoteGraphicsView
:members:
.. automethod:: pyqtgraph.widgets.RemoteGraphicsView.RemoteGraphicsView.__init__
ValueLabel
==========
.. autoclass:: pyqtgraph.ValueLabel
:members:
.. automethod:: pyqtgraph.ValueLabel.__init__
......@@ -47,7 +47,7 @@ def setTracebackClearing(clear=True):
global clear_tracebacks
clear_tracebacks = clear
class ExceptionHandler:
class ExceptionHandler(object):
def __call__(self, *args):
## call original exception handler first (prints exception)
global original_excepthook, callbacks, clear_tracebacks
......
......@@ -7,7 +7,7 @@ from pyqtgraph.Point import Point
#from PySide import QtCore, QtGui
from .eq import *
class Terminal:
class Terminal(object):
def __init__(self, node, name, io, optional=False, multi=False, pos=None, renamable=False, removable=False, multiable=False, bypass=None):
"""
Construct a new terminal.
......
import pyqtgraph as pg
class FillBetweenItem(pg.QtGui.QGraphicsPathItem):
"""
GraphicsItem filling the space between two PlotDataItems.
"""
def __init__(self, p1, p2, brush=None):
pg.QtGui.QGraphicsPathItem.__init__(self)
self.p1 = p1
self.p2 = p2
p1.sigPlotChanged.connect(self.updatePath)
p2.sigPlotChanged.connect(self.updatePath)
if brush is not None:
self.setBrush(pg.mkBrush(brush))
self.setZValue(min(p1.zValue(), p2.zValue())-1)
self.updatePath()
def updatePath(self):
p1 = self.p1.curve.path
p2 = self.p2.curve.path
path = pg.QtGui.QPainterPath()
path.addPolygon(p1.toSubpathPolygons()[0] + p2.toReversed().toSubpathPolygons()[0])
self.setPath(path)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment