def setText(self, text): """ Set the label text. :type text: str """ datatype = Datatype.valueOf(text) or Datatype.string self.label.setText(datatype.value) self.updateNode()
def datatype(self): """ Returns the datatype associated with this node. :rtype: Datatype """ match = RE_VALUE.match(self.text()) if match: return Datatype.valueOf(match.group('datatype')) return None
def datatype(self): """ Returns the datatype associated with this node. :rtype: Datatype """ return Datatype.valueOf(self.text())