コード例 #1
0
ファイル: value_domain.py プロジェクト: jonntd/eddy
 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()
コード例 #2
0
 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
コード例 #3
0
ファイル: value_domain.py プロジェクト: jonntd/eddy
 def datatype(self):
     """
     Returns the datatype associated with this node.
     :rtype: Datatype
     """
     return Datatype.valueOf(self.text())