Ejemplo n.º 1
0
 def filterTask(self, task): # pylint: disable-msg=W0621
     result = True
     if self.__hideCompletedTasks and task.completed():
         result = False
     elif self.__hideInactiveTasks and task.inactive():
         result = False
     elif self.__hideActiveTasks and task.active():
         result = False
     elif self.__hideCompositeTasks and not self.treeMode() and task.children():
         result = False
     elif task.dueDateTime(recursive=self.treeMode()) > self.__dueDateTimeFilter():
         result = False
     return result
Ejemplo n.º 2
0
 def filterTask(self, task): # pylint: disable-msg=W0621
     result = True
     if self.__hideActiveTasks and task.active():
         result = False # Hide active task
     elif self.__hideCompositeTasks and not self.treeMode() and task.children():
         result = False # Hide composite task
     elif self.__taskDueLaterThanDueDateTimeFilter(task):
         result = False # Hide due task
     elif self.__taskCompletedEarlierThanCompletionDateTimeFilter(task):
         result = False # Hide completed task
     elif self.__startDateTimeFilterString == 'Always' and task.inactive():
         result = False # Hide prerequisite task no matter what start date
     elif self.__taskStartsLaterThanStartDateTimeFilter(task):
         result = False # Hide future task 
     return result
Ejemplo n.º 3
0
 def filterTask(self, task):  # pylint: disable-msg=W0621
     result = True
     if self.__hideCompletedTasks and task.completed():
         result = False
     elif self.__hideInactiveTasks and task.inactive():
         result = False
     elif self.__hideActiveTasks and task.active():
         result = False
     elif self.__hideCompositeTasks and not self.treeMode(
     ) and task.children():
         result = False
     elif task.dueDateTime(
             recursive=self.treeMode()) > self.__dueDateTimeFilter():
         result = False
     return result
Ejemplo n.º 4
0
 def filterTask(self, task):
     result = True
     if self.__hideCompletedTasks and task.completed():
         result = False
     elif self.__hideInactiveTasks and task.inactive():
         result = False
     elif self.__hideOverdueTasks and task.overdue():
         result = False
     elif self.__hideActiveTasks and task.active():
         result = False
     elif self.__hideOverbudgetTasks and \
         task.budgetLeft(recursive=True) < date.TimeDelta():
         result = False
     elif self.__hideCompositeTasks and not self.treeMode() and task.children():
         result = False
     elif task.dueDate(recursive=self.treeMode()) > self.__dueDateFilter:
         result = False
     return result
Ejemplo n.º 5
0
 def filterTask(self, task, hideCompletedTasks, hideInactiveTasks, 
                hideOverdueTasks, hideActiveTasks, hideOverBudgetTasks,
                viewTasksDueBeforeDate):
     result = True
     if hideCompletedTasks and task.completed():
         result = False
     elif hideInactiveTasks and task.inactive():
         result = False
     elif hideOverdueTasks and task.overdue():
         result = False
     elif hideActiveTasks and task.active():
         result = False
     elif hideOverBudgetTasks and \
         task.budgetLeft(recursive=True) < date.TimeDelta():
         result = False
     elif task.dueDate(recursive=self.treeMode()) > viewTasksDueBeforeDate:
         result = False        
     return result