Esempio n. 1
0
 def __init__(self, *args, **kargs):
     """
     Extends QGraphicsWidget with several helpful methods and workarounds for PyQt bugs. 
     Most of the extra functionality is inherited from GraphicsObjectSuperclass.
     """
     QtGui.QGraphicsWidget.__init__(self, *args, **kargs)
     GraphicsItemMethods.__init__(self)
     GraphicsScene.registerObject(self)  ## workaround for pyqt bug in graphicsscene.items()
Esempio n. 2
0
 def __init__(self, *args, **kargs):
     """
     **Bases:** :class:`GraphicsItem <pyqtgraph.GraphicsItem>`, :class:`QtGui.QGraphicsWidget`
     
     Extends QGraphicsWidget with several helpful methods and workarounds for PyQt bugs. 
     Most of the extra functionality is inherited from :class:`GraphicsItem <pyqtgraph.GraphicsItem>`.
     """
     QtGui.QGraphicsWidget.__init__(self, *args, **kargs)
     GraphicsItem.__init__(self)
     GraphicsScene.registerObject(self)  ## workaround for pyqt bug in graphicsscene.items()
Esempio n. 3
0
 def __init__(self, *args, **kargs):
     """
     **Bases:** :class:`GraphicsItem <pyqtgraph.GraphicsItem>`, :class:`QtGui.QGraphicsWidget`
     
     Extends QGraphicsWidget with several helpful methods and workarounds for PyQt bugs. 
     Most of the extra functionality is inherited from :class:`GraphicsItem <pyqtgraph.GraphicsItem>`.
     """
     QtGui.QGraphicsWidget.__init__(self, *args, **kargs)
     GraphicsItem.__init__(self)
     GraphicsScene.registerObject(
         self)  ## workaround for pyqt bug in graphicsscene.items()
Esempio n. 4
0
 def __init__(self, register=True):
     if not hasattr(self, '_qtBaseClass'):
         for b in self.__class__.__bases__:
             if issubclass(b, QtGui.QGraphicsItem):
                 self.__class__._qtBaseClass = b
                 break
     if not hasattr(self, '_qtBaseClass'):
         raise Exception('Could not determine Qt base class for GraphicsItem: %s' % str(self))
     
     self._pixelVectorCache = [None, None]
     self._viewWidget = None
     self._viewBox = None
     self._connectedView = None
     self._exportOpts = False   ## If False, not currently exporting. Otherwise, contains dict of export options.
     if register:
         GraphicsScene.registerObject(self)  ## workaround for pyqt bug in graphicsscene.items()
Esempio n. 5
0
    def __init__(self, register=True):
        if not hasattr(self, '_qtBaseClass'):
            for b in self.__class__.__bases__:
                if issubclass(b, QtGui.QGraphicsItem):
                    self.__class__._qtBaseClass = b
                    break
        if not hasattr(self, '_qtBaseClass'):
            raise Exception(
                'Could not determine Qt base class for GraphicsItem: %s' %
                str(self))

        self._pixelVectorCache = [None, None]
        self._viewWidget = None
        self._viewBox = None
        self._connectedView = None
        self._exportOpts = False  ## If False, not currently exporting. Otherwise, contains dict of export options.
        if register:
            GraphicsScene.registerObject(
                self)  ## workaround for pyqt bug in graphicsscene.items()
Esempio n. 6
0
    def __init__(self, controller):
        super().__init__()
        self._controller = controller
        self._frame_data = ''

        GraphicsScene.registerObject(self)

        # This will be a list of function calls that expect to be called with the painter object only
        self._painter_function_calls = []

        # The current view rectangle should increase as things are drawn. This is also used as the bounding rectangle,
        # since pyqtgraph setRange appears to do strange things if the bounding rect varies independently of the
        # view rect.
        # We *must* have a default bounding rectangle before we have any data, otherwise Qt will fall over.
        self._current_view_rect = QtCore.QRectF(0, 0, 1, 1)

        # Specify the point extent as a QPoint - think of this as a delta that we add and subtract
        self._point_extent = QtCore.QPointF(OPTIONS.point_extent,
                                            OPTIONS.point_extent)
Esempio n. 7
0
 def __init__(self):
     QtGui.QGraphicsObject.__init__(self)
     GraphicsScene.registerObject(self)
Esempio n. 8
0
 def __init__(self):
     QtGui.QGraphicsObject.__init__(self)
     GraphicsScene.registerObject(self)
Esempio n. 9
0
 def __init__(self):
     self._viewWidget = None
     self._viewBox = None
     GraphicsScene.registerObject(self)  ## workaround for pyqt bug in graphicsscene.items()
Esempio n. 10
0
 def __init__(self):
     QtWidgets.QGraphicsObject.__init__(self)
     GraphicsScene.registerObject(self)
Esempio n. 11
0
 def __init__(self):
     self._viewWidget = None
     self._viewBox = None
     GraphicsScene.registerObject(
         self)  ## workaround for pyqt bug in graphicsscene.items()