Class that represents a schedule. More...
#include <schedule.h>

Public Member Functions | |
| Schedule (const Duration &duration=Duration(), const QDateTime &startDate=Clock::currentTime(), const QDateTime &dueDate=Clock::currentTime().addSecs(1)) | |
| Creates new schedule. | |
| Schedule (const Schedule &other) | |
| ~Schedule () | |
| const Duration & | duration () const |
| const QDateTime & | startDate () const |
| const QDateTime & | dueDate () const |
| void | setDuration (const Duration &duration) |
| void | setStartDate (const QDateTime &startDate) |
| void | setDueDate (const QDateTime &dueDate) |
| Schedule & | operator= (const Schedule &other) |
| bool | operator== (const Schedule &other) const |
Static Public Member Functions | |
| static bool | isValid (const Duration &duration, const QDateTime &startDate, const QDateTime &dueDate) |
Private Attributes | |
|
QSharedDataPointer < SchedulePrivate > | d |
Class that represents a schedule.
A schedule has a start date, a due date and a duration.
Definition at line 26 of file schedule.h.
| domain::Schedule::Schedule | ( | const Duration & | duration = Duration(), |
|
| const QDateTime & | startDate = Clock::currentTime(), |
|||
| const QDateTime & | dueDate = Clock::currentTime().addSecs(1) | |||
| ) |
Creates new schedule.
The newly created schedule will have the given properties
| duration | The duration of the schedule | |
| startDate | The startdate for the schedule | |
| dueDate | The duedate for the schedule |
| InvalidDataException | The duedate falls before startdate + duration |
Definition at line 11 of file schedule.cpp.
| domain::Schedule::Schedule | ( | const Schedule & | other | ) |
Copy constructor.
Definition at line 24 of file schedule.cpp.
| domain::Schedule::~Schedule | ( | ) |
Destructor for the schedule
Definition at line 28 of file schedule.cpp.
| const QDateTime & domain::Schedule::dueDate | ( | ) | const |
Returns the duedate of this schedule
Definition at line 47 of file schedule.cpp.
| const domain::Duration & domain::Schedule::duration | ( | ) | const |
Returns the duration of this schedule
Definition at line 62 of file schedule.cpp.
| bool domain::Schedule::isValid | ( | const Duration & | duration, | |
| const QDateTime & | startDate, | |||
| const QDateTime & | dueDate | |||
| ) | [static] |
Check whether the given combination of startdate, duedate and duration is valid
Definition at line 92 of file schedule.cpp.
| bool domain::Schedule::operator== | ( | const Schedule & | other | ) | const |
Two schedules are equal if their startdate, duedate and duration are equal
Definition at line 40 of file schedule.cpp.
| void domain::Schedule::setDueDate | ( | const QDateTime & | dueDate | ) |
Sets the duedate of this schedule to the given duedate
| duration | The new duedate for this schedule |
Definition at line 52 of file schedule.cpp.
| void domain::Schedule::setDuration | ( | const Duration & | duration | ) |
Sets the duration of this schedule to the given duration
| duration | The new duration for this schedule |
Definition at line 67 of file schedule.cpp.
| void domain::Schedule::setStartDate | ( | const QDateTime & | startDate | ) |
Sets the startdate of this schedule to the given startdate
| duration | The new startdate for this schedule |
Definition at line 82 of file schedule.cpp.
| const QDateTime & domain::Schedule::startDate | ( | ) | const |
Returns the startdate of this schedule
Definition at line 77 of file schedule.cpp.
1.6.3