kplato

KPlato::Project Class Reference

#include <kptproject.h>

Inheritance diagram for KPlato::Project:

KPlato::Node

List of all members.


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
DurationgetExpectedDuration ()
DurationgetRandomDuration ()
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)
ResourceGrouptakeResourceGroup (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)
TaskcreateTask (Node *parent)
TaskcreateTask (Task &def, Node *parent)
ResourceGroupgroup (QString id)
Resourceresource (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)
CalendardefaultCalendar ()
QPtrList< Calendarcalendars ()
void addCalendar (Calendar *calendar)
Calendarcalendar (const QString id) const
StandardWorktime * standardWorktime ()
void setStandardWorktime (StandardWorktime *worktime)
bool legalToLink (Node *par, Node *child)
virtual const QDict< Node > & nodeDict ()
virtual NodefindNode (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)
ResourceGroupfindResourceGroup (const QString &id) const
bool removeResourceGroupId (const QString &id)
void insertResourceGroupId (const QString &id, const ResourceGroup *group)
ResourcefindResource (const QString &id) const
bool removeResourceId (const QString &id)
void insertResourceId (const QString &id, const Resource *resource)
virtual CalendarfindCalendar (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())
Accountsaccounts ()
virtual void setCurrentSchedule (long id)
MainSchedulecreateSchedule (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< ResourceGroupm_resourceGroups
QPtrList< Calendarm_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 (  ) 

Calculate current schedule.

Definition at line 91 of file kptproject.cc.

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  ) 

Returns the resourcegroup with identity id.

Definition at line 816 of file kptproject.cc.

Resource * KPlato::Project::resource ( QString  id  ) 

Returns the resource with identity id.

Definition at line 820 of file kptproject.cc.

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]

Actual cost on date.

Reimplemented from KPlato::Node.

Definition at line 941 of file kptproject.cc.

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

Returns the calendar with identity id.

Definition at line 967 of file kptproject.cc.

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.

bool KPlato::Project::legalToLink ( Node par,
Node child 
) [virtual]

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  ) 

Create a unique id.

Definition at line 780 of file kptproject.cc.

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]

Insert the resourcegroup with identity id.

Definition at line 192 of file kptproject.h.

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]

Insert the resource with identity id.

Definition at line 201 of file kptproject.h.

virtual Calendar* KPlato::Project::findCalendar ( const QString &  id  )  const [inline, virtual]

Find the calendar with identity id.

Definition at line 205 of file kptproject.h.

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]

Insert the calendar with identity id.

Definition at line 1076 of file kptproject.cc.

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]

Generate WBS.

Reimplemented from KPlato::Node.

Definition at line 1040 of file kptproject.cc.

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 
)

Create new schedule with unique id.

Definition at line 1060 of file kptproject.cc.

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:
KDE Home | KDE Accessibility Home | Description of Access Keys