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

Public Member Functions

def __init__
 
def getObj
 
def moveBy
 
def myMove
 
def selected
 

Public Attributes

 obj
 
 item
 

Detailed Description

A text in a composite object

Definition at line 30 of file CItems.py.

Constructor & Destructor Documentation

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

Definition at line 32 of file CItems.py.

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

Member Function Documentation

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

Definition at line 36 of file CItems.py.

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

36 
37  def getObj(self):
38  """The composite object which contains the text"""
return self.obj
def gui.CItems.TextItem.moveBy (   self,
  dx,
  dy 
)
Request the text move by x,y

Definition at line 39 of file CItems.py.

References gui.CItems.TextItem.myMove(), Solution.obj, and gui.CItems.TextItem.obj.

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

Definition at line 47 of file CItems.py.

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

47 
48  def myMove(self,dx,dy):
49  """The real move"""
QCanvasText.moveBy(self,dx,dy)
def gui.CItems.TextItem.selected (   self)
The canvas item has been selected

Definition at line 50 of file CItems.py.

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

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

Member Data Documentation

gui.CItems.TextItem.item

Definition at line 35 of file CItems.py.

gui.CItems.TextItem.obj

Definition at line 34 of file CItems.py.

Referenced by gui.CItems.PointItem.clear(), gui.CItems.LineItem.clear(), gui.CItems.TextItem.getObj(), gui.CItems.PointItem.getObj(), gui.CItems.LineItem.getObj(), gui.CItems.TextItem.moveBy(), and gui.CItems.TextItem.selected().


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