kplato

KPlato::Appointment Class Reference

#include <kptappointment.h>

List of all members.


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 ()
Schedulenode () const
void setNode (Schedule *n)
Scheduleresource () const
void setResource (Schedule *r)
DateTime startTime () const
DateTime endTime () const
double maxLoad () const
const DurationrepeatInterval () 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 AppointmentIntervalListintervals () 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)
Appointmentoperator= (const Appointment &app)
Appointmentoperator+= (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 (  ) 

attach appointment to resource and node

Definition at line 589 of file kptappointment.cc.

void KPlato::Appointment::detach (  ) 

detach appointment from resource and node

Definition at line 601 of file kptappointment.cc.

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.

Duration KPlato::Appointment::effort ( const DateTime start,
const DateTime end 
) const

Returns the planned effort from start to end.

Definition at line 612 of file kptappointment.cc.

Duration KPlato::Appointment::effort ( const DateTime start,
const Duration duration 
) const

Returns the planned effort from start for the duration.

Definition at line 621 of file kptappointment.cc.

Duration KPlato::Appointment::effortFrom ( const DateTime time  )  const

Returns the planned effort from time onwards.

Definition at line 630 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

Returns the planned effort on the date.

Definition at line 469 of file kptappointment.cc.

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 523 of file kptappointment.cc.

Duration KPlato::Appointment::actualEffort ( const QDate &  date  )  const

Returns the actual effort on the date.

Definition at line 528 of file kptappointment.cc.

Duration KPlato::Appointment::actualEffortTo ( const QDate &  date  )  const

Returns the actual effort on the date.

Definition at line 533 of file kptappointment.cc.

double KPlato::Appointment::plannedCost (  ) 

Calculates the total planned cost for this appointment.

Definition at line 537 of file kptappointment.cc.

double KPlato::Appointment::plannedCost ( const QDate &  date  ) 

Calculates the planned cost on date.

Definition at line 545 of file kptappointment.cc.

double KPlato::Appointment::plannedCostTo ( const QDate &  date  ) 

Calculates the planned cost upto and including date.

Definition at line 553 of file kptappointment.cc.

double KPlato::Appointment::actualCost (  ) 

Calculates the total actual cost for this appointment.

Definition at line 561 of file kptappointment.cc.

double KPlato::Appointment::actualCost ( const QDate &  date  ) 

Calculates the actual cost on date.

Definition at line 570 of file kptappointment.cc.

double KPlato::Appointment::actualCostTo ( const QDate &  date  ) 

Calculates the actual cost upto and including date.

Definition at line 578 of file kptappointment.cc.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys