OSDN Git Service

adjust integer's signedness
[tjqt4port/tj2qt4.git] / taskjuggler / ScenarioList.h
1 /*
2  * ScenarioList.h - TaskJuggler
3  *
4  * Copyright (c) 2001, 2002, 2003, 2004 by Chris Schlaeger <cs@kde.org>
5  *
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.
9  *
10  * $Id$
11  */
12
13 #ifndef _ScenarioList_h_
14 #define _ScenarioList_h_
15
16 #include "CoreAttributesList.h"
17
18 class QString;
19 class Scenario;
20
21 /**
22  * @short A list of scenarios.
23  * @author Chris Schlaeger <cs@kde.org>
24  */
25 class ScenarioList : public CoreAttributesList
26 {
27 public:
28     ScenarioList();
29     virtual ~ScenarioList() { }
30
31     Scenario* getScenario(const QString& id) const;
32
33     static bool isSupportedSortingCriteria(int sc);
34
35     virtual int compareItemsLevel(CoreAttributes* c1, CoreAttributes* c2,
36                                   int level);
37
38     virtual Scenario* operator[](int i);
39 } ;
40
41 /**
42  * @short Iterator class for ScenarioList objects.
43  * @author Chris Schlaeger <cs@kde.org>
44  */
45 class ScenarioListIterator : public virtual CoreAttributesListIterator
46 {
47 public:
48     ScenarioListIterator(const CoreAttributesList& l) :
49         CoreAttributesListIterator(l)
50     { }
51
52     ~ScenarioListIterator() { }
53
54     Scenario* operator*() { return static_cast<Scenario*>(get()); }
55 } ;
56
57 #endif