class_docstr: Draws a draggable target symbol (circle plus crosshair).
  
  The size of TargetItem will remain fixed on screen even as the view is zoomed.
  Includes an optional text label.
class_docstr_tok: ["Draws","a","draggable","target","symbol","(","circle","plus","crosshair",")",".","The","size","of","TargetItem","will","remain","fixed","on","screen","even","as","the","view","is","zoomed",".","Includes","an","optional","text","label","."]
docstr: Parameters
  ----------
  pos : list, tuple, QPointF, QPoint, Optional
      Initial position of the symbol.  Default is (0, 0)
  size : int
      Size of the symbol in pixels.  Default is 10.
  pen : QPen, tuple, list or str
      Pen to use when drawing line. Can be any arguments that are valid
      for :func:`~pyqtgraph.mkPen`. Default pen is transparent yellow.
  brush : QBrush, tuple, list, or str
      Defines the brush that fill the symbol. Can be any arguments that
      is valid for :func:`~pyqtgraph.mkBrush`. Default is transparent
      blue.
  movable : bool
      If True, the symbol can be dragged to a new position by the user.
  hoverPen : QPen, tuple, list, or str
      Pen to use when drawing symbol when hovering over it. Can be any
      arguments that are valid for :func:`~pyqtgraph.mkPen`. Default pen
      is red.
  hoverBrush : QBrush, tuple, list or str
      Brush to use to fill the symbol when hovering over it. Can be any
      arguments that is valid for :func:`~pyqtgraph.mkBrush`. Default is
      transparent blue.
  symbol : QPainterPath or str
      QPainterPath to use for drawing the target, should be centered at
      ``(0, 0)`` with ``max(width, height) == 1.0``.  Alternatively a string
      which can be any symbol accepted by
      :func:`~pyqtgraph.ScatterPlotItem.setSymbol`
  label : bool, str or callable, optional
      Text to be displayed in a label attached to the symbol, or None to
      show no label (default is None). May optionally include formatting
      strings to display the symbol value, or a callable that accepts x
      and y as inputs.  If True, the label is ``x = {: >.3n}\ny = {: >.3n}``
      False or None will result in no text being displayed
  labelOpts : dict
      A dict of keyword arguments to use when constructing the text
      label. See :class:`TargetLabel` and :class:`~pyqtgraph.TextItem`
docstr_tok: ["Parameters","--","--","--","--","--","pos",":","list",",","tuple",",","QPointF",",","QPoint",",","Optional","Initial","position","of","the","symbol",".","Default","is","(","0",",","0",")","size",":","int","Size","of","the","symbol","in","pixels",".","Default","is","10.","pen",":","QPen",",","tuple",",","list","or","str","Pen","to","use","when","drawing","line",".","Can","be","any","arguments","that","are","valid","for",":","func",":","`","~pyqtgraph.mkPen","`",".","Default","pen","is","transparent","yellow",".","brush",":","QBrush",",","tuple",",","list",",","or","str","Defines","the","brush","that","fill","the","symbol",".","Can","be","any","arguments","that","is","valid","for",":","func",":","`","~pyqtgraph.mkBrush","`",".","Default","is","transparent","blue",".","movable",":","bool","If","True",",","the","symbol","can","be","dragged","to","a","new","position","by","the","user",".","hoverPen",":","QPen",",","tuple",",","list",",","or","str","Pen","to","use","when","drawing","symbol","when","hovering","over","it",".","Can","be","any","arguments","that","are","valid","for",":","func",":","`","~pyqtgraph.mkPen","`",".","Default","pen","is","red",".","hoverBrush",":","QBrush",",","tuple",",","list","or","str","Brush","to","use","to","fill","the","symbol","when","hovering","over","it",".","Can","be","any","arguments","that","is","valid","for",":","func",":","`","~pyqtgraph.mkBrush","`",".","Default","is","transparent","blue",".","symbol",":","QPainterPath","or","str","QPainterPath","to","use","for","drawing","the","target",",","should","be","centered","at","``","(","0",",","0",")","``","with","``","max","(","width",",","height",")","==","1.0","``",".","Alternatively","a","string","which","can","be","any","symbol","accepted","by",":","func",":","`","~pyqtgraph.ScatterPlotItem.setSymbol","`","label",":","bool",",","str","or","callable",",","optional","Text","to","be","displayed","in","a","label","attached","to","the","symbol",",","or","None","to","show","no","label","(","default","is","None",")",".","May","optionally","include","formatting","strings","to","display","the","symbol","value",",","or","a","callable","that","accepts","x","and","y","as","inputs",".","If","True",",","the","label","is","``","x","=","{",":",">",".3n","}","\\ny","=","{",":",">",".3n","}","``","False","or","None","will","result","in","no","text","being","displayed","labelOpts",":","dict","A","dict","of","keyword","arguments","to","use","when","constructing","the","text","label",".","See",":","class",":","`","TargetLabel","`","and",":","class",":","`","~pyqtgraph.TextItem","`"]
code: def __init__(
      self,
      pos=None,
      size=10,
      symbol="crosshair",
      pen=None,
      hoverPen=None,
      brush=None,
      hoverBrush=None,
      movable=True,
      label=None,
      labelOpts=None,
  ):
      r"""
      Parameters
      ----------
      pos : list, tuple, QPointF, QPoint, Optional
          Initial position of the symbol.  Default is (0, 0)
      size : int
          Size of the symbol in pixels.  Default is 10.
      pen : QPen, tuple, list or str
          Pen to use when drawing line. Can be any arguments that are valid
          for :func:`~pyqtgraph.mkPen`. Default pen is transparent yellow.
      brush : QBrush, tuple, list, or str
          Defines the brush that fill the symbol. Can be any arguments that
          is valid for :func:`~pyqtgraph.mkBrush`. Default is transparent
          blue.
      movable : bool
          If True, the symbol can be dragged to a new position by the user.
      hoverPen : QPen, tuple, list, or str
          Pen to use when drawing symbol when hovering over it. Can be any
          arguments that are valid for :func:`~pyqtgraph.mkPen`. Default pen
          is red.
      hoverBrush : QBrush, tuple, list or str
          Brush to use to fill the symbol when hovering over it. Can be any
          arguments that is valid for :func:`~pyqtgraph.mkBrush`. Default is
          transparent blue.
      symbol : QPainterPath or str
          QPainterPath to use for drawing the target, should be centered at
          ``(0, 0)`` with ``max(width, height) == 1.0``.  Alternatively a string
          which can be any symbol accepted by
          :func:`~pyqtgraph.ScatterPlotItem.setSymbol`
      label : bool, str or callable, optional
          Text to be displayed in a label attached to the symbol, or None to
          show no label (default is None). May optionally include formatting
          strings to display the symbol value, or a callable that accepts x
          and y as inputs.  If True, the label is ``x = {: >.3n}\ny = {: >.3n}``
          False or None will result in no text being displayed
      labelOpts : dict
          A dict of keyword arguments to use when constructing the text
          label. See :class:`TargetLabel` and :class:`~pyqtgraph.TextItem`
      """
      super().__init__()
      self.movable = movable
      self.moving = False
      self._label = None
      self.mouseHovering = False
  
      if pen is None:
          pen = (255, 255, 0)
      self.setPen(pen)
  
      if hoverPen is None:
          hoverPen = (255, 0, 255)
      self.setHoverPen(hoverPen)
  
      if brush is None:
          brush = (0, 0, 255, 50)
      self.setBrush(brush)
  
      if hoverBrush is None:
          hoverBrush = (0, 255, 255, 100)
      self.setHoverBrush(hoverBrush)
  
      self.currentPen = self.pen
      self.currentBrush = self.brush
  
      self._shape = None
  
      self._pos = Point(0, 0)
      if pos is None:
          pos = Point(0, 0)
      self.setPos(pos)
  
      if isinstance(symbol, str):
          try:
              self._path = Symbols[symbol]
          except KeyError:
              raise KeyError("symbol name found in available Symbols")
      elif isinstance(symbol, QtGui.QPainterPath):
          self._path = symbol
      else:
          raise TypeError("Unknown type provided as symbol")
  
      self.scale = size
      self.setPath(self._path)
      self.setLabel(label, labelOpts)
  
imports: import string
  from math import atan2
  from ..None import functions
  from ..Point import Point
  from ..Qt import QtCore, QtGui
  from .GraphicsObject import GraphicsObject
  from .ScatterPlotItem import Symbols
  from .TextItem import TextItem
  from .UIGraphicsItem import UIGraphicsItem
  from .ViewBox import ViewBox
label_desc: Use image node_id 1 to create a new TargetItem object from inherited base classes: UIGraphicsItem with example: obj = TargetItem(pos, size, symbol, pen, hoverPen, brush, hoverBrush, movable, label, labelOpts)