2 * Shift.h - TaskJuggler
4 * Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006
5 * by Chris Schlaeger <cs@kde.org>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of version 2 of the GNU General Public License as
9 * published by the Free Software Foundation.
18 #include <q3ptrlist.h>
20 #include "CoreAttributes.h"
23 class ShiftListIterator;
26 * @short Stores all shift related information.
27 * @author Chris Schlaeger <cs@kde.org>
29 class Shift : public CoreAttributes
32 Shift(Project* prj, const QString& i, const QString& n, Shift* p,
33 const QString& df = QString::null, uint dl = 0);
36 virtual CAType getType() const { return CA_Shift; }
38 Shift* getParent() const { return static_cast<Shift*>(parent); }
40 ShiftListIterator getSubListIterator() const;
44 void setWorkingHours(int day, const Q3PtrList<Interval>& l);
46 Q3PtrList<Interval>* getWorkingHours(int day) const
48 return workingHours[day];
50 const Q3PtrList<Interval>* const * getWorkingHours() const
55 bool isOnShift(const Interval& iv) const;
57 bool isVacationDay(time_t day) const;
60 Q3PtrList<Interval>* workingHours[7];