class_docstr: **Bases:** :class:`object`
  
  Abstract class providing useful methods to GraphicsObject and GraphicsWidget.
  (This is required because we cannot have multiple inheritance with QObject subclasses.)
  
  A note about Qt's GraphicsView framework:
  
  The GraphicsView system places a lot of emphasis on the notion that the graphics within the scene should be device independent--you should be able to take the same graphics and display them on screens of different resolutions, printers, export to SVG, etc. This is nice in principle, but causes me a lot of headache in practice. It means that I have to circumvent all the device-independent expectations any time I want to operate in pixel coordinates rather than arbitrary scene coordinates. A lot of the code in GraphicsItem is devoted to this task--keeping track of view widgets and device transforms, computing the size and shape of a pixel in local item coordinates, etc. Note that in item coordinates, a pixel does not have to be square or even rectangular, so just asking how to increase a bounding rect by 2px can be a rather complex task.
code: def _updateView(self):
      ## called to see whether this item has a new view to connect to
      ## NOTE: This is called from GraphicsObject.itemChange or GraphicsWidget.itemChange.
  
      if not hasattr(self, "_connectedView"):
          # Happens when Python is shutting down.
          return
  
      ## It is possible this item has moved to a different ViewBox or widget;
      ## clear out previously determined references to these.
      self.forgetViewBox()
      self.forgetViewWidget()
  
      ## check for this item's current viewbox or view widget
      view = self.getViewBox()
      # if view is None:
      ##print "  no view"
      # return
  
      oldView = None
      if self._connectedView is not None:
          oldView = self._connectedView()
  
      if view is oldView:
          # print "  already have view", view
          return
  
      ## disconnect from previous view
      if oldView is not None:
          for signal, slot in [
              ("sigRangeChanged", self.viewRangeChanged),
              ("sigDeviceRangeChanged", self.viewRangeChanged),
              ("sigTransformChanged", self.viewTransformChanged),
              ("sigDeviceTransformChanged", self.viewTransformChanged),
          ]:
              try:
                  getattr(oldView, signal).disconnect(slot)
              except (TypeError, AttributeError, RuntimeError):
                  # TypeError and RuntimeError are from pyqt and pyside, respectively
                  pass
  
          self._connectedView = None
  
      ## connect to new view
      if view is not None:
          # print "connect:", self, view
          if hasattr(view, "sigDeviceRangeChanged"):
              # connect signals from GraphicsView
              view.sigDeviceRangeChanged.connect(self.viewRangeChanged)
              view.sigDeviceTransformChanged.connect(
                  self.viewTransformChanged
              )
          else:
              # connect signals from ViewBox
              view.sigRangeChanged.connect(self.viewRangeChanged)
              view.sigTransformChanged.connect(
                  self.viewTransformChanged
              )
          self._connectedView = weakref.ref(view)
          self.viewRangeChanged()
          self.viewTransformChanged()
  
      ## inform children that their view might have changed
      self._replaceView(oldView)
  
      self.viewChanged(view, oldView)
  
imports: import operator
  import weakref
  from collections import OrderedDict
  from functools import reduce
  from math import hypot
  from typing import Optional
  from xml.etree.ElementTree import Element
  from ..None import functions
  from ..GraphicsScene import GraphicsScene
  from ..Point import Point
  from ..Qt import QtCore, QtWidgets, isQObjectAlive
label_desc: Use image node_id 32 for calling the GraphicsItem obj's underlying member method code with example usage: obj._updateView() without return types