taurus taurus

Previous topic

TaurusGraphicsItem

Next topic

TaurusGraphicsStateItem

This Page

TaurusGraphicsScene

Inheritance diagram of TaurusGraphicsScene

class TaurusGraphicsScene(parent=None, strt=True)

Bases: PyQt4.QtGui.QGraphicsScene

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:

TaurusGraphicItem.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.
addItem(item)
addWidget(item, flags=None)
clearSelection()
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))

getClass(clName, clParam, objName, standAlone=False)
getClassName(obj)
getItemByName(item_name)

Returns a list with all items matching a given name

getQueue()
getSelectionMark(picture=None, w=10, h=10)
getShellCommand(obj, wait=False)
getTaurusDevicePanel(obj, standAlone=False)
killProcess(regexp)
launchProcess(process)
mousePressEvent(mouseEvent)
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.

start()
updateScene()
updateSceneItem(item)
updateSceneItems(items)
updateSceneViews()