def filterTask(self, task): # pylint: disable=W0621 result = True if task.status() in self.__statusesToHide: result = False elif self.__hideCompositeTasks and not self.treeMode() and task.children(): result = False # Hide composite task return result
def filterTask(self, task): # pylint: disable=W0621 result = True if task.status() in self.__statusesToHide: result = False elif self.__hideCompositeTasks and not self.treeMode( ) and task.children(): result = False # Hide composite task return result
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
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
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
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 __setStartDateChildren(self, task): taskStartDate = task.startDate() for child in task.children(): if taskStartDate > child.startDate(): child.setStartDate(taskStartDate)
def __setDueDateChildren(self, task): taskDueDate = task.dueDate() for child in task.children(): if child.dueDate() > taskDueDate: child.setDueDate(taskDueDate)
def __markUncompletedChildrenCompleted(self, task): taskCompletionDate = task.completionDate() for child in task.children(): if not child.completed(): child.setRecurrence() child.setCompletionDate(taskCompletionDate)
def __taskSubject(self, task): subject = task.subject() if self.treeMode(): subject += ' '.join([child.subject() for child in \ task.children(recursive=True) if child in self.observable()]) return subject
def filter(self, tasks): viewCompositeTasks = self.__settings.getboolean('view', 'compositetasks') return [task for task in tasks if (viewCompositeTasks or \ not task.children())]
def __setStartDateChildren(self, task): for child in task.children(): if task.startDate() > child.startDate(): child.setStartDate(task.startDate())
def __markUncompletedChildrenCompleted(self, task): for child in task.children(): if not child.completed(): child.setCompletionDate(task.completionDate())