Beispiel #1
0
 def _addDefaultTreeItems(self, tree):
     self._allTasksItem = FilterTreeWidgetItem(
         None, ['All'], AllTasksFilter(),
         QtGui.QIcon(self.style + '/resources/FilterAll.png'))
     self._dueItem = FilterTreeWidgetItem(
         None, ['Due'], HasDueDateFilter(),
         QtGui.QIcon(self.style + '/resources/FilterDue.png'))
     self._uncategorizedTasksItem = FilterTreeWidgetItem(
         None, ['Uncategorized'], UncategorizedTasksFilter(),
         QtGui.QIcon(self.style + '/resources/FilterUncategorized.png'))
     self._contextsItem = FilterTreeWidgetItem(
         None, ['Contexts'], HasContextsFilter(),
         QtGui.QIcon(self.style + '/resources/FilterContexts.png'))
     self._projectsItem = FilterTreeWidgetItem(
         None, ['Projects'], HasProjectsFilter(),
         QtGui.QIcon(self.style + '/resources/FilterProjects.png'))
     self._priorityItem = FilterTreeWidgetItem(
         None, ['Priorities'], PriorityFilter(),
         QtGui.QIcon(self.style + '/resources/FilterComplete.png'))
     self._completeTasksItem = FilterTreeWidgetItem(
         None, ['Complete'], CompleteTasksFilter(),
         QtGui.QIcon(self.style + '/resources/FilterComplete.png'))
     tree.addTopLevelItems([
         self._allTasksItem, self._uncategorizedTasksItem, self._dueItem,
         self._contextsItem, self._projectsItem, self._priorityItem,
         self._completeTasksItem
     ])
Beispiel #2
0
 def _addDefaultTreeItems(self, tree):
     self._allTasksItem = FilterTreeWidgetItem(None, ['All'],
                                               AllTasksFilter(),
                                               getIcon('FilterAll.png'))
     self._incompleteTasksItem = FilterTreeWidgetItem(
         None, ['Pending'], IncompleteTasksFilter(),
         getIcon('FilterPending.png'))
     self._dueItem = FilterTreeWidgetItem(None, ['Due'], HasDueDateFilter(),
                                          getIcon('FilterDue.png'))
     self._uncategorizedTasksItem = FilterTreeWidgetItem(
         None, ['Uncategorized'], UncategorizedTasksFilter(),
         getIcon('FilterUncategorized.png'))
     self._contextsItem = FilterTreeWidgetItem(
         None, ['Contexts'], HasContextsFilter(),
         getIcon('FilterContexts.png'))
     self._projectsItem = FilterTreeWidgetItem(
         None, ['Projects'], HasProjectsFilter(),
         getIcon('FilterProjects.png'))
     self._completeTasksItem = FilterTreeWidgetItem(
         None, ['Complete'], CompleteTasksFilter(),
         getIcon('FilterComplete.png'))
     tree.addTopLevelItems([
         self._allTasksItem, self._incompleteTasksItem,
         self._uncategorizedTasksItem, self._dueItem, self._contextsItem,
         self._projectsItem, self._completeTasksItem
     ])
    def _addDefaultTreeItems(self, tree):
        def addItem(name, filter):
            return FilterTreeWidgetItem(None, [name], filter, self._filterIconByFilterType[type(filter)])

        self._allTasksItem = addItem('All', AllTasksFilter())
        self._dueItem = addItem('Due', HasDueDateFilter())
        self._customItem = addItem('Custom', SimpleTextFilter(''))
        self._uncategorizedTasksItem = addItem('Uncategorized', UncategorizedTasksFilter())
        self._contextsItem = addItem('Contexts', HasContextsFilter())
        self._projectsItem = addItem('Projects', HasProjectsFilter())
        self._priorityItem = addItem('Priorities', PriorityFilter())
        self._completeTasksItem = addItem('Complete', CompleteTasksFilter())

        tree.addTopLevelItems([
            self._allTasksItem, self._uncategorizedTasksItem, self._dueItem, self._contextsItem, self._projectsItem,
            self._priorityItem, self._completeTasksItem
        ])
Beispiel #4
0
 def _addDefaultTreeItems(self, tree):
     self._incompleteTasksItem = \
         FilterTreeWidgetItem(None, ['Pending'], IncompleteTasksFilter(), getIcon('time.png'))
     self._dueItem = \
         FilterTreeWidgetItem(None, ['Due'], HasDueDateFilter(), getIcon('due.png'))
     self._uncategorizedTasksItem = \
         FilterTreeWidgetItem(None, ['Uncategorized'], UncategorizedTasksFilter(), getIcon('help.png'))
     self._contextsItem = \
         FilterTreeWidgetItem(None, ['Contexts'], HasContextsFilter(), getIcon('at.png'))
     self._projectsItem = \
         FilterTreeWidgetItem(None, ['Projects'], HasProjectsFilter(), getIcon('plus.png'))
     self._completeTasksItem = \
         FilterTreeWidgetItem(None, ['Complete'], CompleteTasksFilter(), getIcon('x.png'))
     tree.addTopLevelItems([
         self._incompleteTasksItem, self._dueItem,
         self._uncategorizedTasksItem, self._contextsItem,
         self._projectsItem, self._completeTasksItem
     ])