KPlato::EffortCostMap Class Reference

#include <kpteffortcostmap.h>

List of all members.

Public Member Functions

 EffortCostMap ()
 ~EffortCostMap ()
EffortCost effortCost (const QDate &date) const
void insert (const QDate &date, const Duration &effort, const double cost)
EffortCostadd (const QDate &date, const Duration &effort, const double cost)
EffortCostadd (const QDate &date, const EffortCost &ec)
bool isEmpty () const
EffortCostDayMap days () const
EffortCostMapoperator+= (const EffortCostMap &ec)
EffortCosteffortCostOnDate (const QDate &date)
double cost (const QDate &date, int num=7)
 Return total cost for the next num days starting at date.
double costOnDate (const QDate &date) const
Duration effortOnDate (const QDate &date) const
double totalCost () const
Duration totalEffort () const

Private Member Functions

EffortCostzero ()

Private Attributes

EffortCost m_zero
EffortCostDayMap m_days


Detailed Description

Definition at line 64 of file kpteffortcostmap.h.


Constructor & Destructor Documentation

KPlato::EffortCostMap::EffortCostMap (  )  [inline]

Definition at line 67 of file kpteffortcostmap.h.

KPlato::EffortCostMap::~EffortCostMap (  )  [inline]

Definition at line 71 of file kpteffortcostmap.h.

References m_days.


Member Function Documentation

EffortCost KPlato::EffortCostMap::effortCost ( const QDate &  date  )  const [inline]

Definition at line 76 of file kpteffortcostmap.h.

References m_days.

void KPlato::EffortCostMap::insert ( const QDate &  date,
const Duration effort,
const double  cost 
) [inline]

Definition at line 87 of file kpteffortcostmap.h.

References m_days.

EffortCost& KPlato::EffortCostMap::add ( const QDate &  date,
const Duration effort,
const double  cost 
) [inline]

If data for this date already exists add the new values to the old, else the new values are inserted.

Definition at line 98 of file kpteffortcostmap.h.

Referenced by operator+=(), KPlato::Accounts::plannedCost(), and KPlato::Appointment::plannedPrDay().

EffortCost& KPlato::EffortCostMap::add ( const QDate &  date,
const EffortCost ec 
) [inline]

If data for this date already exists add the new values to the old, else the new value is inserted.

Definition at line 105 of file kpteffortcostmap.h.

References m_days, and zero().

bool KPlato::EffortCostMap::isEmpty (  )  const [inline]

Definition at line 114 of file kpteffortcostmap.h.

References m_days.

Referenced by operator+=().

EffortCostDayMap KPlato::EffortCostMap::days (  )  const [inline]

Definition at line 118 of file kpteffortcostmap.h.

References m_days.

Referenced by operator+=().

EffortCostMap& KPlato::EffortCostMap::operator+= ( const EffortCostMap ec  )  [inline]

Definition at line 120 of file kpteffortcostmap.h.

References add(), days(), isEmpty(), and m_days.

EffortCost& KPlato::EffortCostMap::effortCostOnDate ( const QDate &  date  )  [inline]

Definition at line 135 of file kpteffortcostmap.h.

References m_days.

double KPlato::EffortCostMap::cost ( const QDate &  date,
int  num = 7 
) [inline]

Return total cost for the next num days starting at date.

Definition at line 139 of file kpteffortcostmap.h.

References costOnDate().

Referenced by costOnDate(), KPlato::AccountsView::slotUpdate(), and totalCost().

double KPlato::EffortCostMap::costOnDate ( const QDate &  date  )  const [inline]

Definition at line 146 of file kpteffortcostmap.h.

References cost(), and m_days.

Referenced by cost().

Duration KPlato::EffortCostMap::effortOnDate ( const QDate &  date  )  const [inline]

Definition at line 156 of file kpteffortcostmap.h.

References m_days, and KPlato::Duration::zeroDuration.

Referenced by KPlato::TaskAppointmentsView::slotUpdate(), and KPlato::ResourceAppointmentsView::slotUpdate().

double KPlato::EffortCostMap::totalCost (  )  const [inline]

Definition at line 166 of file kpteffortcostmap.h.

References cost(), and m_days.

Duration KPlato::EffortCostMap::totalEffort (  )  const [inline]

Definition at line 174 of file kpteffortcostmap.h.

References m_days.

EffortCost& KPlato::EffortCostMap::zero (  )  [inline, private]

Definition at line 184 of file kpteffortcostmap.h.

References m_zero.

Referenced by add().


Member Data Documentation

EffortCost KPlato::EffortCostMap::m_zero [private]

Definition at line 187 of file kpteffortcostmap.h.

Referenced by zero().

EffortCostDayMap KPlato::EffortCostMap::m_days [private]

Definition at line 188 of file kpteffortcostmap.h.

Referenced by add(), costOnDate(), days(), effortCost(), effortCostOnDate(), effortOnDate(), insert(), isEmpty(), operator+=(), totalCost(), totalEffort(), and ~EffortCostMap().


The documentation for this class was generated from the following file:
Generated on Wed Nov 22 23:21:49 2006 for KPlato by  doxygen 1.5.1-p1