graphics/LD_Objects.py
changeset 162 e746ff4aa8be
parent 145 4fb225afddf4
child 165 e464a4e4e06d
equal deleted inserted replaced
161:6af49f77fa2b 162:e746ff4aa8be
    52     # Destructor
    52     # Destructor
    53     def __del__(self):
    53     def __del__(self):
    54         self.Connectors = []
    54         self.Connectors = []
    55     
    55     
    56     # Make a clone of this LD_PowerRail
    56     # Make a clone of this LD_PowerRail
    57     def Clone(self, id = None, pos = None):
    57     def Clone(self, parent, id = None, pos = None):
    58         powerrail = LD_PowerRail(self.Parent, self.Type, id)
    58         powerrail = LD_PowerRail(parent, self.Type, id)
    59         powerrail.SetSize(self.Size[0], self.Size[1])
    59         powerrail.SetSize(self.Size[0], self.Size[1])
    60         if pos is not None:
    60         if pos is not None:
    61             powerrail.SetPosition(pos.x, pos.y)
    61             powerrail.SetPosition(pos.x, pos.y)
    62         powerrail.Connectors = []
    62         powerrail.Connectors = []
    63         for connector in self.Connectors:
    63         for connector in self.Connectors:
   376     def __del__(self):
   376     def __del__(self):
   377         self.Input = None
   377         self.Input = None
   378         self.Output = None
   378         self.Output = None
   379     
   379     
   380     # Make a clone of this LD_Contact
   380     # Make a clone of this LD_Contact
   381     def Clone(self, id = None, pos = None):
   381     def Clone(self, parent, id = None, pos = None):
   382         contact = LD_Contact(self.Parent, self.Type, self.Name, id)
   382         contact = LD_Contact(parent, self.Type, self.Name, id)
   383         contact.SetSize(self.Size[0], self.Size[1])
   383         contact.SetSize(self.Size[0], self.Size[1])
   384         if pos is not None:
   384         if pos is not None:
   385             contact.SetPosition(pos.x, pos.y)
   385             contact.SetPosition(pos.x, pos.y)
   386         contact.Input = self.Input.Clone(contact)
   386         contact.Input = self.Input.Clone(contact)
   387         contact.Output = self.Output.Clone(contact)
   387         contact.Output = self.Output.Clone(contact)
   606     def __del__(self):
   606     def __del__(self):
   607         self.Input = None
   607         self.Input = None
   608         self.Output = None
   608         self.Output = None
   609     
   609     
   610     # Make a clone of this LD_Coil
   610     # Make a clone of this LD_Coil
   611     def Clone(self, id = None, pos = None):
   611     def Clone(self, parent, id = None, pos = None):
   612         coil = LD_Coil(self.Parent, self.Type, self.Name, id)
   612         coil = LD_Coil(parent, self.Type, self.Name, id)
   613         coil.SetSize(self.Size[0], self.Size[1])
   613         coil.SetSize(self.Size[0], self.Size[1])
   614         if pos is not None:
   614         if pos is not None:
   615             coil.SetPosition(pos.x, pos.y)
   615             coil.SetPosition(pos.x, pos.y)
   616         coil.Input = self.Input.Clone(coil)
   616         coil.Input = self.Input.Clone(coil)
   617         coil.Output = self.Output.Clone(coil)
   617         coil.Output = self.Output.Clone(coil)