def setText(self, text): """ Set the label text making sure not to have 'self' as range. :type text: str """ restriction = Restriction.forLabel(text) if not restriction: text = Restriction.Exists.toString() self.label.setText(text)
def setText(self, text): """ Set the label text. Will additionally parse the given value checking for a consistent restriction type. :type text: str """ restriction = Restriction.forLabel(text) if not restriction: text = Restriction.Exists.toString() self.label.setText(text)
def restriction(self): """ Returns the restriction type of the node. :rtype: Restriction """ return Restriction.forLabel(self.text())