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


Python CustomEditor.set_value方法代码示例

本文整理汇总了Python中customeditor.CustomEditor.set_value方法的典型用法代码示例。如果您正苦于以下问题:Python CustomEditor.set_value方法的具体用法?Python CustomEditor.set_value怎么用?Python CustomEditor.set_value使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在customeditor.CustomEditor的用法示例。


在下文中一共展示了CustomEditor.set_value方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: set_value

# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import set_value [as 别名]
 def set_value(self, value):
     value = CustomEditor.set_value(self, value)
     if value is None:
         self.spinBox.lineEdit().setText('')
     else:
         value = str(value).replace(',', '.')
         self.spinBox.setValue(eval(value))
开发者ID:Governa,项目名称:Camelot,代码行数:9,代码来源:integereditor.py

示例2: set_value

# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import set_value [as 别名]
 def set_value(self, value):
     """:param value: either ValueLoading, or a function that returns None
     or the entity to be shown in the editor"""
     self._last_highlighted_entity_getter = None
     value = CustomEditor.set_value(self, value)
     if value:
         self.setEntity(value, propagate = False)
开发者ID:kurtraschke,项目名称:camelot,代码行数:9,代码来源:many2oneeditor.py

示例3: set_value

# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import set_value [as 别名]
 def set_value(self, value):
     value = CustomEditor.set_value(self, value)
     if value:
         color = QtGui.QColor()
         color.setRgb(*value)
         self.setColor(color)
     else:
         self.setColor(value)
开发者ID:Governa,项目名称:Camelot,代码行数:10,代码来源:coloreditor.py

示例4: set_value

# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import set_value [as 别名]
 def set_value(self, value):
     value = CustomEditor.set_value(self, value)
     if value:
         self.spinBox.setValue( float(value) )
     elif value == None:
         self.spinBox.lineEdit().setText('')
     else:
         self.spinBox.setValue(0.0)
开发者ID:kurtraschke,项目名称:camelot,代码行数:10,代码来源:floateditor.py

示例5: set_value

# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import set_value [as 别名]
 def set_value(self, value):
     value = CustomEditor.set_value(self, value) or 0
     self.stars = int(value)
     for i in range(self.starCount):
         if i+1 <= self.stars:
             self.buttons[i].setIcon(self.star_icon.getQIcon())
         else:
             self.buttons[i].setIcon(self.no_star_icon.getQIcon())
开发者ID:kurtraschke,项目名称:camelot,代码行数:10,代码来源:stareditor.py

示例6: set_value

# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import set_value [as 别名]
     return CustomEditor.get_value(self) or value
 
 def set_value(self, value):
     value = CustomEditor.set_value(self, value)
     if value:
         self.dateedit.set_value(value.date())
         self.timeedit.lineEdit().setText('%02i:%02i'%(value.hour, value.minute))
     else:
开发者ID:kurtraschke,项目名称:camelot,代码行数:10,代码来源:datetimeeditor.py

示例7: set_value

# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import set_value [as 别名]
    def set_value(self, value):
        value = CustomEditor.set_value(self, value) or 'face-plain'
        self.img = value
        #self.imgPath = 'tango/16x16/emotes/' + self.img + '.png'

        for i, smiley in enumerate(self.allSmileys):
            if smiley == self.img:
                self.box.setCurrentIndex(i)
开发者ID:kurtraschke,项目名称:camelot,代码行数:10,代码来源:smileyeditor.py

示例8: set_value

# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import set_value [as 别名]
 def set_value(self, value):
     value = CustomEditor.set_value(self, value)
     if value:
         self.filename.setText( value )
     else:
         self.filename.setText( '' )
     self.valueChanged.emit()
     return value
开发者ID:Governa,项目名称:Camelot,代码行数:10,代码来源:localfileeditor.py

示例9: set_value

# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import set_value [as 别名]
 def set_value( self, model ):
     model = CustomEditor.set_value( self, model )
     table = self.findChild(QtGui.QWidget, 'table')
     if table and model and model != self.model:
         self.model = model
         table.setModel( model )
         register.register( self.model, table )
         post( model._extend_cache, self.update_delegates )
开发者ID:kurtraschke,项目名称:camelot,代码行数:10,代码来源:one2manyeditor.py

示例10: set_value

# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import set_value [as 别名]
 def set_value(self, value):
     value = CustomEditor.set_value(self, value)
     if value!=None:
         if unicode(self.textedit.toHtml())!=value:
             self.update_alignment()
             self.textedit.setHtml(value)
             self.update_color()
     else:
         self.textedit.clear()
开发者ID:kurtraschke,项目名称:camelot,代码行数:11,代码来源:richtexteditor.py

示例11: set_value

# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import set_value [as 别名]
 def set_value(self, value):
     value = CustomEditor.set_value(self, value)
     if value:
         old_value = self.get_value()
         if value!=old_value:
             for part_editor, part in zip(self.part_editors, value):
                 part_editor.setText(unicode(part))
     else:
         for part_editor in self.part_editors:
             part_editor.setText(u'')
开发者ID:kurtraschke,项目名称:camelot,代码行数:12,代码来源:codeeditor.py

示例12: set_value

# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import set_value [as 别名]
 def set_value(self, value):
     value = CustomEditor.set_value(self, value)
     self.setProperty( 'value', QtCore.QVariant( value ) )
     if value:
         qdate = QtCore.QDate(value)
         formatted_date = qdate.toString(self.date_format)
         self.line_edit.set_user_input(formatted_date)
         self.calendar_widget.setSelectedDate(qdate)
     else:
         self.line_edit.set_user_input('')
     self.valueChanged.emit()
开发者ID:Governa,项目名称:Camelot,代码行数:13,代码来源:dateeditor.py

示例13: set_value

# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import set_value [as 别名]
 def set_value(self, value):
     assert object_thread( self )
     value = CustomEditor.set_value(self, value)
     if value:
         old_value = self.get_value()
         if value!=old_value:
             for part_editor, part in zip( self._get_part_editors(), value ):
                 part_editor.setText(unicode(part))
     else:
         for part_editor in self._get_part_editors():
             part_editor.setText('')
开发者ID:Governa,项目名称:Camelot,代码行数:13,代码来源:codeeditor.py

示例14: set_value

# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import set_value [as 别名]
 def set_value(self, model):
     model = CustomEditor.set_value(self, model)
     table = self.findChild(QtGui.QWidget, "table")
     if table and model and model != self.model:
         self.model = model
         table.setModel(model)
         register.register(self.model, table)
         model_context = self.gui_context.create_model_context()
         for toolbar in self.findChildren(QtGui.QToolBar):
             for qaction in toolbar.actions():
                 post(qaction.action.get_state, qaction.set_state, args=(model_context,))
         post(model._extend_cache, self.update_delegates)
开发者ID:nvictor,项目名称:Camelot,代码行数:14,代码来源:one2manyeditor.py

示例15: set_value

# 需要导入模块: from customeditor import CustomEditor [as 别名]
# 或者: from customeditor.CustomEditor import set_value [as 别名]
 def set_value(self, value):
     value = CustomEditor.set_value(self, value)
     self.value = value
     if value:
         self.save_as_button.setVisible(True)
         self.filename.setText(value.verbose_name)
         self.open_button.setIcon(self.open_icon)
         self.open_button.setToolTip(_('open file'))
     else:
         self.save_as_button.setVisible(False)
         self.filename.setText('')
         self.open_button.setIcon(self.new_icon)
         self.open_button.setToolTip(_('add file'))
     self.set_tab_order()
     return value
开发者ID:kurtraschke,项目名称:camelot,代码行数:17,代码来源:fileeditor.py


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