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
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
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
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
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