OSDN Git Service

Automatically align underspecified tasks boundaries on project boundaries when possible.
[tjqt4port/tj2qt4.git] / taskjuggler / ShiftList.h
1 /*
2  * ShiftList.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 _ShiftList_h_
14 #define _ShiftList_h_
15
16 #include "CoreAttributesList.h"
17
18 class QString;
19 class Shift;
20 class Project;
21
22 /**
23  * @short Stores a list of Shifts.
24  * @author Chris Schlaeger <cs@kde.org>
25  */
26 class ShiftList : public CoreAttributesList
27 {
28 public:
29     ShiftList()
30     {
31         sorting[0] = TreeMode;
32         sorting[1] = SequenceUp;
33     }
34     virtual ~ShiftList() { }
35
36     Shift* getShift(const QString& id) const;
37
38     virtual int compareItemsLevel(CoreAttributes* c1, CoreAttributes* c2,
39                                   int level);
40 } ;
41
42 /**
43  * @short Iterator class for ShiftList objects.
44  * @see ShiftList
45  * @author Chris Schlaeger <cs@kde.org>
46  */
47 class ShiftListIterator : public virtual CoreAttributesListIterator
48 {
49 public:
50     ShiftListIterator(const CoreAttributesList& l) :
51         CoreAttributesListIterator(l) { }
52     virtual ~ShiftListIterator() { }
53     Shift* operator*() { return static_cast<Shift*>(get()); }
54 } ;
55
56 #endif
57