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
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