Version: 9.15.0
gui.CItems.TextItem Class Reference
Inheritance diagram for gui.CItems.TextItem:
Collaboration diagram for gui.CItems.TextItem:

Public Member Functions

def __init__ (self, obj, canvas)
 
def getObj (self)
 
def moveBy (self, dx, dy)
 
def myMove (self, dx, dy)
 
def selected (self)
 

Public Attributes

 obj
 
 item
 

Detailed Description

A text in a composite object

Definition at line 30 of file CItems.py.

Constructor & Destructor Documentation

◆ __init__()

def gui.CItems.TextItem.__init__ (   self,
  obj,
  canvas 
)

Definition at line 32 of file CItems.py.

32  def __init__(self,obj,canvas):
33  QCanvasText.__init__(self,canvas)
34  self.obj=obj
35  self.item=None

Member Function Documentation

◆ getObj()

def gui.CItems.TextItem.getObj (   self)
The composite object which contains the text

Definition at line 36 of file CItems.py.

36  def getObj(self):
37  """The composite object which contains the text"""
38  return self.obj

References Solution.obj, gui.CItems.TextItem.obj, gui.CItems.PointItem.obj, and gui.CItems.LineItem.obj.

◆ moveBy()

def gui.CItems.TextItem.moveBy (   self,
  dx,
  dy 
)
Request the text move by x,y

Definition at line 39 of file CItems.py.

39  def moveBy(self,dx,dy):
40  """Request the text move by x,y"""
41  if self.obj:
42  #the text is a part of a composite object
43  self.obj.moveBy(dx,dy)
44  else:
45  #the text is independant
46  self.myMove(dx,dy)

References gui.CItems.TextItem.myMove(), gui.CItems.PointItem.myMove(), gui.CItems.ControlItem.myMove(), gui.CItems.InControlItem.myMove(), gui.CItems.OutControlItem.myMove(), gui.CItems.PortItem.myMove(), gui.CItems.InPortItem.myMove(), gui.CItems.OutPortItem.myMove(), gui.GraphViewer.PortItem.myMove(), gui.GraphViewer.InPortItem.myMove(), gui.GraphViewer.OutPortItem.myMove(), Solution.obj, gui.CItems.TextItem.obj, gui.CItems.PointItem.obj, and gui.CItems.LineItem.obj.

◆ myMove()

def gui.CItems.TextItem.myMove (   self,
  dx,
  dy 
)
The real move

Definition at line 47 of file CItems.py.

47  def myMove(self,dx,dy):
48  """The real move"""
49  QCanvasText.moveBy(self,dx,dy)

Referenced by gui.CItems.TextItem.moveBy(), and gui.CItems.PointItem.moveBy().

◆ selected()

def gui.CItems.TextItem.selected (   self)
The canvas item has been selected

Definition at line 50 of file CItems.py.

50  def selected(self):
51  """The canvas item has been selected"""
52  if self.obj:
53  self.obj.selected()
54 

References Solution.obj, gui.CItems.TextItem.obj, gui.CItems.PointItem.obj, and gui.CItems.LineItem.obj.

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

Member Data Documentation

◆ item

◆ obj


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