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()
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()
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()
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()
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()
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)
def __init__(self): QtGui.QGraphicsObject.__init__(self) GraphicsScene.registerObject(self)
def __init__(self): QtGui.QGraphicsObject.__init__(self) GraphicsScene.registerObject(self)
def __init__(self): self._viewWidget = None self._viewBox = None GraphicsScene.registerObject(self) ## workaround for pyqt bug in graphicsscene.items()
def __init__(self): QtWidgets.QGraphicsObject.__init__(self) GraphicsScene.registerObject(self)
def __init__(self): self._viewWidget = None self._viewBox = None GraphicsScene.registerObject( self) ## workaround for pyqt bug in graphicsscene.items()