pyqtgraph/ObjectWorkaround.py
Luke Campagnola 2ca08c69ce merged many changes in from acq4:
- added vertical lines / regions for plots
 - added gradient editor widget
 - many bugfixes
 - cleaned up imageview a bit
2010-07-24 14:29:09 -04:00

23 lines
789 B
Python

# -*- coding: utf-8 -*-
from PyQt4 import QtGui, QtCore
class QObjectWorkaround:
def __init__(self):
self._qObj_ = QtCore.QObject()
def connect(self, *args):
if args[0] is self:
return QtCore.QObject.connect(self._qObj_, *args[1:])
else:
return QtCore.QObject.connect(self._qObj_, *args)
def disconnect(self, *args):
return QtCore.QObject.disconnect(self._qObj_, *args)
def emit(self, *args):
return QtCore.QObject.emit(self._qObj_, *args)
def blockSignals(self, b):
return self._qObj_.blockSignals(b)
class QGraphicsObject(QtGui.QGraphicsItem, QObjectWorkaround):
def __init__(self, *args):
QtGui.QGraphicsItem.__init__(self, *args)
QObjectWorkaround.__init__(self)