Tasks/TaskFilter.py

changeset 3621
15f23ed3f216
parent 3178
f25fc1364c88
child 3656
441956d8fce5
equal deleted inserted replaced
3620:2c8d96d47cda 3621:15f23ed3f216
24 """ 24 """
25 self.active = False 25 self.active = False
26 26
27 self.summaryFilter = None 27 self.summaryFilter = None
28 self.filenameFilter = None 28 self.filenameFilter = None
29 self.typeFilter = Task.TypeNone # task type 29 self.typeFilter = Task.TypeNone
30 self.scopeFilter = None # global (False) or project (True) 30 # task type
31 self.statusFilter = None # uncompleted (False) or 31
32 # completed (True) 32 self.scopeFilter = None
33 self.prioritiesFilter = None # list of priorities 33 # global (False) or project (True)
34 # [0 (high), 1 (normal), 2 (low)] 34
35 self.statusFilter = None
36 # uncompleted (False) or completed (True)
37
38 self.prioritiesFilter = None
39 # list of priorities [0 (high), 1 (normal), 2 (low)]
35 40
36 def setActive(self, enabled): 41 def setActive(self, enabled):
37 """ 42 """
38 Public method to activate the filter. 43 Public method to activate the filter.
39 44
141 if self.statusFilter is not None and \ 146 if self.statusFilter is not None and \
142 self.statusFilter != task.completed: 147 self.statusFilter != task.completed:
143 return False 148 return False
144 149
145 if self.prioritiesFilter is not None and \ 150 if self.prioritiesFilter is not None and \
146 not task.priority in self.prioritiesFilter: 151 task.priority not in self.prioritiesFilter:
147 return False 152 return False
148 153
149 return True 154 return True

eric ide

mercurial