# `TaurusGraphicsScene`

digraph inheritance7fcceb5ff9 { bgcolor=transparent; rankdir=UD; ratio=compress; size="8.0, 12.0"; "QGraphicsScene" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="QGraphicsScene(parent: QObject|None = None)"]; "QObject" -> "QGraphicsScene" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QObject" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="QObject(parent: QObject|None = None)"]; "wrapper" -> "QObject" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TaurusGraphicsScene" [URL="#taurus.qt.qtgui.graphic.TaurusGraphicsScene",color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,target="_top",tooltip="This class encapsulates TaurusJDrawSynopticsView and TaurusGraphicsScene"]; "QGraphicsScene" -> "TaurusGraphicsScene" [arrowsize=0.5,style="setlinewidth(0.5)"]; "simplewrapper" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded]; "wrapper" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded]; "simplewrapper" -> "wrapper" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

class TaurusGraphicsScene(parent=None, strt=True)

  This class encapsulates TaurusJDrawSynopticsView and TaurusGraphicsScene signals/slots

  External events:

      Slot selectGraphicItem(const QString &) displays a selection
      mark around the TaurusGraphicsItem that matches the argument passed.

  Mouse Left-button events:

      Signal graphicItemSelected(QString) is triggered, passing the
      selected TaurusGraphicsItem.name() as argument.

  Mouse Right-button events:

      TaurusGraphicsItem.setContextMenu([(ActionName,ActionMethod(device_name))]
      allows to configure custom context menus for graphic items using a list
      of tuples. Empty tuples will insert separators in the menu.

  Import from `taurus.qt.qtgui.graphic` as:

      from taurus.qt.qtgui.graphic import TaurusGraphicsScene

  ANY_ATTRIBUTE_SELECTS_DEVICE = True
  TRACE_ALL = False
  addItem(self, item: QGraphicsItem | None)
  addWidget(self, widget: QWidget | None, flags: Qt.WindowFlags | Qt.WindowType = Qt.WindowFlags()) → QGraphicsProxyWidget | None
  clearSelection(self)
  closeAllPanels()

    This method replaces killProcess, using taurus.qt.qtgui.util.ExternalAppAction instead!

  drawSelectionMark(x, y, w, h, oversize=1)

    If h or w are None the mark is drawn at x,y If h or w has a value the mark is drawn in the center of the region ((x,y)(x+w,y+h))

  getAllChildren(item, klass=None)

    Returns all children elements, filtering by klass if wanted

  getClass(clName)
  getItemByName(item_name, strict=None)

    Returns a list with all items matching a given name.

    Parameters:

      strict (bool or None) – controls whether full_name (strict=True) or only device name (False) must match

    Returns:

      items

    Return type:

      list

  getItemByPosition(x, y)

    This method will try first with named objects; if failed then with itemAt

  getItemClicked(mouseEvent)
  getQueue()
  getSelectionMark(picture=None, w=10, h=10)
  getShellCommand(obj, wait=False)
  static getTaurusParentItem(item, top=True)

    Searches within a group hierarchy and returns a parent Taurus component or None if no parent TaurusBaseComponent is found.

  graphicItemSelected

    int = …, arguments: Sequence = …) -> PYQT_SIGNAL

    types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

    Type:

      pyqtSignal(*types, name

    Type:

      str = …, revision

  graphicSceneClicked

    int = …, arguments: Sequence = …) -> PYQT_SIGNAL

    types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

    Type:

      pyqtSignal(*types, name

    Type:

      str = …, revision

  mouseDoubleClickEvent(self, event: QGraphicsSceneMouseEvent | None)
  mousePressEvent(self, event: QGraphicsSceneMouseEvent | None)
  refreshTree2

    int = …, arguments: Sequence = …) -> PYQT_SIGNAL

    types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

    Type:

      pyqtSignal(*types, name

    Type:

      str = …, revision

  selectGraphicItem(item_name)

    A blue circle is drawn around the matching item name. If the item_name is empty, or it is a reserved keyword, or it has the “noSelect” extension, then the blue circle is removed from the synoptic.

  setSelectionMark(picture=None, w=10, h=10)

    This method allows to set a callable, graphic item or pixmap as selection mark (by default creates a blue circle). If picture is a callable, the object returned will be used as selection mark. If picture is a QGraphicsItem it will be used as selection mark. If picture is a QPixmap or a path to a pixmap a QGraphicsPixmapItem will be created. If no picture is provided, a blue ellipse will be drawn around the selected object. h/w will be used for height/width of the drawn object.

  setSelectionStyle(selectionStyle)
  showNewPanel(args=None, standAlone=False)
  start()
  stop()
  updateScene()
  updateSceneItem(item)
  updateSceneItems(items)
  updateSceneViews()