Version: 9.15.0
gui.GraphViewer.Cell Class Reference
Inheritance diagram for gui.GraphViewer.Cell:
Collaboration diagram for gui.GraphViewer.Cell:

Public Member Functions

def __init__ (self, canvas)
 
def moveBy (self, dx, dy)
 
def show (self)
 
def getObj (self)
 
def popup (self, canvasView)
 
def tooltip (self, view, pos)
 
def browse (self)
 
def selected (self)
 

Public Attributes

 inports
 
 outports
 

Detailed Description

Definition at line 356 of file GraphViewer.py.

Constructor & Destructor Documentation

◆ __init__()

def gui.GraphViewer.Cell.__init__ (   self,
  canvas 
)

Definition at line 357 of file GraphViewer.py.

357  def __init__(self,canvas):
358  QCanvasRectangle.__init__(self,canvas)
359  self.setSize(50,50)
360 
361  self.inports=[]
362  self.outports=[]
363 
364  p=InPortItem(self,canvas)
365  p.myMove(0,25)
366  self.inports.append(p)
367  p=OutPortItem(self,canvas)
368  p.myMove(50,25)
369  self.outports.append(p)
370 

Member Function Documentation

◆ browse()

def gui.GraphViewer.Cell.browse (   self)

Definition at line 401 of file GraphViewer.py.

401  def browse(self):
402  print("browse")
403 

Referenced by gui.CItems.Cell.popup(), and gui.GraphViewer.Cell.popup().

◆ getObj()

def gui.GraphViewer.Cell.getObj (   self)

Definition at line 385 of file GraphViewer.py.

385  def getObj(self):
386  return self
387 

◆ moveBy()

def gui.GraphViewer.Cell.moveBy (   self,
  dx,
  dy 
)

Definition at line 371 of file GraphViewer.py.

371  def moveBy(self,dx,dy):
372  QCanvasRectangle.moveBy(self,dx,dy)
373  for p in self.inports:
374  p.myMove(dx,dy)
375  for p in self.outports:
376  p.myMove(dx,dy)
377 

References gui.CItems.Cell.inports, gui.GraphViewer.Cell.inports, gui.CItems.Cell.outports, and gui.GraphViewer.Cell.outports.

◆ popup()

def gui.GraphViewer.Cell.popup (   self,
  canvasView 
)

Definition at line 388 of file GraphViewer.py.

388  def popup(self,canvasView):
389  menu=QPopupMenu()
390  caption = QLabel( "<font color=darkblue><u><b>Node Menu</b></u></font>",menu )
391  caption.setAlignment( Qt.AlignCenter )
392  menu.insertItem( caption )
393  menu.insertItem("Browse", self.browse)
394  return menu
395 

References gui.CItems.Cell.browse(), and gui.GraphViewer.Cell.browse().

Referenced by gui.GraphViewer.GraphViewer.contentsMousePressEvent().

◆ selected()

def gui.GraphViewer.Cell.selected (   self)

Definition at line 404 of file GraphViewer.py.

404  def selected(self):
405  print("selected")
406 

Referenced by gui.browser_catalog.Browser.handleBut1(), and gui.GraphViewer.GraphViewer.selectItem().

◆ show()

def gui.GraphViewer.Cell.show (   self)

Definition at line 378 of file GraphViewer.py.

378  def show(self):
379  QCanvasRectangle.show(self)
380  for p in self.inports:
381  p.show()
382  for p in self.outports:
383  p.show()
384 

References gui.CItems.Cell.inports, gui.GraphViewer.Cell.inports, gui.CItems.Cell.outports, and gui.GraphViewer.Cell.outports.

◆ tooltip()

def gui.GraphViewer.Cell.tooltip (   self,
  view,
  pos 
)

Definition at line 396 of file GraphViewer.py.

396  def tooltip(self,view,pos):
397  r = QRect(self.x(), self.y(), self.width(), self.height())
398  s = QString( "node: %d,%d" % (r.center().x(), r.center().y()) )
399  view.tip( r, s )
400 

References YACS::HMI::presentationtype_parser.height(), YACS::HMI::presentationtype_parser.width(), YACS::HMI::linkPoint.x, YACS::HMI::presentationtype_parser.x(), YACS::HMI::linkPoint.y, and YACS::HMI::presentationtype_parser.y().

Member Data Documentation

◆ inports

gui.GraphViewer.Cell.inports

◆ outports

gui.GraphViewer.Cell.outports

The documentation for this class was generated from the following file: