| 1 |
/* |
| 2 |
* ShiftList.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 |
|
| 13 |
#ifndef _ShiftList_h_ |
| 14 |
#define _ShiftList_h_ |
| 15 |
|
| 16 |
#include "CoreAttributesList.h" |
| 17 |
|
| 18 |
class QString; |
| 19 |
|
| 20 |
namespace TJ |
| 21 |
{ |
| 22 |
|
| 23 |
class Shift; |
| 24 |
|
| 25 |
/** |
| 26 |
* @short Stores a list of Shifts. |
| 27 |
* @author Chris Schlaeger <[email protected]> |
| 28 |
*/ |
| 29 |
class ShiftList : public CoreAttributesList |
| 30 |
{ |
| 31 |
public: |
| 32 |
ShiftList() |
| 33 |
{ |
| 34 |
sorting[0] = TreeMode; |
| 35 |
sorting[1] = SequenceUp; |
| 36 |
} |
| 37 |
~ShiftList() override { } |
| 38 |
|
| 39 |
Shift* getShift(const QString& id) const; |
| 40 |
|
| 41 |
int compareItemsLevel(CoreAttributes* c1, CoreAttributes* c2, |
| 42 |
int level) override; |
| 43 |
} ; |
| 44 |
|
| 45 |
/** |
| 46 |
* @short Iterator class for ShiftList objects. |
| 47 |
* @see ShiftList |
| 48 |
* @author Chris Schlaeger <[email protected]> |
| 49 |
*/ |
| 50 |
class ShiftListIterator : public virtual CoreAttributesListIterator |
| 51 |
{ |
| 52 |
public: |
| 53 |
explicit ShiftListIterator(const CoreAttributesList& l) : |
| 54 |
CoreAttributesListIterator(l) { } |
| 55 |
~ShiftListIterator() override { } |
| 56 |
Shift* operator*(); |
| 57 |
} ; |
| 58 |
|
| 59 |
} // namespace TJ |
| 60 |
|
| 61 |
#endif |