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

Public Member Functions

def __init__
 
def moveBy
 
def show
 
def getObj
 
def popup
 
def tooltip
 
def browse
 
def selected
 

Public Attributes

 inports
 
 outports
 

Detailed Description

Definition at line 356 of file GraphViewer.py.

Constructor & Destructor Documentation

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

Definition at line 357 of file GraphViewer.py.

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

Member Function Documentation

def gui.GraphViewer.Cell.browse (   self)

Definition at line 401 of file GraphViewer.py.

Referenced by gui.GraphViewer.Cell.popup().

402  def browse(self):
403  print "browse"
def gui.GraphViewer.Cell.getObj (   self)

Definition at line 385 of file GraphViewer.py.

386  def getObj(self):
387  return self
def gui.GraphViewer.Cell.moveBy (   self,
  dx,
  dy 
)

Definition at line 371 of file GraphViewer.py.

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

372  def moveBy(self,dx,dy):
373  QCanvasRectangle.moveBy(self,dx,dy)
374  for p in self.inports:
375  p.myMove(dx,dy)
376  for p in self.outports:
377  p.myMove(dx,dy)
def gui.GraphViewer.Cell.popup (   self,
  canvasView 
)

Definition at line 388 of file GraphViewer.py.

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

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

Definition at line 404 of file GraphViewer.py.

405  def selected(self):
406  print "selected"
def gui.GraphViewer.Cell.show (   self)

Definition at line 378 of file GraphViewer.py.

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

379  def show(self):
380  QCanvasRectangle.show(self)
381  for p in self.inports:
382  p.show()
383  for p in self.outports:
384  p.show()
def gui.GraphViewer.Cell.tooltip (   self,
  view,
  pos 
)

Definition at line 396 of file GraphViewer.py.

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

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

Member Data Documentation

gui.GraphViewer.Cell.inports

Definition at line 361 of file GraphViewer.py.

Referenced by gui.GraphViewer.Cell.moveBy(), and gui.GraphViewer.Cell.show().

gui.GraphViewer.Cell.outports

Definition at line 362 of file GraphViewer.py.

Referenced by gui.GraphViewer.Cell.moveBy(), and gui.GraphViewer.Cell.show().


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