Debian Codegraph @

src/plugins/schedulers/tj/taskjuggler/ShiftSelectionList.h

raw
1 /*
2 * ShiftSelectionList.h - TaskJuggler
3 *
4 * SPDX-FileCopyrightText: 2001, 2002, 2003, 2004 Chris Schlaeger <[email protected]>
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 #ifndef _ShiftSelectionList_h_
13 #define _ShiftSelectionList_h_
14
15 #include "ShiftSelection.h"
16
17 namespace TJ
18 {
19
20 class Interval;
21
22 /**
23 * @short Holds a list of shift selections.
24 * @author Chris Schlaeger <[email protected]>
25 */
26 class ShiftSelectionList : public QList<ShiftSelection*>
27 {
28 public:
29 ShiftSelectionList() { }
30 virtual ~ShiftSelectionList() { }
31
32 typedef QListIterator<ShiftSelection*> Iterator;
33
34 bool insert(ShiftSelection* s);
35
36 bool isOnShift(const Interval& iv) const;
37
38 bool isVacationDay(time_t day) const;
39
40 private:
41 friend class ShiftSelection;
42 // virtual int compareItems(QCollection::Item i1, QCollection::Item i2);
43 };
44
45 } // namespace TJ
46
47 PLANTJ_EXPORT QDebug operator<<(QDebug dbg, const TJ::ShiftSelectionList *s);
48
49 #endif