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

Public Member Functions

def __init__
 
def setInline
 
def setOutline
 
def moveBy
 
def myMove
 
def getObj
 
def handleDoubleClick
 
def clear
 
def selected
 

Public Attributes

 obj
 
 item
 
 inline
 
 outline
 

Detailed Description

Definition at line 55 of file CItems.py.

Constructor & Destructor Documentation

def gui.CItems.PointItem.__init__ (   self,
  obj,
  x,
  y,
  canvas 
)
Create a point contained in a composite line (obj)

Definition at line 56 of file CItems.py.

56 
57  def __init__(self,obj,x,y,canvas):
58  """Create a point contained in a composite line (obj)"""
59  QCanvasEllipse.__init__(self,6,6,canvas)
60  self.obj=obj
61  self.item=None
62  self.inline=None
63  self.outline=None
64  self.setPen(QPen(Qt.black))
65  self.setBrush(QBrush(Qt.red))
66  self.setX(x)
67  self.setY(y)
68  self.setVisible(True)

Member Function Documentation

def gui.CItems.PointItem.clear (   self)
To remove from canvas

Definition at line 100 of file CItems.py.

References gui.CItems.PointItem.inline, Solution.obj, gui.CItems.TextItem.obj, gui.CItems.PointItem.obj, and gui.CItems.PointItem.outline.

101  def clear(self):
102  """To remove from canvas"""
103  self.setCanvas(None)
104  self.obj=None
105  self.inline=None
106  self.outline=None
def gui.CItems.PointItem.getObj (   self)
The object which contains the point

Definition at line 90 of file CItems.py.

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

90 
91  def getObj(self):
92  """The object which contains the point"""
93  return self.obj
def gui.CItems.PointItem.handleDoubleClick (   self,
  pos 
)

Definition at line 94 of file CItems.py.

94 
95  def handleDoubleClick(self,pos):
96  self.obj.deletePoint(self,pos)
def gui.CItems.PointItem.moveBy (   self,
  dx,
  dy 
)
Request the point move by x,y

Definition at line 78 of file CItems.py.

References gui.CItems.TextItem.myMove(), and gui.CItems.PointItem.myMove().

78 
79  def moveBy(self,dx,dy):
80  """Request the point move by x,y"""
81  self.myMove(dx,dy)
def gui.CItems.PointItem.myMove (   self,
  dx,
  dy 
)
The real move

Definition at line 82 of file CItems.py.

References gui.CItems.PointItem.inline, gui.CItems.PointItem.outline, YACS::HMI::linkPoint.x, YACS::HMI::presentationtype_parser.x(), YACS::HMI::linkPoint.y, and YACS::HMI::presentationtype_parser.y().

Referenced by gui.CItems.PointItem.moveBy().

82 
83  def myMove(self,dx,dy):
84  """The real move"""
85  QCanvasEllipse.moveBy(self,dx,dy)
86  if self.outline:
87  self.outline.setFromPoint( int(self.x()), int(self.y()) )
88  if self.inline:
89  self.inline.setToPoint( int(self.x()), int(self.y()) )
def gui.CItems.PointItem.selected (   self)
The canvas item has been selected

Definition at line 107 of file CItems.py.

108  def selected(self):
109  """The canvas item has been selected"""
def gui.CItems.PointItem.setInline (   self,
  inline 
)

Definition at line 69 of file CItems.py.

References gui.CItems.PointItem.inline.

69 
70  def setInline(self,inline):
71  self.inline=inline
72  if inline.z() >= self.z():
self.setZ(inline.z()+1)
def gui.CItems.PointItem.setOutline (   self,
  outline 
)

Definition at line 73 of file CItems.py.

References gui.CItems.PointItem.outline.

73 
74  def setOutline(self,outline):
75  self.outline=outline
76  if outline.z() >= self.z():
77  self.setZ(outline.z()+1)

Member Data Documentation

gui.CItems.PointItem.inline

Definition at line 61 of file CItems.py.

Referenced by gui.CItems.PointItem.clear(), gui.CItems.PointItem.myMove(), and gui.CItems.PointItem.setInline().

gui.CItems.PointItem.item

Definition at line 60 of file CItems.py.

gui.CItems.PointItem.obj
Create a point contained in a composite line (obj)
To remove from canvas

Definition at line 59 of file CItems.py.

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

gui.CItems.PointItem.outline

Definition at line 62 of file CItems.py.

Referenced by gui.CItems.PointItem.clear(), gui.CItems.PointItem.myMove(), and gui.CItems.PointItem.setOutline().


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