本文整理汇总了Python中customeditor.CustomEditor.get_value方法的典型用法代码示例。如果您正苦于以下问题:Python CustomEditor.get_value方法的具体用法?Python CustomEditor.get_value怎么用?Python CustomEditor.get_value使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类customeditor.CustomEditor
的用法示例。
在下文中一共展示了CustomEditor.get_value方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_value
# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import get_value [as 别名]
def get_value(self):
""":return: a function that returns the selected entity or ValueLoading
or None"""
value = CustomEditor.get_value(self)
if not value:
value = self.entity_instance_getter
return value
示例2: get_value
# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import get_value [as 别名]
def get_value(self):
color = self.getColor()
if color:
value = (color.red(), color.green(), color.blue(), color.alpha())
else:
value = None
return CustomEditor.get_value(self) or value
示例3: get_value
# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import get_value [as 别名]
def get_value(self):
imgIndex = self.box.currentIndex()
for i, emot in enumerate(self.allSmileys):
if imgIndex == i:
imgName = emot
return CustomEditor.get_value(self) or imgName
示例4: get_value
# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import get_value [as 别名]
def get_value(self):
from xml.dom import minidom
tree = minidom.parseString(unicode(self.textedit.toHtml()).encode("utf-8"))
value = u"".join(
[node.toxml() for node in tree.getElementsByTagName("html")[0].getElementsByTagName("body")[0].childNodes]
)
return CustomEditor.get_value(self) or value
示例5: get_value
# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import get_value [as 别名]
def get_value(self):
value_loading = CustomEditor.get_value(self)
if value_loading is not None:
return value_loading
if self.spinBox.text()=='':
return None
self.spinBox.interpretText()
value = int(self.spinBox.value())
return value
示例6: get_value
# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import get_value [as 别名]
self.editingFinished.emit()
def get_value(self):
time_value = self.time()
date_value = self.date()
if time_value not in (None, ValueLoading) and date_value not in (None, ValueLoading):
value = datetime.datetime(hour=time_value.hour(),
minute=time_value.minute(),
second=time_value.second(),
year=date_value.year,
month=date_value.month,
day=date_value.day)
else:
示例7: get_value
# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import get_value [as 别名]
def get_value(self):
value_loading = CustomEditor.get_value(self)
if value_loading is not None:
return value_loading
if self.spinBox.text()=='':
return None
self.spinBox.interpretText()
value = self.spinBox.value()
if self._decimal:
import decimal
value = decimal.Decimal('%.*f' % (self.precision, value))
return value
示例8: get_value
# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import get_value [as 别名]
def get_value(self):
try:
value = date_from_string( self.line_edit.user_input() )
except ParsingError:
value = None
return CustomEditor.get_value(self) or value
示例9: get_value
# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import get_value [as 别名]
def get_value(self):
self.spinBox.interpretText()
value = self.spinBox.value()
return CustomEditor.get_value(self) or value
示例10: get_value
# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import get_value [as 别名]
def get_value(self):
value = (unicode(self.combo.currentText()), unicode(self.editor.text()))
return CustomEditor.get_value(self) or value
示例11: get_value
# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import get_value [as 别名]
def get_value(self):
return CustomEditor.get_value(self) or self.stars
示例12: get_value
# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import get_value [as 别名]
def get_value(self):
assert object_thread( self )
value = []
for part_editor in self._get_part_editors():
value.append( unicode( part_editor.text() ) )
return CustomEditor.get_value(self) or value
示例13: get_value
# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import get_value [as 别名]
def get_value(self):
position = self.box.currentIndex()
return CustomEditor.get_value(self) or self.name_by_position[position]
示例14: get_value
# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import get_value [as 别名]
def get_value(self):
return CustomEditor.get_value(self) or unicode( self.filename.text() )
示例15: get_value
# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import get_value [as 别名]
def get_value(self):
value = []
for part in self.part_editors:
value.append(unicode(part.text()))
return CustomEditor.get_value(self) or value