Ejemplo n.º 1
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 ''))
Ejemplo n.º 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 ''))
Ejemplo n.º 3
0
 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)
Ejemplo n.º 4
0
 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 )
Ejemplo n.º 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
Ejemplo n.º 6
0
 def set_background_color(self, background_color):
     set_background_color_palette( self.line_edit, background_color )
Ejemplo n.º 7
0
 def set_background_color(self, background_color):
     self.dateedit.set_background_color( background_color )
     set_background_color_palette( self.timeedit.lineEdit(), background_color )
Ejemplo n.º 8
0
 def set_background_color(self, background_color):
     set_background_color_palette(self.spinBox.lineEdit(), background_color)
Ejemplo n.º 9
0
 def set_background_color(self, background_color):
     set_background_color_palette( self.editor, background_color )
Ejemplo n.º 10
0
 def set_background_color(self, background_color):
     set_background_color_palette(self.line_edit, background_color)
Ejemplo n.º 11
0
 def set_background_color(self, background_color):
     for editor in self._get_part_editors():
         set_background_color_palette(editor, background_color)
Ejemplo n.º 12
0
 def set_background_color(self, background_color):
     for editor in self._get_part_editors():
         set_background_color_palette( editor, background_color )
Ejemplo n.º 13
0
 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
Ejemplo n.º 14
0
 def set_background_color(self, background_color):
     set_background_color_palette(self.spinBox.lineEdit(), background_color)
Ejemplo n.º 15
0
 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 ''))
Ejemplo n.º 16
0
 def set_background_color(self, background_color):
     set_background_color_palette(self.editor, background_color)