kplato
KPlato::Effort Class Reference
#include <kptnode.h>
Detailed Description
Any Node will store how much time it takes to complete the node (typically a Task) in the traditional scheduling software the effort which is needed to complete the node is not simply a timespan but is stored as an optimistic, a pessimistic and an expected timespan.
Definition at line 556 of file kptnode.h.
Public Types | |
enum | Type { Type_Effort = 0, Type_FixedDuration = 1 } |
enum | Risktype { Risk_None, Risk_Low, Risk_High } |
enum | Use { Use_Expected = 0, Use_Optimistic = 1, Use_Pessimistic = 2 } |
Public Member Functions | |
Effort (Duration e=Duration::zeroDuration, Duration p=Duration::zeroDuration, Duration o=Duration::zeroDuration) | |
Effort (double e, double p=0, double o=0) | |
Effort (const Effort &effort) | |
~Effort () | |
Type | type () const |
void | setType (Type type) |
void | setType (QString type) |
QString | typeToString () const |
Risktype | risktype () const |
void | setRisktype (Risktype type) |
void | setRisktype (QString type) |
QString | risktypeToString () const |
Duration | effort (int use) const |
const Duration & | optimistic () const |
const Duration & | pessimistic () const |
const Duration & | expected () const |
void | set (Duration e, Duration p=Duration::zeroDuration, Duration o=Duration::zeroDuration) |
void | set (int e, int p=-1, int o=-1) |
void | set (unsigned days, unsigned hours, unsigned minutes) |
void | expectedEffort (unsigned *days, unsigned *hours, unsigned *minutes) |
bool | load (QDomElement &element) |
void | save (QDomElement &element) const |
void | setOptimisticRatio (int percent) |
int | optimisticRatio () const |
void | setPessimisticRatio (int percent) |
int | pessimisticRatio () const |
Duration | variance () const |
Duration | pertExpected () const |
Duration | pertOptimistic () const |
Duration | pertPessimistic () const |
void | printDebug (QCString indent) |
Static Public Attributes | |
static const Effort | zeroEffort |
Member Function Documentation
void KPlato::Effort::setOptimisticRatio | ( | int | percent | ) |
Set the optimistic duration.
- Parameters:
-
percent should be a negativ value.
Definition at line 920 of file kptnode.cc.
int KPlato::Effort::optimisticRatio | ( | ) | const |
Return the "optimistic" duration as deviation from "expected" in percent.
This should be a negativ value.
Definition at line 926 of file kptnode.cc.
void KPlato::Effort::setPessimisticRatio | ( | int | percent | ) |
Set the pessimistic duration.
- Parameters:
-
percent should be a positive value.
Definition at line 932 of file kptnode.cc.
int KPlato::Effort::pessimisticRatio | ( | ) | const |
Return the "pessimistic" duration as the deviation from "expected" in percent.
This should be a positive value.
Definition at line 937 of file kptnode.cc.
Member Data Documentation
const Effort KPlato::Effort::zeroEffort [static] |
The documentation for this class was generated from the following files: