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

Module t9editor

source code


Code to handle T9 Editor

The format of the T9 Words data is standardized.  It is a list of dict that
has the following standard fields:

"words": an ordered list of dicts, each dict has the following fields:
         "word": string value of the actual T9 Word.

To implement T9 Editor feature for your phone, do the following:

1. Add 2 entries into Profile._supportedsyncs:
        ...
        ('t9_udb', 'read', 'OVERWRITE'),
        ('t9_udb', 'write', 'OVERWRITE'),

2. Implement the following 2 methods in your Phone class:
    def gett9db(self, result)
    def savet9db(self, result, _merge)

    The result dict should contain:
    result[t9editor.dict_key]=<instance of t9editor.T9WordsList()>

    See module phones.com_lgxv8500 for an example implementation.

Classes [hide private]
  T9WordsDataObject
  T9WordsList
  T9EditorWidget
Variables [hide private]
  dict_key = 'T9 Data'
  t9wordsdataobjectfactory = database.dataobjectfactory(T9WordsD...
Variables Details [hide private]

t9wordsdataobjectfactory

Value:
database.dataobjectfactory(T9WordsDataObject)