コード例 #1
0
 def setText(self, text):
     """
     Set the label text.
     :type text: str
     """
     datatype = Datatype.forValue(text) or Datatype.string
     self.label.setText(datatype.value)
     self.updateNode()
コード例 #2
0
ファイル: individual.py プロジェクト: danielepantaleone/eddy
 def datatype(self):
     """
     Returns the datatype associated with this node.
     :rtype: Datatype
     """
     match = RE_VALUE.match(self.text())
     if match:
         return Datatype.forValue(match.group("datatype"))
     return None
コード例 #3
0
 def datatype(self):
     """
     Returns the datatype associated with this node.
     :rtype: Datatype
     """
     return Datatype.forValue(self.text())