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

Module todo

source code


Code to handle Todo Items

The format for the Todo items is standardized.  It is a dict with the following
fields:

TodoEntry properties:
summary - 'string subject'
note - 'string note'
due_date - 'YYYYMMDD'
status - (None, NotStarted, InProgress, NeedActions, Completed, Cancelled)
percent_complete - None, range(101)
completion_date - 'YYYYMMDD'
categories - [{ 'category': string }]
private - True/<False|None>
priority - range(1, 11) 1=Highest, 5=Normal, 10=Lowest

TodoEntry Methods:
get() - return a copy of the internal dict
set(dict) - set the internal dict
check_completion() - check the task for completion and if so set appropriate
                     values
completion() - set the task as completed and set appropriate values

To implement Todo read/write for a phone module:
 Add 2 entries into Profile._supportedsyncs:
        ...
        ('todo', 'read', None),     # all todo reading
        ('todo', 'write', 'OVERWRITE')  # all todo writing

implement the following 2 methods in your Phone class:
    def gettodo(self, result):
        ...
        return result

    def savetodo(self, result, merge):
        ...
        return result

The result dict key is 'todo'.

Classes [hide private]
  TodoDataObject
  TodoEntry
  StatusComboBox
  PercentCompleteBox
  PriorityBox
  DateControl
  DirtyCheckBox
  GeneralEditor
  TodoWidget
Variables [hide private]
  widgets_list = []
  todoobjectfactory = database.dataobjectfactory(TodoDataObject)