コード例 #1
0
ファイル: localfileeditor.py プロジェクト: Governa/Camelot
 def set_field_attributes( self, 
                           editable = True,
                           background_color = None,
                           tooltip = None,
                           **kwargs):
     self.setEnabled( editable )
     if self.filename:
         set_background_color_palette( self.filename, background_color )
         self.filename.setToolTip(unicode(tooltip or ''))
コード例 #2
0
 def set_field_attributes(self,
                          editable=True,
                          background_color=None,
                          tooltip=None,
                          **kwargs):
     self.setEnabled(editable)
     if self.filename:
         set_background_color_palette(self.filename, background_color)
         self.filename.setToolTip(unicode(tooltip or ''))
コード例 #3
0
ファイル: floateditor.py プロジェクト: jeroendierckx/Camelot
 def set_background_color(self, background_color):
     #
     # WARNING : Changing this code requires extensive testing of all editors
     # in all states on all platforms (Mac, Linux, Win XP, Win Vista, Win 7)
     #
     # There seems to be a bug in Windows QStyle that requires the spinbox as
     # well as its line edit to require the bgcolor to be set, was however
     # unable to reproduce this properly in a test case
     #
     set_background_color_palette(self.spinBox.lineEdit(), background_color)
     set_background_color_palette(self.spinBox, background_color)
コード例 #4
0
ファイル: floateditor.py プロジェクト: Governa/Camelot
 def set_background_color(self, background_color):
     #
     # WARNING : Changing this code requires extensive testing of all editors
     # in all states on all platforms (Mac, Linux, Win XP, Win Vista, Win 7)
     #
     # There seems to be a bug in Windows QStyle that requires the spinbox as
     # well as its line edit to require the bgcolor to be set, was however 
     # unable to reproduce this properly in a test case
     #
     set_background_color_palette( self.spinBox.lineEdit(), background_color )
     set_background_color_palette( self.spinBox, background_color )
コード例 #5
0
    def set_field_attributes(self, editable = True,
                                   background_color = None, 
                                   tooltip = None,
                                   prefix = '',
                                   suffix = '',
                                   nullable = True,
                                   single_step = 1, **kwargs):
        self.set_enabled(editable)
        set_background_color_palette(self.spinBox.lineEdit(), background_color )

        self.spinBox.setToolTip(unicode(tooltip or ''))
        
        if prefix:
            self.spinBox.setPrefix(u'%s '%(unicode(prefix).lstrip()))
        else:
            self.spinBox.setPrefix('')
        if suffix:
            self.spinBox.setSuffix(u' %s'%(unicode(suffix).rstrip()))
        else:
            self.spinBox.setSuffix(u'')
        
        self.spinBox.setSingleStep(single_step)
        self._nullable = nullable
コード例 #6
0
ファイル: dateeditor.py プロジェクト: Governa/Camelot
 def set_background_color(self, background_color):
     set_background_color_palette( self.line_edit, background_color )
コード例 #7
0
ファイル: datetimeeditor.py プロジェクト: Governa/Camelot
 def set_background_color(self, background_color):
     self.dateedit.set_background_color( background_color )
     set_background_color_palette( self.timeedit.lineEdit(), background_color )
コード例 #8
0
ファイル: coloredfloateditor.py プロジェクト: nvictor/Camelot
 def set_background_color(self, background_color):
     set_background_color_palette(self.spinBox.lineEdit(), background_color)
コード例 #9
0
 def set_background_color(self, background_color):
     set_background_color_palette( self.editor, background_color )
コード例 #10
0
 def set_background_color(self, background_color):
     set_background_color_palette(self.line_edit, background_color)
コード例 #11
0
ファイル: codeeditor.py プロジェクト: jeroendierckx/Camelot
 def set_background_color(self, background_color):
     for editor in self._get_part_editors():
         set_background_color_palette(editor, background_color)
コード例 #12
0
ファイル: codeeditor.py プロジェクト: Governa/Camelot
 def set_background_color(self, background_color):
     for editor in self._get_part_editors():
         set_background_color_palette( editor, background_color )
コード例 #13
0
ファイル: fileeditor.py プロジェクト: nvictor/Camelot
 def set_field_attributes(self, editable=True, background_color=None, tooltip=None, remove_original=False, **kwargs):
     self.set_enabled(editable)
     if self.filename:
         set_background_color_palette(self.filename, background_color)
         self.filename.setToolTip(unicode(tooltip or ""))
     self.remove_original = remove_original
コード例 #14
0
 def set_background_color(self, background_color):
     set_background_color_palette(self.spinBox.lineEdit(), background_color)
コード例 #15
0
ファイル: many2oneeditor.py プロジェクト: Governa/Camelot
 def set_field_attributes(self, editable = True, 
                                background_color = None,
                                tooltip = None, **kwargs):
     self.set_editable(editable)
     set_background_color_palette( self.search_input, background_color )
     self.search_input.setToolTip(unicode(tooltip or ''))
コード例 #16
0
 def set_background_color(self, background_color):
     set_background_color_palette(self.editor, background_color)