|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 21 22 27 28 38 39 41 42 43 44 48 50 51 53 54 55 56 57 62 64 65 66 67 68 69 74 81 88 90 91 92 94 97 98 99 100 101 104 107 108 109 110 111 114 116 117 |
''' Task Coach - Your friendly task manager Copyright (C) 2004-2010 Task Coach developers <developers@taskcoach.org>
Task Coach is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Task Coach is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. '''
EffortUICommandNamesMixin): ''' EffortList observes a TaskList and contains all effort records of all tasks in the underlying TaskList. '''
eventType='task.effort.add') eventType='task.effort.remove')
''' This method is called when a task is added to the observed list. It overrides ObservableListObserver.extendSelf whose default behaviour is to add the item that is added to the observed list to the observing list (this list) unchanged. But we want to add the efforts of the tasks, rather than the tasks themselves. '''
''' This method is called when a task is removed from the observed list. It overrides ObservableListObserver.removeItemsFromSelf whose default behaviour is to remove the item that was removed from the observed list from the observing list (this list) unchanged. But we want to remove the efforts of the tasks, rather than the tasks themselves. '''
''' Do not delegate originalLength to the underlying TaskList because that would return a number of tasks, and not the number of effort records.'''
''' We override ObservableListObserver.removeItems because the default implementation is to remove the arguments from the original list, which in this case would mean removing efforts from a task list. Since that wouldn't work we remove the efforts from the tasks by hand. '''
''' We override ObservableListObserver.extend because the default implementation is to add the arguments to the original list, which in this case would mean adding efforts to a task list. Since that wouldn't work we add the efforts to the tasks by hand. '''
def sortEventType(class_): return 'this event type is not used' |