Module field_color
[hide private]
[frames] | no frames]

Module field_color

source code

Code to handle setting colors for fields in various BitPim Editor Dialogs. The idea is to show which fields are supported by the current phone model, which fields are not, and which fields are unknown (default).

To use/enable this feature for your phone, define a dict value in your phone profile that specifies the applicability of various fields. It's probably best if you copy the default_field_info dict to your phone profile and set appropriate values. The value of each key can be either: None (don't know), True (applicable), False (not applicable), 0 (not applicable), int>0 (number of entries this phone can have).

The name of this dict is 'field_color_data'. An example is included in module com_lgvx9800.

Functions [hide private]
 
build_field_info(widget, name=None)
Return the dict info for this widget
source code
 
get_children_count(widget)
Return the number of sibblings to this widget
source code
 
get_color_info_from_profile(widget)
Walk up the widget chain to find the one that has the phone profile
source code
 
color(widget, name, tree=None)
Return the appropriate color for this field
source code
 
build_color_field(widget, klass, args, name, tree=None)
instantiate the widget, set the color, and return the widget
source code
 
reload_color_info(widget, widgets) source code
Variables [hide private]
  applicable_color = wx.BLUE
  notapplicable_color = wx.RED
  dunno_color = wx.BLACK
  default_field_info = {'calendar': {'alarm': None, 'allday': No...
  current_field_info = {'calendar': {'alarm': None, 'allday': No...
Variables Details [hide private]

default_field_info

Value:
{'calendar': {'alarm': None,
              'allday': None,
              'category': None,
              'description': None,
              'end': None,
              'location': None,
              'memo': None,
              'priority': None,
...

current_field_info

Value:
{'calendar': {'alarm': None,
              'allday': None,
              'category': None,
              'description': None,
              'end': None,
              'location': None,
              'memo': None,
              'priority': None,
...