2 * ProjectFile.cpp - TaskJuggler
4 * Copyright (c) 2001, 2002 by Chris Schlaeger <cs@suse.de>
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 _VacationList_h_
14 #define _VacationList_h_
23 class VacationInterval : public Interval
26 VacationInterval() { }
28 VacationInterval(const QString& n, time_t s, time_t e)
29 : Interval(s, e), name(n) { }
30 virtual ~VacationInterval() { }
32 const QString& getName() const { return name; }
38 class VacationList : public QList<VacationInterval>
41 VacationList() { setAutoDelete(TRUE); }
44 void add(const QString& name, time_t start, time_t end)
46 inSort(new VacationInterval(name, start, end));
48 bool isVacation(time_t date);
51 virtual int compareItems(QCollection::Item i1, QCollection::Item i2);