2 * TaskList.h - TaskJuggler
4 * Copyright (c) 2001, 2002, 2003, 2004 by Chris Schlaeger <cs@kde.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of version 2 of the GNU General Public License as
8 * published by the Free Software Foundation.
15 #include "CoreAttributesList.h"
21 * @short The class stores a list of tasks.
23 * @author Chris Schlaeger <cs@kde.org>
25 class TaskList : public virtual CoreAttributesList
32 sorting[0] = CoreAttributesList::TreeMode;
33 sorting[1] = CoreAttributesList::StartUp;
34 sorting[2] = CoreAttributesList::EndUp;
37 TaskList(const TaskList& tl) :
38 CoreAttributesList(tl),
39 sortScenario(tl.sortScenario)
42 virtual ~TaskList() { }
44 Task* getTask(const QString& id) const;
46 static bool isSupportedSortingCriteria(int sc);
48 virtual int compareItemsLevel(CoreAttributes* c1, CoreAttributes* c2,
51 void setSortScenario(int sc) { sortScenario = sc; }
58 * @short Iterator class for TaskList objects.
60 * @author Chris Schlaeger <cs@kde.org>
62 class TaskListIterator : public virtual CoreAttributesListIterator
65 TaskListIterator(const CoreAttributesList& l) :
66 CoreAttributesListIterator(l) { }
67 virtual ~TaskListIterator() { }
68 Task* operator*() { return static_cast<Task*>(get()); }