kplato
KPlato::Appointment Class Reference
#include <kptappointment.h>
Detailed Description
A resource (Resource) can be scheduled to be used at any time, this is represented internally with Appointments There is one Appointment per resource-task pair.An appointment can be devided into several intervals, represented with a list of AppointmentInterval. This list is sorted after 1) startdatetime, 2) enddatetime. The intervals do not overlap, an interval does not start before the previous interval ends. An interval is a countinous time interval with the same load. It can span dates.
Definition at line 126 of file kptappointment.h.
Public Member Functions | |
Appointment () | |
Appointment (Schedule *resource, Schedule *node, DateTime start, DateTime end, double load) | |
Appointment (Schedule *resource, Schedule *node, DateTime start, Duration duration, double load) | |
~Appointment () | |
Schedule * | node () const |
void | setNode (Schedule *n) |
Schedule * | resource () const |
void | setResource (Schedule *r) |
DateTime | startTime () const |
DateTime | endTime () const |
double | maxLoad () const |
const Duration & | repeatInterval () const |
void | setRepeatInterval (Duration ri) |
int | repeatCount () const |
void | setRepeatCount (int rc) |
void | deleteAppointmentFromRepeatList (DateTime time) |
void | addAppointmentToRepeatList (DateTime time) |
bool | isBusy (const DateTime &start, const DateTime &end) |
bool | attach () |
void | detach () |
void | addInterval (AppointmentInterval *a) |
void | addInterval (AppointmentInterval &a) |
void | addInterval (const DateTime &start, const DateTime &end, double load=100) |
void | addInterval (const DateTime &start, const Duration &duration, double load=100) |
const AppointmentIntervalList & | intervals () const |
bool | loadXML (QDomElement &element, Project &project, Schedule &sch) |
void | saveXML (QDomElement &element) const |
EffortCostMap | plannedPrDay (const QDate &start, const QDate &end) const |
Duration | effort (const DateTime &start, const DateTime &end) const |
Duration | effort (const DateTime &start, const Duration &duration) const |
Duration | effortFrom (const DateTime &time) const |
Duration | plannedEffort () const |
Duration | plannedEffort (const QDate &date) const |
Duration | plannedEffortTo (const QDate &date) const |
Duration | actualEffort () const |
Duration | actualEffort (const QDate &date) const |
Duration | actualEffortTo (const QDate &date) const |
double | plannedCost () |
double | plannedCost (const QDate &date) |
double | plannedCostTo (const QDate &date) |
double | actualCost () |
double | actualCost (const QDate &date) |
double | actualCostTo (const QDate &date) |
Appointment & | operator= (const Appointment &app) |
Appointment & | operator+= (const Appointment &app) |
Appointment | operator+ (const Appointment &app) |
void | addActualEffort (QDate date, Duration effort, bool overtime=false) |
void | printDebug (QString ident) |
Member Function Documentation
bool KPlato::Appointment::attach | ( | ) |
void KPlato::Appointment::detach | ( | ) |
EffortCostMap KPlato::Appointment::plannedPrDay | ( | const QDate & | start, | |
const QDate & | end | |||
) | const |
Returns the planned effort and cost for the interval start to end (inclusive).
Only dates with any planned effort is returned.
Definition at line 493 of file kptappointment.cc.
Returns the planned effort from start for the duration.
Definition at line 625 of file kptappointment.cc.
Duration KPlato::Appointment::plannedEffort | ( | ) | const |
Returns the total planned effort for this appointment.
Definition at line 459 of file kptappointment.cc.
Duration KPlato::Appointment::plannedEffort | ( | const QDate & | date | ) | const |
Duration KPlato::Appointment::plannedEffortTo | ( | const QDate & | date | ) | const |
Returns the planned effort upto and including date.
Definition at line 481 of file kptappointment.cc.
Duration KPlato::Appointment::actualEffort | ( | ) | const |
Returns the total actual effort for this appointment.
Definition at line 527 of file kptappointment.cc.
Duration KPlato::Appointment::actualEffort | ( | const QDate & | date | ) | const |
Duration KPlato::Appointment::actualEffortTo | ( | const QDate & | date | ) | const |
double KPlato::Appointment::plannedCost | ( | ) |
Calculates the total planned cost for this appointment.
Definition at line 541 of file kptappointment.cc.
double KPlato::Appointment::plannedCost | ( | const QDate & | date | ) |
double KPlato::Appointment::plannedCostTo | ( | const QDate & | date | ) |
Calculates the planned cost upto and including date.
Definition at line 557 of file kptappointment.cc.
double KPlato::Appointment::actualCost | ( | ) |
Calculates the total actual cost for this appointment.
Definition at line 565 of file kptappointment.cc.
double KPlato::Appointment::actualCost | ( | const QDate & | date | ) |
double KPlato::Appointment::actualCostTo | ( | const QDate & | date | ) |
Calculates the actual cost upto and including date.
Definition at line 582 of file kptappointment.cc.
The documentation for this class was generated from the following files: