2 * ScenarioList.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.
13 #ifndef _ScenarioList_h_
14 #define _ScenarioList_h_
16 #include "CoreAttributesList.h"
22 * @short A list of scenarios.
23 * @author Chris Schlaeger <cs@kde.org>
25 class ScenarioList : public CoreAttributesList
29 virtual ~ScenarioList() { }
31 Scenario* getScenario(const QString& id) const;
33 static bool isSupportedSortingCriteria(int sc);
35 virtual int compareItemsLevel(CoreAttributes* c1, CoreAttributes* c2,
38 virtual Scenario* operator[](int i);
42 * @short Iterator class for ScenarioList objects.
43 * @author Chris Schlaeger <cs@kde.org>
45 class ScenarioListIterator : public virtual CoreAttributesListIterator
48 ScenarioListIterator(const CoreAttributesList& l) :
49 CoreAttributesListIterator(l)
52 ~ScenarioListIterator() { }
54 Scenario* operator*() { return static_cast<Scenario*>(get()); }