kplato
KPlato::Project Class Reference
#include <kptproject.h>

Detailed Description
Project is the main node in a project, it contains child nodes and possibly sub-projects.A sub-project is just another instantion of this node however.
Definition at line 52 of file kptproject.h.
Public Member Functions | |
Project (Node *parent=0) | |
virtual int | type () const |
void | calculate (Schedule *scedule) |
void | calculate (Effort::Use use) |
void | calculate () |
virtual bool | calcCriticalPath (bool fromEnd) |
virtual DateTime | startTime () const |
virtual DateTime | endTime () const |
Duration * | getExpectedDuration () |
Duration * | getRandomDuration () |
virtual bool | load (QDomElement &element) |
virtual void | save (QDomElement &element) const |
QPtrList< ResourceGroup > & | resourceGroups () |
virtual void | addResourceGroup (ResourceGroup *resource) |
virtual void | insertResourceGroup (unsigned int index, ResourceGroup *resource) |
void | removeResourceGroup (ResourceGroup *resource) |
void | removeResourceGroup (int number) |
ResourceGroup * | takeResourceGroup (ResourceGroup *resource) |
bool | addTask (Node *task, Node *position) |
bool | addSubTask (Node *task, Node *position) |
bool | addSubTask (Node *task, int index, Node *parent) |
void | delTask (Node *node) |
bool | canIndentTask (Node *node) |
bool | indentTask (Node *node) |
bool | canUnindentTask (Node *node) |
bool | unindentTask (Node *node) |
bool | canMoveTaskUp (Node *node) |
bool | moveTaskUp (Node *node) |
bool | canMoveTaskDown (Node *node) |
bool | moveTaskDown (Node *node) |
Task * | createTask (Node *parent) |
Task * | createTask (Task &def, Node *parent) |
ResourceGroup * | group (QString id) |
Resource * | resource (QString id) |
virtual EffortCostMap | plannedEffortCostPrDay (const QDate &start, const QDate &end) const |
virtual Duration | plannedEffort () |
virtual Duration | plannedEffort (const QDate &date) |
virtual Duration | plannedEffortTo (const QDate &date) |
virtual Duration | actualEffort () |
virtual Duration | actualEffort (const QDate &date) |
virtual Duration | actualEffortTo (const QDate &date) |
virtual double | plannedCost () |
virtual double | plannedCost (const QDate &date) |
virtual double | plannedCostTo (const QDate &date) |
virtual double | actualCost () |
virtual double | actualCost (const QDate &date) |
virtual double | actualCostTo (const QDate &date) |
Calendar * | defaultCalendar () |
QPtrList< Calendar > | calendars () |
void | addCalendar (Calendar *calendar) |
Calendar * | calendar (const QString id) const |
StandardWorktime * | standardWorktime () |
void | setStandardWorktime (StandardWorktime *worktime) |
bool | legalToLink (Node *par, Node *child) |
virtual const QDict< Node > & | nodeDict () |
virtual Node * | findNode (const QString &id) const |
virtual bool | removeId (const QString &id) |
virtual void | insertId (const QString &id, const Node *node) |
bool | registerNodeId (Node *node) |
QString | uniqueNodeId (int seed=1) |
ResourceGroup * | findResourceGroup (const QString &id) const |
bool | removeResourceGroupId (const QString &id) |
void | insertResourceGroupId (const QString &id, const ResourceGroup *group) |
Resource * | findResource (const QString &id) const |
bool | removeResourceId (const QString &id) |
void | insertResourceId (const QString &id, const Resource *resource) |
virtual Calendar * | findCalendar (const QString &id) const |
virtual bool | removeCalendarId (const QString &id) |
virtual void | insertCalendarId (const QString &id, const Calendar *calendar) |
void | setBaselined (bool on) |
bool | isBaselined () const |
void | generateWBS (int count, WBSDefinition &def, QString wbs=QString()) |
Accounts & | accounts () |
virtual void | setCurrentSchedule (long id) |
MainSchedule * | createSchedule (QString name, Schedule::Type type) |
virtual void | setParentSchedule (Schedule *sch) |
void | printDebug (bool children, QCString indent) |
void | printCalendarDebug (QCString indent="") |
Protected Member Functions | |
DateTime | calculateForward (int use) |
DateTime | calculateBackward (int use) |
DateTime | scheduleForward (const DateTime &earliest, int use) |
DateTime | scheduleBackward (const DateTime &latest, int use) |
void | adjustSummarytask () |
void | initiateCalculation (Schedule &sch) |
void | initiateCalculationLists (QPtrList< Node > &startnodes, QPtrList< Node > &endnodes, QPtrList< Node > &summarytasks) |
bool | legalParents (Node *par, Node *child) |
bool | legalChildren (Node *par, Node *child) |
Protected Attributes | |
Accounts | m_accounts |
QPtrList< ResourceGroup > | m_resourceGroups |
QPtrList< Calendar > | m_calendars |
StandardWorktime * | m_standardWorktime |
Member Function Documentation
int KPlato::Project::type | ( | ) | const [virtual] |
Returns the node type. Can be Type_Project or Type_Subproject.
Implements KPlato::Node.
Definition at line 72 of file kptproject.cc.
void KPlato::Project::calculate | ( | Schedule * | scedule | ) |
Calculate the whole project.
- Parameters:
-
schedule Schedule to use
Definition at line 74 of file kptproject.cc.
void KPlato::Project::calculate | ( | Effort::Use | use | ) |
Calculate the whole project.
- Parameters:
-
use Calculate using expected-, optimistic- or pessimistic estimate.
Definition at line 83 of file kptproject.cc.
void KPlato::Project::calculate | ( | ) |
DateTime KPlato::Project::startTime | ( | ) | const [virtual] |
Return the scheduled start time.
Reimplemented from KPlato::Node.
Definition at line 148 of file kptproject.cc.
DateTime KPlato::Project::endTime | ( | ) | const [virtual] |
Return the scheduled end time.
Reimplemented from KPlato::Node.
Definition at line 156 of file kptproject.cc.
Duration * KPlato::Project::getExpectedDuration | ( | ) | [virtual] |
Returns the duration calculated as latestFinish - earliestStart.
Implements KPlato::Node.
Definition at line 164 of file kptproject.cc.
Duration * KPlato::Project::getRandomDuration | ( | ) | [virtual] |
Instead of using the expected duration, generate a random value using the Distribution of each Task.
This can be used for Monte-Carlo estimation of Project duration.
Implements KPlato::Node.
Definition at line 169 of file kptproject.cc.
ResourceGroup * KPlato::Project::group | ( | QString | id | ) |
Resource * KPlato::Project::resource | ( | QString | id | ) |
Duration KPlato::Project::plannedEffort | ( | ) | [virtual] |
Returns the total planned effort for this project (or subproject).
Reimplemented from KPlato::Node.
Definition at line 833 of file kptproject.cc.
Duration KPlato::Project::plannedEffort | ( | const QDate & | date | ) | [virtual] |
Returns the total planned effort for this project (or subproject) on date.
Reimplemented from KPlato::Node.
Definition at line 844 of file kptproject.cc.
Duration KPlato::Project::plannedEffortTo | ( | const QDate & | date | ) | [virtual] |
Returns the planned effort up to and including date.
Reimplemented from KPlato::Node.
Definition at line 855 of file kptproject.cc.
Duration KPlato::Project::actualEffort | ( | ) | [virtual] |
Returns the actual effort.
Reimplemented from KPlato::Node.
Definition at line 866 of file kptproject.cc.
Duration KPlato::Project::actualEffort | ( | const QDate & | date | ) | [virtual] |
Returns the actual effort on date.
Reimplemented from KPlato::Node.
Definition at line 877 of file kptproject.cc.
Duration KPlato::Project::actualEffortTo | ( | const QDate & | date | ) | [virtual] |
Returns the actual effort up to and including date.
Reimplemented from KPlato::Node.
Definition at line 888 of file kptproject.cc.
double KPlato::Project::plannedCost | ( | ) | [virtual] |
Returns the total planned cost for this project.
Reimplemented from KPlato::Node.
Definition at line 898 of file kptproject.cc.
double KPlato::Project::plannedCost | ( | const QDate & | date | ) | [virtual] |
Planned cost on date.
Reimplemented from KPlato::Node.
Definition at line 909 of file kptproject.cc.
double KPlato::Project::plannedCostTo | ( | const QDate & | date | ) | [virtual] |
Planned cost up to and including date.
Reimplemented from KPlato::Node.
Definition at line 920 of file kptproject.cc.
double KPlato::Project::actualCost | ( | ) | [virtual] |
Returns the actually reported cost for this project.
Reimplemented from KPlato::Node.
Definition at line 930 of file kptproject.cc.
double KPlato::Project::actualCost | ( | const QDate & | date | ) | [virtual] |
double KPlato::Project::actualCostTo | ( | const QDate & | date | ) | [virtual] |
Actual cost up to and including date.
Reimplemented from KPlato::Node.
Definition at line 952 of file kptproject.cc.
Calendar * KPlato::Project::calendar | ( | const QString | id | ) | const |
StandardWorktime* KPlato::Project::standardWorktime | ( | ) | [inline] |
Defines the length of days, weeks, months and years and the standard working week.
Used for estimation and calculation of effort, and presentation in gantt chart.
Definition at line 166 of file kptproject.h.
Check if node par can be linked to node child.
Reimplemented from KPlato::Node.
Definition at line 989 of file kptproject.cc.
virtual Node* KPlato::Project::findNode | ( | const QString & | id | ) | const [inline, virtual] |
Find the node with identity id.
Reimplemented from KPlato::Node.
Definition at line 175 of file kptproject.h.
bool KPlato::Project::removeId | ( | const QString & | id | ) | [virtual] |
Remove the node with identity id from the register.
Reimplemented from KPlato::Node.
Definition at line 788 of file kptproject.cc.
void KPlato::Project::insertId | ( | const QString & | id, | |
const Node * | node | |||
) | [virtual] |
Insert the node with identity id.
Reimplemented from KPlato::Node.
Definition at line 793 of file kptproject.cc.
bool KPlato::Project::registerNodeId | ( | Node * | node | ) |
Register node. The nodes id must be unique and non-empty.
Definition at line 798 of file kptproject.cc.
QString KPlato::Project::uniqueNodeId | ( | int | seed = 1 |
) |
bool KPlato::Project::removeResourceGroupId | ( | const QString & | id | ) | [inline] |
Remove the resourcegroup with identity id from the register.
Definition at line 189 of file kptproject.h.
void KPlato::Project::insertResourceGroupId | ( | const QString & | id, | |
const ResourceGroup * | group | |||
) | [inline] |
bool KPlato::Project::removeResourceId | ( | const QString & | id | ) | [inline] |
Remove the resource with identity id from the register.
Definition at line 198 of file kptproject.h.
void KPlato::Project::insertResourceId | ( | const QString & | id, | |
const Resource * | resource | |||
) | [inline] |
virtual Calendar* KPlato::Project::findCalendar | ( | const QString & | id | ) | const [inline, virtual] |
bool KPlato::Project::removeCalendarId | ( | const QString & | id | ) | [virtual] |
Remove the calendar with identity id from the register.
Definition at line 1071 of file kptproject.cc.
void KPlato::Project::insertCalendarId | ( | const QString & | id, | |
const Calendar * | calendar | |||
) | [virtual] |
void KPlato::Project::setBaselined | ( | bool | on | ) | [inline] |
Setting a project to be baselined means the project data can not be edited anymore.
- Parameters:
-
on the new baseline value
Definition at line 216 of file kptproject.h.
bool KPlato::Project::isBaselined | ( | ) | const [inline] |
- Returns:
- if the project is baselined; a baselined project becomes uneditable.
Definition at line 220 of file kptproject.h.
void KPlato::Project::generateWBS | ( | int | count, | |
WBSDefinition & | def, | |||
QString | wbs = QString() | |||
) | [virtual] |
void KPlato::Project::setCurrentSchedule | ( | long | id | ) | [virtual] |
Set current schedule to schedule with identity id, for me and my children.
Reimplemented from KPlato::Node.
Definition at line 1051 of file kptproject.cc.
MainSchedule * KPlato::Project::createSchedule | ( | QString | name, | |
Schedule::Type | type | |||
) |
void KPlato::Project::setParentSchedule | ( | Schedule * | sch | ) | [virtual] |
Set parent schedule for my children.
Reimplemented from KPlato::Node.
Definition at line 526 of file kptproject.cc.
The documentation for this class was generated from the following files: