class_docstr: Widget displaying an editable color gradient. The user may add, move, recolor,
  or remove colors from the gradient. Additionally, a context menu allows the 
  user to select from pre-defined gradients.
docstr: The *orientation* argument may be 'bottom', 'top', 'left', or 'right' 
  indicating whether the gradient is displayed horizontally (top, bottom)
  or vertically (left, right) and on what side of the gradient the editable 
  ticks will appear.
  
  All other arguments are passed to 
  :func:`GradientEditorItem.__init__ <pyqtgraph.GradientEditorItem.__init__>`.
  
  Note: For convenience, this class wraps methods from 
  :class:`GradientEditorItem <pyqtgraph.GradientEditorItem>`.
docstr_tok: ["The","*","orientation","*","argument","may","be","'bottom","'",",","'top","'",",","'left","'",",","or","'right","'","indicating","whether","the","gradient","is","displayed","horizontally","(","top",",","bottom",")","or","vertically","(","left",",","right",")","and","on","what","side","of","the","gradient","the","editable","ticks","will","appear",".","All","other","arguments","are","passed","to",":","func",":","`","GradientEditorItem.__init__","<","pyqtgraph.GradientEditorItem.__init__",">","`",".","Note",":","For","convenience",",","this","class","wraps","methods","from",":","class",":","`","GradientEditorItem","<","pyqtgraph.GradientEditorItem",">","`","."]
code: def __init__(self, parent=None, orientation="bottom", *args, **kargs):
      """
      The *orientation* argument may be 'bottom', 'top', 'left', or 'right'
      indicating whether the gradient is displayed horizontally (top, bottom)
      or vertically (left, right) and on what side of the gradient the editable
      ticks will appear.
  
      All other arguments are passed to
      :func:`GradientEditorItem.__init__ <pyqtgraph.GradientEditorItem.__init__>`.
  
      Note: For convenience, this class wraps methods from
      :class:`GradientEditorItem <pyqtgraph.GradientEditorItem>`.
      """
      GraphicsView.__init__(
          self, parent, useOpenGL=False, background=None
      )
      self.maxDim = 31
      kargs["tickPen"] = "k"
      self.item = GradientEditorItem(*args, **kargs)
      self.item.sigGradientChanged.connect(self.sigGradientChanged)
      self.item.sigGradientChangeFinished.connect(
          self.sigGradientChangeFinished
      )
      self.setCentralItem(self.item)
      self.setOrientation(orientation)
      self.setCacheMode(self.CacheModeFlag.CacheNone)
      self.setRenderHints(
          QtGui.QPainter.RenderHint.Antialiasing
          | QtGui.QPainter.RenderHint.TextAntialiasing
      )
      frame_style = (
          QtWidgets.QFrame.Shape.NoFrame | QtWidgets.QFrame.Shadow.Plain
      )
  
      self.setFrameStyle(frame_style)
  
file_path: pyqtgraph/pyqtgraph/widgets/GradientWidget.py
imports: from ..graphicsItems.GradientEditorItem import GradientEditorItem
  from ..Qt import QtCore, QtGui, QtWidgets
  from .GraphicsView import GraphicsView
label_desc: Use image node_id 1 to create a new GradientWidget object from inherited base classes: GraphicsView with example: obj = GradientWidget(parent, orientation)