taurus taurus

Previous topic

TaurusJDrawGraphicsFactory

Next topic

TaurusBaseGraphicsFactory

This Page

TaurusJDrawSynopticsView

Inheritance diagram of TaurusJDrawSynopticsView

class TaurusJDrawSynopticsView(parent=None, designMode=False, updateMode=None, alias=None, resizable=True)

Bases: PyQt4.QtGui.QGraphicsView, taurus.qt.qtgui.base.taurusbase.TaurusBaseWidget

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.
defineStyle()
emitColors()

emit signal which is used to refresh the tree and colors of icons depend of the current status in jdrawSynoptic

fitting(ADJUST_FRAME=False)

Parent size is the size of the bigger panel (desn’t keep ratio) Rect size never changes (fixed by the graphics objects) Size and SizeHint move one around the other

the method works well until an object is clicked, then the whole reference changes and doesn’t work again.

getFramed()
getGraphicsFactory(delayed=False)
getModel()
getModelMimeData()

Used for drag events

classmethod getQtDesignerPluginInfo()
get_item_colors(emit=False)
get_item_list()
get_sizes()
graphicItemSelected(item_name)
graphicSceneClicked(point)
isReadOnly()
model
mousePressEvent(event)

Records last event position to use it for DragEvents

openJDraw()
refreshModel()
repaint()
resizable()
resizeEvent(event)

It has been needed to reimplent size policies

selectGraphicItem(item_name)
setAlias(alias)

Assigning a dictionary like {‘Tag’:’Value’} with tags to be replaced in object names while parsing.

setModel(model, alias=None, delayed=False)
setModels()

This method triggers item.setModel(item._name) in all internal items.

setResizable(resizable)
update()
updateStyle()