当前位置: 首页>>代码示例>>Python>>正文


Python CustomEditor.get_value方法代码示例

本文整理汇总了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
开发者ID:kurtraschke,项目名称:camelot,代码行数:9,代码来源:many2oneeditor.py

示例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
开发者ID:Governa,项目名称:Camelot,代码行数:9,代码来源:coloreditor.py

示例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
开发者ID:kurtraschke,项目名称:camelot,代码行数:10,代码来源:smileyeditor.py

示例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
开发者ID:nvictor,项目名称:Camelot,代码行数:10,代码来源:richtexteditor.py

示例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
开发者ID:Governa,项目名称:Camelot,代码行数:13,代码来源:integereditor.py

示例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:
开发者ID:kurtraschke,项目名称:camelot,代码行数:15,代码来源:datetimeeditor.py

示例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
开发者ID:kurtraschke,项目名称:camelot,代码行数:18,代码来源:floateditor.py

示例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
开发者ID:Governa,项目名称:Camelot,代码行数:8,代码来源:dateeditor.py

示例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
开发者ID:nvictor,项目名称:Camelot,代码行数:6,代码来源:coloredfloateditor.py

示例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
开发者ID:Governa,项目名称:Camelot,代码行数:5,代码来源:virtualaddresseditor.py

示例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
开发者ID:kurtraschke,项目名称:camelot,代码行数:4,代码来源:stareditor.py

示例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
开发者ID:Governa,项目名称:Camelot,代码行数:8,代码来源:codeeditor.py

示例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]
开发者ID:Governa,项目名称:Camelot,代码行数:5,代码来源:smileyeditor.py

示例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() )
开发者ID:Governa,项目名称:Camelot,代码行数:4,代码来源:localfileeditor.py

示例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
开发者ID:kurtraschke,项目名称:camelot,代码行数:7,代码来源:codeeditor.py


注:本文中的customeditor.CustomEditor.get_value方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。