示例#1
0
 def generateIdentifier(self):
     """
     Create a new, unique identifier for and assign it to the guideline.
     This will post *Anchor.IdentifierChanged* and *Anchor.Changed* notifications.
     """
     identifier = makeRandomIdentifier(existing=self.identifiers)
     self.identifier = identifier
示例#2
0
 def generateIdentifier(self):
     """
     Create a new, unique identifier for and assign it to the guideline.
     This will post *Anchor.IdentifierChanged* and *Anchor.Changed* notifications.
     """
     identifier = makeRandomIdentifier(existing=self.identifiers)
     self.identifier = identifier
示例#3
0
 def generateIdentifier(self):
     """
     Create a new, unique identifier for and assign it to the contour.
     This will post *Component.IdentifierChanged* and *Component.Changed* notifications.
     """
     if self.identifier is None:
         identifier = makeRandomIdentifier(existing=self.identifiers)
         self.identifier = identifier
     return self.identifier
示例#4
0
 def generateIdentifierForPoint(self, point):
     """
     Create a new, unique identifier for and assign it to the point.
     This will post *Contour.Changed* notification.
     """
     if point.identifier is None:
         identifier = makeRandomIdentifier(existing=self.identifiers)
         if identifier is not None:
             self.identifiers.add(identifier)
         point.identifier = identifier
         self.dirty = True
     return point.identifier
示例#5
0
 def generateIdentifierForPoint(self, point):
     """
     Create a new, unique identifier for and assign it to the point.
     This will post *Contour.Changed* notification.
     """
     if point.identifier is None:
         identifier = makeRandomIdentifier(existing=self.identifiers)
         if identifier is not None:
             self.identifiers.add(identifier)
         point.identifier = identifier
         self.dirty = True
     return point.identifier