kplato

KPlato::Project Class Reference

Project is the main node in a project, it contains child nodes and possibly sub-projects. More...

#include <kptproject.h>

Inheritance diagram for KPlato::Project:

List of all members.

Public Slots

void setMaxProgress (int max, ScheduleManager *sm=0)
void setProgress (int progress, ScheduleManager *sm=0)

Signals

void calendarAdded (const Calendar *cal)
void calendarChanged (Calendar *cal)
void calendarRemoved (const Calendar *cal)
void calendarToBeAdded (const Calendar *cal, int row)
void calendarToBeRemoved (const Calendar *cal)
void changed ()
void currentScheduleChanged ()
void defaultCalendarChanged (Calendar *cal)
void localeChanged ()
void maxProgress (int)
void nodeAdded (Node *)
void nodeChanged (Node *)
void nodeMoved (Node *)
void nodeRemoved (Node *)
void nodeToBeAdded (Node *, int)
void nodeToBeMoved (Node *)
void nodeToBeRemoved (Node *)
void projectCalculated (ScheduleManager *sm)
void relationAdded (Relation *rel)
void relationModified (Relation *rel)
void relationRemoved (Relation *rel)
void relationToBeAdded (Relation *rel, int parentIndex, int childIndex)
void relationToBeRemoved (Relation *rel)
void resourceAdded (const Resource *resource)
void resourceChanged (Resource *resource)
void resourceGroupAdded (const ResourceGroup *group)
void resourceGroupChanged (ResourceGroup *group)
void resourceGroupRemoved (const ResourceGroup *group)
void resourceGroupToBeAdded (const ResourceGroup *group, int row)
void resourceGroupToBeRemoved (const ResourceGroup *group)
void resourceRemoved (const Resource *resource)
void resourceToBeAdded (const ResourceGroup *group, int row)
void resourceToBeRemoved (const Resource *resource)
void scheduleAdded (const MainSchedule *sch)
void scheduleChanged (MainSchedule *sch)
void scheduleManagerAdded (const ScheduleManager *sch)
void scheduleManagerChanged (ScheduleManager *sch)
void scheduleManagerRemoved (const ScheduleManager *sch)
void scheduleManagerToBeAdded (const ScheduleManager *sch, int row)
void scheduleManagerToBeRemoved (const ScheduleManager *sch)
void scheduleRemoved (const MainSchedule *sch)
void scheduleToBeAdded (const ScheduleManager *manager, int row)
void scheduleToBeRemoved (const MainSchedule *sch)
void sigCalculationFinished (Project *project, ScheduleManager *sm)
void sigProgress (int)
void standardWorktimeChanged (StandardWorktime *)
void wbsDefinitionChanged ()

Public Member Functions

 Project (ConfigBase &config, Node *parent=0)
 Project (Node *parent=0)
 ~Project ()
const Accountsaccounts () const
Accountsaccounts ()
virtual double actualCost (const QDate &date) const
virtual double actualCost () const
virtual EffortCost actualCostTo (const QDate &date) const
virtual Duration actualEffort (const QDate &date) const
virtual Duration actualEffort () const
virtual EffortCostMap actualEffortCostPrDay (const Resource *resource, const QDate &start, const QDate &end, long id=-1) const
virtual EffortCostMap actualEffortCostPrDay (const QDate &start, const QDate &end, long id=-1) const
virtual Duration actualEffortTo (const QDate &date) const
void addCalendar (Calendar *calendar, Calendar *parent=0)
void addMainSchedule (MainSchedule *schedule)
bool addRelation (Relation *rel, bool check=true)
void addResource (ResourceGroup *group, Resource *resource, int index=-1)
virtual void addResourceGroup (ResourceGroup *resource, int index=-1)
void addScheduleManager (ScheduleManager *sm, ScheduleManager *parent=0)
bool addSubTask (Node *task, int index, Node *parent, bool emitSignal=true)
bool addSubTask (Node *task, Node *parent)
bool addTask (Node *task, Node *position)
void adjustSummarytask ()
QList< Calendar * > allCalendars () const
QList< Node * > allNodes ()
QList< ScheduleManager * > allScheduleManagers () const
virtual double bcwp (const QDate &date, long id=BASELINESCHEDULE) const
virtual double bcwp (long id=BASELINESCHEDULE) const
virtual double bcws (const QDate &date, long id=BASELINESCHEDULE) const
virtual double budgetedCostPerformed (const QDate &date, long id=CURRENTSCHEDULE) const
virtual Duration budgetedWorkPerformed (const QDate &date, long id=CURRENTSCHEDULE) const
void calcCriticalPathList (MainSchedule *cs, Node *node)
void calcCriticalPathList (MainSchedule *cs)
void calculate (ScheduleManager &sm, const DateTime &dt)
void calculate (ScheduleManager &sm)
Calendarcalendar (const QString &id) const
CalendarcalendarAt (int index) const
CalendarcalendarByName (const QString &name) const
int calendarCount () const
QStringList calendarNames () const
const QList< Calendar * > & calendars () const
bool canIndentTask (Node *node)
bool canMoveTask (Node *node, Node *newParent)
bool canMoveTaskDown (Node *node)
bool canMoveTaskUp (Node *node)
bool canUnindentTask (Node *node)
void changed (MainSchedule *sch)
void changed (ScheduleManager *sm)
void changed (Resource *resource)
void changed (ResourceGroup *group)
void changed (StandardWorktime *)
void changed (Calendar *cal)
const ConfigBaseconfig () const
MainSchedulecreateSchedule (const QString &name, Schedule::Type type)
MainSchedulecreateSchedule ()
ScheduleManagercreateScheduleManager (const QString name)
ScheduleManagercreateScheduleManager ()
TaskcreateTask (const Task &def, Node *parent)
TaskcreateTask (Node *parent)
QList< Node * > criticalPath (long id=CURRENTSCHEDULE, int index=0)
const QList< QList< Node * > > * criticalPathList (long id=CURRENTSCHEDULE)
CalendardefaultCalendar () const
void deref ()
Duration duration (long id=-1) const
double effortPerformanceIndex (const QDate &date, long id) const
void emitLocaleChanged ()
void emitMaxProgress (int value)
virtual DateTime endTime (long id=-1) const
virtual CalendarfindCalendar (const QString &id) const
virtual NodefindNode (const QString &id) const
ResourcefindResource (const QString &id) const
ResourceGroupfindResourceGroup (const QString &id) const
ScheduleManagerfindScheduleManager (const QString &name) const
void finishCalculation (ScheduleManager &sm)
QList< Node * > flatNodeList (Node *parent=0)
void generateUniqueIds ()
void generateUniqueNodeIds ()
virtual QString generateWBSCode (QList< int > &indexes) const
DurationgetRandomDuration ()
ResourceGroupgroup (const QString &id)
ResourceGroupgroupByName (const QString &name) const
void incProgress ()
bool indentTask (Node *node, int index=-1)
int indexOf (const ScheduleManager *sm) const
int indexOf (const Calendar *calendar) const
int indexOf (ResourceGroup *resource) const
void initiateCalculation (MainSchedule &sch)
void initiateCalculationLists (MainSchedule &sch)
virtual void insertCalendarId (const QString &id, Calendar *calendar)
void insertResourceGroupId (const QString &id, ResourceGroup *group)
void insertResourceId (const QString &id, Resource *resource)
bool isBaselined (long id=ANYSCHEDULED) const
bool isScheduleManager (void *ptr) const
bool legalToLink (const Node *par, const Node *child) const
bool linkExists (const Node *par, const Node *child) const
virtual bool load (KoXmlElement &element, XMLLoaderObject &status)
const KLocale * locale () const
KLocale * locale ()
void moveResource (ResourceGroup *group, Resource *resource)
bool moveTask (Node *node, Node *newParent, int newPos)
bool moveTaskDown (Node *node)
bool moveTaskUp (Node *node)
int nodeCount () const
virtual const QHash< QString,
Node * > & 
nodeDict ()
bool nodeIdentExists (const QString &id) const
int numResourceGroups () const
int numScheduleManagers () const
virtual double plannedCost (const QDate &date, long id=-1) const
virtual EffortCost plannedCost (long id=CURRENTSCHEDULE) const
virtual double plannedCostTo (const QDate &date, long id=-1) const
virtual Duration plannedEffort (const QDate &date, long id=-1) const
virtual Duration plannedEffort (long id=-1) const
virtual EffortCostMap plannedEffortCostPrDay (const Resource *resource, const QDate &start, const QDate &end, long id=CURRENTSCHEDULE) const
virtual EffortCostMap plannedEffortCostPrDay (const QDate &start, const QDate &end, long id=-1) const
virtual Duration plannedEffortTo (const QDate &date, long id=-1) const
void printCalendarDebug (const QByteArray &indent="")
void printDebug (bool children, const QByteArray &indent)
void ref ()
bool registerNodeId (Node *node)
virtual bool removeCalendarId (const QString &id)
virtual bool removeId (const QString &id)
bool removeResourceGroupId (const QString &id)
bool removeResourceId (const QString &id)
virtual void reserveId (const QString &id, Node *node)
Resourceresource (const QString &id)
ResourceresourceByName (const QString &name) const
ResourceGroupresourceGroupAt (int pos) const
int resourceGroupCount () const
QList< ResourceGroup * > & resourceGroups ()
QList< Resource * > resourceList () const
QStringList resourceNameList () const
virtual void save (QDomElement &element) const
void saveWorkPackageXML (QDomElement &element, const Node *node, long id) const
ScheduleManagerscheduleManager (long id) const
QList< ScheduleManager * > scheduleManagers () const
double schedulePerformanceIndex (const QDate &date, long id) const
const QMap< QString,
SchedulerPlugin * > & 
schedulerPlugins () const
void sendScheduleAdded (const MainSchedule *sch)
void sendScheduleRemoved (const MainSchedule *sch)
void sendScheduleToBeAdded (const ScheduleManager *manager, int row)
void sendScheduleToBeRemoved (const MainSchedule *sch)
bool setCalendarId (Calendar *calendar)
void setConfig (ConfigBase *config)
virtual void setCurrentSchedule (long id)
void setDefaultCalendar (Calendar *cal)
virtual void setParentSchedule (Schedule *sch)
void setRelationLag (Relation *relation, const Duration &lag)
void setRelationType (Relation *relation, Relation::Type type)
bool setResourceGroupId (ResourceGroup *group)
bool setResourceId (Resource *resource)
void setSchedulerPlugins (const QMap< QString, SchedulerPlugin * > &plugins)
void setStandardWorktime (StandardWorktime *worktime)
void setTimeZone (const KTimeZone &tz)
void setWbsDefinition (const WBSDefinition &def)
StandardWorktimestandardWorktime ()
virtual DateTime startTime (long id=-1) const
void takeCalendar (Calendar *calendar)
void takeRelation (Relation *rel)
ResourcetakeResource (ResourceGroup *group, Resource *resource)
ResourceGrouptakeResourceGroup (ResourceGroup *resource)
int takeScheduleManager (ScheduleManager *sm)
void takeTask (Node *node, bool emitSignal=true)
const TasktaskDefaults () const
const KDateTime::Spec & timeSpec () const
KTimeZone timeZone () const
virtual int type () const
bool unindentTask (Node *node)
QString uniqueCalendarId () const
QString uniqueNodeId (const QList< QString > &existingIds, int seed=1)
QString uniqueNodeId (int seed=1) const
QString uniqueResourceGroupId () const
QString uniqueResourceId () const
QString uniqueScheduleName () const
WBSDefinitionwbsDefinition ()

Protected Member Functions

virtual bool calcCriticalPath (bool fromEnd)
void calculate (const DateTime &dt)
void calculate (Schedule *scedule, const DateTime &dt)
void calculate ()
void calculate (Schedule *scedule)
DateTime calculateBackward (int use)
DateTime calculateForward (int use)
virtual void changed (Node *node)
DateTime checkEndConstraints (const DateTime &dt) const
DateTime checkStartConstraints (const DateTime &dt) const
bool legalChildren (const Node *par, const Node *child) const
bool legalParents (const Node *par, const Node *child) const
DateTime scheduleBackward (const DateTime &latest, int use)
DateTime scheduleForward (const DateTime &earliest, int use)

Protected Attributes

Accounts m_accounts
QList< Calendar * > m_calendars
Calendarm_defaultCalendar
QList< ResourceGroup * > m_resourceGroups
StandardWorktimem_standardWorktime

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.

A note on timezones: To be able to handle resources working in diffierent timezones and to facilitate data exchange with other applications like PIMs or and groupware servers, the project has a timezone that is used for all datetimes in nodes and schedules. By default the local timezone is used.

A resources timezone is defined by the associated calendar.

Note that a projects datetimes are always displayed/modified in the timezone it was originally created, not necessarly in your current local timezone.

Definition at line 75 of file kptproject.h.


Constructor & Destructor Documentation

KPlato::Project::Project ( Node parent = 0  )  [explicit]

Definition at line 50 of file kptproject.cpp.

KPlato::Project::Project ( ConfigBase config,
Node parent = 0 
) [explicit]

Definition at line 61 of file kptproject.cpp.

KPlato::Project::~Project (  ) 

Definition at line 98 of file kptproject.cpp.


Member Function Documentation

const Accounts& KPlato::Project::accounts (  )  const [inline]

Definition at line 396 of file kptproject.h.

Accounts& KPlato::Project::accounts (  )  [inline]

Definition at line 395 of file kptproject.h.

double KPlato::Project::actualCost ( const QDate date  )  const [virtual]

Actual cost on date.

Parameters:
date The cost is calulated for this date (only)
id Identity of the schedule to be used

Reimplemented from KPlato::Node.

Definition at line 1777 of file kptproject.cpp.

double KPlato::Project::actualCost (  )  const [virtual]

Returns the actually reported cost for this project.

Reimplemented from KPlato::Node.

Definition at line 1764 of file kptproject.cpp.

EffortCost KPlato::Project::actualCostTo ( const QDate date  )  const [virtual]

Actual cost up to and including date.

Parameters:
date The cost is calculated from the start of the project upto including date.

Reimplemented from KPlato::Node.

Definition at line 1790 of file kptproject.cpp.

Duration KPlato::Project::actualEffort ( const QDate date  )  const [virtual]

Returns the actual effort on date.

Reimplemented from KPlato::Node.

Definition at line 1702 of file kptproject.cpp.

Duration KPlato::Project::actualEffort (  )  const [virtual]

Returns the actual effort.

Reimplemented from KPlato::Node.

Definition at line 1690 of file kptproject.cpp.

EffortCostMap KPlato::Project::actualEffortCostPrDay ( const Resource resource,
const QDate start,
const QDate end,
long  id = -1 
) const [virtual]

Returns the actual effort and cost pr day used by resource.

Implements KPlato::Node.

Definition at line 1642 of file kptproject.cpp.

EffortCostMap KPlato::Project::actualEffortCostPrDay ( const QDate start,
const QDate end,
long  id = -1 
) const [virtual]

Implements KPlato::Node.

Definition at line 1631 of file kptproject.cpp.

Duration KPlato::Project::actualEffortTo ( const QDate date  )  const [virtual]

Returns the actual effort up to and including date.

Reimplemented from KPlato::Node.

Definition at line 1714 of file kptproject.cpp.

void KPlato::Project::addCalendar ( Calendar calendar,
Calendar parent = 0 
)

Definition at line 1895 of file kptproject.cpp.

void KPlato::Project::addMainSchedule ( MainSchedule schedule  ) 

Add the schedule to the project. A fresh id will be generated for the schedule.

Definition at line 2296 of file kptproject.cpp.

bool KPlato::Project::addRelation ( Relation rel,
bool  check = true 
)

Add a relation between the nodes specified in the relation rel.

Emits signals relationToBeAdded() before the relation is added, and relationAdded() after it has been added.

Parameters:
rel The relation to be added.
check If true, the relation is checked for validity
Returns:
true if successful.

Definition at line 2396 of file kptproject.cpp.

void KPlato::Project::addResource ( ResourceGroup group,
Resource resource,
int  index = -1 
)

Adds the resource to the project and resource group.

Always use this to add resources.

Definition at line 1087 of file kptproject.cpp.

void KPlato::Project::addResourceGroup ( ResourceGroup resource,
int  index = -1 
) [virtual]

Adds the resource group to the project.

Definition at line 1046 of file kptproject.cpp.

void KPlato::Project::addScheduleManager ( ScheduleManager sm,
ScheduleManager parent = 0 
)

Definition at line 2202 of file kptproject.cpp.

bool KPlato::Project::addSubTask ( Node task,
int  index,
Node parent,
bool  emitSignal = true 
)

Add the node task to parent, in position index If parent is zero, it will be added to this project.

Definition at line 1162 of file kptproject.cpp.

bool KPlato::Project::addSubTask ( Node task,
Node parent 
)

Add the node task to the parent.

Definition at line 1156 of file kptproject.cpp.

bool KPlato::Project::addTask ( Node task,
Node position 
)

Add the node task to the project, after node position If postition is zero, it will be added to this project.

Definition at line 1127 of file kptproject.cpp.

void KPlato::Project::adjustSummarytask (  )  [virtual]

Implements KPlato::Node.

Definition at line 646 of file kptproject.cpp.

QList< Calendar * > KPlato::Project::allCalendars (  )  const

Definition at line 1961 of file kptproject.cpp.

QList< Node * > KPlato::Project::allNodes (  ) 

Return a list of all nodes in the project (exluding myself).

Definition at line 1484 of file kptproject.cpp.

QList< ScheduleManager * > KPlato::Project::allScheduleManagers (  )  const

Returns a list of all schedule managers.

Definition at line 2174 of file kptproject.cpp.

double KPlato::Project::bcwp ( const QDate date,
long  id = BASELINESCHEDULE 
) const [virtual]

Budgeted Cost of Work Performed ( up to date ).

Reimplemented from KPlato::Node.

Definition at line 1863 of file kptproject.cpp.

double KPlato::Project::bcwp ( long  id = BASELINESCHEDULE  )  const [virtual]

Budgeted Cost of Work Performed.

Reimplemented from KPlato::Node.

Definition at line 1857 of file kptproject.cpp.

double KPlato::Project::bcws ( const QDate date,
long  id = BASELINESCHEDULE 
) const [virtual]

Budgeted Cost of Work Scheduled ( up to date ).

Reimplemented from KPlato::Node.

Definition at line 1849 of file kptproject.cpp.

double KPlato::Project::budgetedCostPerformed ( const QDate date,
long  id = CURRENTSCHEDULE 
) const [virtual]

Returns the cost planned to be used to reach the actual percent finished.

Reimplemented from KPlato::Node.

Definition at line 1811 of file kptproject.cpp.

Duration KPlato::Project::budgetedWorkPerformed ( const QDate date,
long  id = CURRENTSCHEDULE 
) const [virtual]

Returns the effort planned to be used to reach the actual percent finished.

Implements KPlato::Node.

Definition at line 1801 of file kptproject.cpp.

bool KPlato::Project::calcCriticalPath ( bool  fromEnd  )  [protected, virtual]

Calculate critical path.

Reimplemented from KPlato::Node.

Definition at line 404 of file kptproject.cpp.

void KPlato::Project::calcCriticalPathList ( MainSchedule cs,
Node node 
)

Definition at line 441 of file kptproject.cpp.

void KPlato::Project::calcCriticalPathList ( MainSchedule cs  ) 

Definition at line 426 of file kptproject.cpp.

void KPlato::Project::calculate ( const DateTime dt  )  [protected]

Calculate current schedule from dt (Always calculates forward).

Definition at line 155 of file kptproject.cpp.

void KPlato::Project::calculate ( Schedule scedule,
const DateTime dt 
) [protected]

Re-calculate the schedule from dt.

Definition at line 145 of file kptproject.cpp.

void KPlato::Project::calculate (  )  [protected]

Calculate current schedule.

Definition at line 266 of file kptproject.cpp.

void KPlato::Project::calculate ( Schedule scedule  )  [protected]

Calculate the schedule.

Definition at line 256 of file kptproject.cpp.

void KPlato::Project::calculate ( ScheduleManager sm,
const DateTime dt 
)

Re-calculate the schedules managed by the schedule manager.

Parameters:
sm Schedule manager
dt The datetime from when the schedule shall be re-calculated
void KPlato::Project::calculate ( ScheduleManager sm  ) 

Calculate the schedules managed by the schedule manager.

Parameters:
sm Schedule manager

Definition at line 206 of file kptproject.cpp.

DateTime KPlato::Project::calculateBackward ( int  use  )  [protected, virtual]

Implements KPlato::Node.

Definition at line 577 of file kptproject.cpp.

DateTime KPlato::Project::calculateForward ( int  use  )  [protected, virtual]

Implements KPlato::Node.

Definition at line 548 of file kptproject.cpp.

Calendar * KPlato::Project::calendar ( const QString id  )  const

Returns the calendar with identity id.

Definition at line 1941 of file kptproject.cpp.

void KPlato::Project::calendarAdded ( const Calendar cal  )  [signal]
Calendar* KPlato::Project::calendarAt ( int  index  )  const [inline]

Return the calendar at index, 0 if index out of bounds.

Definition at line 292 of file kptproject.h.

Calendar * KPlato::Project::calendarByName ( const QString name  )  const

Find calendar by name.

Definition at line 1946 of file kptproject.cpp.

void KPlato::Project::calendarChanged ( Calendar cal  )  [signal]
int KPlato::Project::calendarCount (  )  const [inline]

Return number of calendars.

Definition at line 290 of file kptproject.h.

QStringList KPlato::Project::calendarNames (  )  const

Returns a list of all calendars.

Definition at line 1966 of file kptproject.cpp.

void KPlato::Project::calendarRemoved ( const Calendar cal  )  [signal]
const QList< Calendar * > & KPlato::Project::calendars (  )  const

Definition at line 1956 of file kptproject.cpp.

void KPlato::Project::calendarToBeAdded ( const Calendar cal,
int  row 
) [signal]
void KPlato::Project::calendarToBeRemoved ( const Calendar cal  )  [signal]
bool KPlato::Project::canIndentTask ( Node node  ) 

Definition at line 1248 of file kptproject.cpp.

bool KPlato::Project::canMoveTask ( Node node,
Node newParent 
)

Definition at line 1210 of file kptproject.cpp.

bool KPlato::Project::canMoveTaskDown ( Node node  ) 

Definition at line 1367 of file kptproject.cpp.

bool KPlato::Project::canMoveTaskUp ( Node node  ) 

Definition at line 1338 of file kptproject.cpp.

bool KPlato::Project::canUnindentTask ( Node node  ) 

Definition at line 1292 of file kptproject.cpp.

void KPlato::Project::changed ( Node node  )  [protected, virtual]

Definition at line 2323 of file kptproject.cpp.

void KPlato::Project::changed (  )  [virtual, signal]

Emitted when anything in the project is changed (use with care).

Reimplemented from KPlato::Node.

void KPlato::Project::changed ( MainSchedule sch  ) 

Definition at line 2346 of file kptproject.cpp.

void KPlato::Project::changed ( ScheduleManager sm  ) 

Definition at line 2340 of file kptproject.cpp.

void KPlato::Project::changed ( Resource resource  ) 

Definition at line 2378 of file kptproject.cpp.

void KPlato::Project::changed ( ResourceGroup group  ) 

Definition at line 2333 of file kptproject.cpp.

void KPlato::Project::changed ( StandardWorktime w  ) 

Definition at line 2390 of file kptproject.cpp.

void KPlato::Project::changed ( Calendar cal  ) 

Definition at line 2384 of file kptproject.cpp.

DateTime KPlato::Project::checkEndConstraints ( const DateTime dt  )  const [protected]

Definition at line 530 of file kptproject.cpp.

DateTime KPlato::Project::checkStartConstraints ( const DateTime dt  )  const [protected]

Definition at line 512 of file kptproject.cpp.

const ConfigBase& KPlato::Project::config (  )  const [inline]

Definition at line 485 of file kptproject.h.

MainSchedule * KPlato::Project::createSchedule ( const QString name,
Schedule::Type  type 
)

Create new schedule with unique id.

Definition at line 2286 of file kptproject.cpp.

MainSchedule* KPlato::Project::createSchedule (  ) 

Create new schedule with unique name and id of type Expected.

ScheduleManager * KPlato::Project::createScheduleManager ( const QString  name  ) 

Definition at line 2259 of file kptproject.cpp.

ScheduleManager * KPlato::Project::createScheduleManager (  ) 

Definition at line 2266 of file kptproject.cpp.

Task * KPlato::Project::createTask ( const Task def,
Node parent 
)

Create a copy of def with a unique id with its parent set to parent.

The task is not added to the parent. Do this with addSubTask().

Definition at line 1403 of file kptproject.cpp.

Task * KPlato::Project::createTask ( Node parent  ) 

Create a task with a unique id with its parent set to parent.

The task is not added to the parent. Do this with addSubTask().

Definition at line 1395 of file kptproject.cpp.

QList< Node * > KPlato::Project::criticalPath ( long  id = CURRENTSCHEDULE,
int  index = 0 
)

Definition at line 474 of file kptproject.cpp.

const QList< QList< Node * > > * KPlato::Project::criticalPathList ( long  id = CURRENTSCHEDULE  ) 

Returns the list of critical paths for schedule id.

Definition at line 459 of file kptproject.cpp.

void KPlato::Project::currentScheduleChanged (  )  [signal]

Emitted when the pointer to the current schedule has been changed.

Calendar* KPlato::Project::defaultCalendar (  )  const [inline]

Definition at line 275 of file kptproject.h.

void KPlato::Project::defaultCalendarChanged ( Calendar cal  )  [signal]

Emitted when the the default calendar pointer has changed cal The new default calendar.

May be 0.

void KPlato::Project::deref (  ) 

De-reference this project. Deletes project of ref count <= 0.

Definition at line 89 of file kptproject.cpp.

Duration KPlato::Project::duration ( long  id = -1  )  const

Returns the calculated duration for schedule id.

Reimplemented from KPlato::Node.

Definition at line 501 of file kptproject.cpp.

double KPlato::Project::effortPerformanceIndex ( const QDate ,
long   
) const [virtual]

Effort based performance index.

Reimplemented from KPlato::Node.

Definition at line 1821 of file kptproject.cpp.

void KPlato::Project::emitLocaleChanged (  ) 

Signal that locale data has changed.

Definition at line 2455 of file kptproject.cpp.

void KPlato::Project::emitMaxProgress ( int  value  ) 

Definition at line 399 of file kptproject.cpp.

DateTime KPlato::Project::endTime ( long  id = -1  )  const [virtual]

Return the scheduled end time.

Reimplemented from KPlato::Node.

Definition at line 495 of file kptproject.cpp.

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

Find the calendar with identity id.

Definition at line 374 of file kptproject.h.

Node * KPlato::Project::findNode ( const QString id  )  const [virtual]

Find the node with identity id.

Reimplemented from KPlato::Node.

Definition at line 1411 of file kptproject.cpp.

Resource* KPlato::Project::findResource ( const QString id  )  const [inline]

Definition at line 358 of file kptproject.h.

ResourceGroup* KPlato::Project::findResourceGroup ( const QString id  )  const [inline]

Definition at line 335 of file kptproject.h.

ScheduleManager * KPlato::Project::findScheduleManager ( const QString name  )  const

Definition at line 2161 of file kptproject.cpp.

void KPlato::Project::finishCalculation ( ScheduleManager sm  ) 

Definition at line 365 of file kptproject.cpp.

QList< Node * > KPlato::Project::flatNodeList ( Node parent = 0  ) 

Returns a flat list af all nodes.

Definition at line 2435 of file kptproject.cpp.

void KPlato::Project::generateUniqueIds (  ) 

Definition at line 124 of file kptproject.cpp.

void KPlato::Project::generateUniqueNodeIds (  ) 

Definition at line 114 of file kptproject.cpp.

QString KPlato::Project::generateWBSCode ( QList< int > &  indexes  )  const [virtual]

Generate WBS Code.

Reimplemented from KPlato::Node.

Definition at line 2119 of file kptproject.cpp.

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 507 of file kptproject.cpp.

ResourceGroup * KPlato::Project::group ( const QString id  ) 

Returns the resourcegroup with identity id.

Definition at line 1525 of file kptproject.cpp.

ResourceGroup * KPlato::Project::groupByName ( const QString name  )  const

Returns the resource group with the matching name, 0 if no match is found.

Definition at line 1530 of file kptproject.cpp.

void KPlato::Project::incProgress (  ) 

Definition at line 393 of file kptproject.cpp.

bool KPlato::Project::indentTask ( Node node,
int  index = -1 
)

Definition at line 1280 of file kptproject.cpp.

int KPlato::Project::indexOf ( const ScheduleManager sm  )  const [inline]

Definition at line 419 of file kptproject.h.

int KPlato::Project::indexOf ( const Calendar calendar  )  const

Definition at line 1936 of file kptproject.cpp.

int KPlato::Project::indexOf ( ResourceGroup resource  )  const [inline]

Definition at line 175 of file kptproject.h.

void KPlato::Project::initiateCalculation ( MainSchedule sch  )  [virtual]

Reimplemented from KPlato::Node.

Definition at line 658 of file kptproject.cpp.

void KPlato::Project::initiateCalculationLists ( MainSchedule sch  )  [virtual]

Implements KPlato::Node.

Definition at line 671 of file kptproject.cpp.

void KPlato::Project::insertCalendarId ( const QString id,
Calendar calendar 
) [virtual]

Insert the calendar with identity id.

Definition at line 2317 of file kptproject.cpp.

void KPlato::Project::insertResourceGroupId ( const QString id,
ResourceGroup group 
) [inline]

Insert the resourcegroup with identity id.

Definition at line 349 of file kptproject.h.

void KPlato::Project::insertResourceId ( const QString id,
Resource resource 
)

Insert the resource with identity id.

Definition at line 1542 of file kptproject.cpp.

bool KPlato::Project::isBaselined ( long  id = ANYSCHEDULED  )  const

Return true if schedule with identity id is baselined.

Definition at line 2272 of file kptproject.cpp.

bool KPlato::Project::isScheduleManager ( void *  ptr  )  const

Definition at line 2245 of file kptproject.cpp.

bool KPlato::Project::legalChildren ( const Node par,
const Node child 
) const [protected]

Definition at line 2090 of file kptproject.cpp.

bool KPlato::Project::legalParents ( const Node par,
const Node child 
) const [protected]

Definition at line 2072 of file kptproject.cpp.

bool KPlato::Project::legalToLink ( const Node par,
const Node child 
) const

Check if node par can be linked to node child.

Definition at line 2042 of file kptproject.cpp.

bool KPlato::Project::linkExists ( const Node par,
const Node child 
) const

Check if a link exists between node par and child.

Definition at line 2029 of file kptproject.cpp.

bool KPlato::Project::load ( KoXmlElement &  element,
XMLLoaderObject status 
) [virtual]

Reimplemented from KPlato::Node.

Definition at line 685 of file kptproject.cpp.

const KLocale* KPlato::Project::locale (  )  const [inline]

Return locale. (Used for currency, everything else is from KGlobal::locale).

Definition at line 494 of file kptproject.h.

KLocale* KPlato::Project::locale (  )  [inline]

Return locale. (Used for currency, everything else is from KGlobal::locale).

Definition at line 492 of file kptproject.h.

void KPlato::Project::localeChanged (  )  [signal]

Emitted when locale data has changed.

void KPlato::Project::maxProgress ( int   )  [signal]
void KPlato::Project::moveResource ( ResourceGroup group,
Resource resource 
)

Move resource to the new group. Requests are removed.

Definition at line 1116 of file kptproject.cpp.

bool KPlato::Project::moveTask ( Node node,
Node newParent,
int  newPos 
)

Definition at line 1226 of file kptproject.cpp.

bool KPlato::Project::moveTaskDown ( Node node  ) 

Definition at line 1386 of file kptproject.cpp.

bool KPlato::Project::moveTaskUp ( Node node  ) 

Definition at line 1358 of file kptproject.cpp.

void KPlato::Project::nodeAdded ( Node  )  [signal]

This signal is emitted when the node has been added to the project.

void KPlato::Project::nodeChanged ( Node  )  [signal]

This signal is emitted when one of the nodes members is changed.

int KPlato::Project::nodeCount (  )  const [inline]

Return the number of all nodes in the project (exluding myself).

Definition at line 313 of file kptproject.h.

virtual const QHash<QString, Node*>& KPlato::Project::nodeDict (  )  [inline, virtual]

Definition at line 309 of file kptproject.h.

bool KPlato::Project::nodeIdentExists ( const QString id  )  const

Check if node id is used.

Definition at line 1422 of file kptproject.cpp.

void KPlato::Project::nodeMoved ( Node  )  [signal]

This signal is emitted when the node has been moved up, moved down, indented or unindented.

void KPlato::Project::nodeRemoved ( Node  )  [signal]

This signal is emitted when the node has been removed from the project.

void KPlato::Project::nodeToBeAdded ( Node ,
int   
) [signal]

This signal is emitted when the node is to be added to the project.

void KPlato::Project::nodeToBeMoved ( Node  )  [signal]

This signal is emitted when the node is to be moved up, moved down, indented or unindented.

void KPlato::Project::nodeToBeRemoved ( Node  )  [signal]

This signal is emitted when the node is to be removed from the project.

int KPlato::Project::numResourceGroups (  )  const [inline]

Definition at line 177 of file kptproject.h.

int KPlato::Project::numScheduleManagers (  )  const [inline]

Definition at line 418 of file kptproject.h.

double KPlato::Project::plannedCost ( const QDate date,
long  id = -1 
) const [virtual]

Planned cost on date.

Parameters:
date The cost is calulated for this date (only)
id Identity of the schedule to be used

Reimplemented from KPlato::Node.

Definition at line 1739 of file kptproject.cpp.

EffortCost KPlato::Project::plannedCost ( long  id = CURRENTSCHEDULE  )  const [virtual]

Returns the total planned cost for this project.

Parameters:
id Identity of the schedule to be used

Reimplemented from KPlato::Node.

Definition at line 1726 of file kptproject.cpp.

double KPlato::Project::plannedCostTo ( const QDate date,
long  id = -1 
) const [virtual]

Planned cost up to and including date.

Parameters:
date The cost is calculated from the start of the project upto including date.
id Identity of the schedule to be used.

Reimplemented from KPlato::Node.

Definition at line 1752 of file kptproject.cpp.

Duration KPlato::Project::plannedEffort ( const QDate date,
long  id = -1 
) const [virtual]

Returns the total planned effort for this project (or subproject) on date.

Reimplemented from KPlato::Node.

Definition at line 1666 of file kptproject.cpp.

Duration KPlato::Project::plannedEffort ( long  id = -1  )  const [virtual]

Returns the total planned effort for this project (or subproject).

Reimplemented from KPlato::Node.

Definition at line 1654 of file kptproject.cpp.

EffortCostMap KPlato::Project::plannedEffortCostPrDay ( const Resource resource,
const QDate start,
const QDate end,
long  id = CURRENTSCHEDULE 
) const [virtual]

Implements KPlato::Node.

Definition at line 1620 of file kptproject.cpp.

EffortCostMap KPlato::Project::plannedEffortCostPrDay ( const QDate start,
const QDate end,
long  id = -1 
) const [virtual]

Implements KPlato::Node.

Definition at line 1609 of file kptproject.cpp.

Duration KPlato::Project::plannedEffortTo ( const QDate date,
long  id = -1 
) const [virtual]

Returns the planned effort up to and including date.

Reimplemented from KPlato::Node.

Definition at line 1678 of file kptproject.cpp.

void KPlato::Project::printCalendarDebug ( const QByteArray indent = ""  ) 

Definition at line 2472 of file kptproject.cpp.

void KPlato::Project::printDebug ( bool  children,
const QByteArray indent 
) [virtual]

Reimplemented from KPlato::Node.

Definition at line 2461 of file kptproject.cpp.

void KPlato::Project::projectCalculated ( ScheduleManager sm  )  [signal]

Emitted when a schedule has been calculated.

void KPlato::Project::ref (  )  [inline]

Reference this project.

Definition at line 84 of file kptproject.h.

bool KPlato::Project::registerNodeId ( Node node  ) 

Register node. The nodes id must be unique and non-empty.

Definition at line 1463 of file kptproject.cpp.

void KPlato::Project::relationAdded ( Relation rel  )  [signal]

Emitted when the relation rel has been added.

void KPlato::Project::relationModified ( Relation rel  )  [signal]

Emitted when the relation rel has been modified.

void KPlato::Project::relationRemoved ( Relation rel  )  [signal]

Emitted when the relation rel has been removed.

void KPlato::Project::relationToBeAdded ( Relation rel,
int  parentIndex,
int  childIndex 
) [signal]

Emitted when the relation rel is about to be added.

void KPlato::Project::relationToBeRemoved ( Relation rel  )  [signal]

Emitted when the relation rel is about to be removed.

bool KPlato::Project::removeCalendarId ( const QString id  )  [virtual]

Remove the calendar with identity id from the register.

Definition at line 2311 of file kptproject.cpp.

bool KPlato::Project::removeId ( const QString id  )  [virtual]

Remove the node with identity id from the registers.

Reimplemented from KPlato::Node.

Definition at line 1447 of file kptproject.cpp.

bool KPlato::Project::removeResourceGroupId ( const QString id  )  [inline]

Remove the resourcegroup with identity id from the register.

Definition at line 342 of file kptproject.h.

bool KPlato::Project::removeResourceId ( const QString id  ) 

Remove the resource with identity id from the register.

Definition at line 1547 of file kptproject.cpp.

void KPlato::Project::reserveId ( const QString id,
Node node 
) [virtual]

Reserve id for the node.

Definition at line 1457 of file kptproject.cpp.

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

Returns the resource with identity id.

Definition at line 1583 of file kptproject.cpp.

void KPlato::Project::resourceAdded ( const Resource resource  )  [signal]
Resource * KPlato::Project::resourceByName ( const QString name  )  const

Returns the resource with matching name, 0 if no match is found.

Definition at line 1588 of file kptproject.cpp.

void KPlato::Project::resourceChanged ( Resource resource  )  [signal]
void KPlato::Project::resourceGroupAdded ( const ResourceGroup group  )  [signal]
ResourceGroup* KPlato::Project::resourceGroupAt ( int  pos  )  const [inline]

Definition at line 176 of file kptproject.h.

void KPlato::Project::resourceGroupChanged ( ResourceGroup group  )  [signal]
int KPlato::Project::resourceGroupCount (  )  const [inline]

Definition at line 166 of file kptproject.h.

void KPlato::Project::resourceGroupRemoved ( const ResourceGroup group  )  [signal]
QList< ResourceGroup * > & KPlato::Project::resourceGroups (  ) 

Definition at line 1082 of file kptproject.cpp.

void KPlato::Project::resourceGroupToBeAdded ( const ResourceGroup group,
int  row 
) [signal]
void KPlato::Project::resourceGroupToBeRemoved ( const ResourceGroup group  )  [signal]
QList<Resource*> KPlato::Project::resourceList (  )  const [inline]

Returns a list of all resources.

Definition at line 203 of file kptproject.h.

QStringList KPlato::Project::resourceNameList (  )  const

Definition at line 1600 of file kptproject.cpp.

void KPlato::Project::resourceRemoved ( const Resource resource  )  [signal]
void KPlato::Project::resourceToBeAdded ( const ResourceGroup group,
int  row 
) [signal]
void KPlato::Project::resourceToBeRemoved ( const Resource resource  )  [signal]
void KPlato::Project::save ( QDomElement element  )  const [virtual]

Implements KPlato::Node.

Definition at line 936 of file kptproject.cpp.

void KPlato::Project::saveWorkPackageXML ( QDomElement element,
const Node node,
long  id 
) const

Save a workpackage document containing with schedule identity id.

Definition at line 1005 of file kptproject.cpp.

void KPlato::Project::scheduleAdded ( const MainSchedule sch  )  [signal]
DateTime KPlato::Project::scheduleBackward ( const DateTime latest,
int  use 
) [protected, virtual]

Implements KPlato::Node.

Definition at line 626 of file kptproject.cpp.

void KPlato::Project::scheduleChanged ( MainSchedule sch  )  [signal]
DateTime KPlato::Project::scheduleForward ( const DateTime earliest,
int  use 
) [protected, virtual]

Implements KPlato::Node.

Definition at line 606 of file kptproject.cpp.

ScheduleManager * KPlato::Project::scheduleManager ( long  id  )  const

Definition at line 2151 of file kptproject.cpp.

void KPlato::Project::scheduleManagerAdded ( const ScheduleManager sch  )  [signal]
void KPlato::Project::scheduleManagerChanged ( ScheduleManager sch  )  [signal]
void KPlato::Project::scheduleManagerRemoved ( const ScheduleManager sch  )  [signal]
QList<ScheduleManager*> KPlato::Project::scheduleManagers (  )  const [inline]

Returns a list of all top level schedule managers.

Definition at line 417 of file kptproject.h.

void KPlato::Project::scheduleManagerToBeAdded ( const ScheduleManager sch,
int  row 
) [signal]
void KPlato::Project::scheduleManagerToBeRemoved ( const ScheduleManager sch  )  [signal]
double KPlato::Project::schedulePerformanceIndex ( const QDate ,
long   
) const [virtual]

Schedule performance index.

Reimplemented from KPlato::Node.

Definition at line 1836 of file kptproject.cpp.

void KPlato::Project::scheduleRemoved ( const MainSchedule sch  )  [signal]
const QMap<QString, SchedulerPlugin*>& KPlato::Project::schedulerPlugins (  )  const [inline]

Definition at line 501 of file kptproject.h.

void KPlato::Project::scheduleToBeAdded ( const ScheduleManager manager,
int  row 
) [signal]
void KPlato::Project::scheduleToBeRemoved ( const MainSchedule sch  )  [signal]
void KPlato::Project::sendScheduleAdded ( const MainSchedule sch  ) 

Definition at line 2358 of file kptproject.cpp.

void KPlato::Project::sendScheduleRemoved ( const MainSchedule sch  ) 

Definition at line 2371 of file kptproject.cpp.

void KPlato::Project::sendScheduleToBeAdded ( const ScheduleManager manager,
int  row 
)

Definition at line 2353 of file kptproject.cpp.

void KPlato::Project::sendScheduleToBeRemoved ( const MainSchedule sch  ) 

Definition at line 2365 of file kptproject.cpp.

bool KPlato::Project::setCalendarId ( Calendar calendar  ) 

Set and insert a unique id for calendar.

Definition at line 1975 of file kptproject.cpp.

void KPlato::Project::setConfig ( ConfigBase config  )  [inline]

Set configuration data.

Definition at line 487 of file kptproject.h.

void KPlato::Project::setCurrentSchedule ( long  id  )  [virtual]

Set current schedule to schedule with identity id, for me and my children Note that this is used (and may be changed) when calculating schedules.

Reimplemented from KPlato::Node.

Definition at line 2138 of file kptproject.cpp.

void KPlato::Project::setDefaultCalendar ( Calendar cal  ) 

Definition at line 2006 of file kptproject.cpp.

void KPlato::Project::setMaxProgress ( int  max,
ScheduleManager sm = 0 
) [slot]

Definition at line 385 of file kptproject.cpp.

void KPlato::Project::setParentSchedule ( Schedule sch  )  [virtual]

Set parent schedule for my children.

Reimplemented from KPlato::Node.

Definition at line 1038 of file kptproject.cpp.

void KPlato::Project::setProgress ( int  progress,
ScheduleManager sm = 0 
) [slot]

Definition at line 376 of file kptproject.cpp.

void KPlato::Project::setRelationLag ( Relation relation,
const Duration lag 
)

Modify the lag of the relation.

Definition at line 2428 of file kptproject.cpp.

void KPlato::Project::setRelationType ( Relation relation,
Relation::Type  type 
)

Modify the type of the relation.

Definition at line 2421 of file kptproject.cpp.

bool KPlato::Project::setResourceGroupId ( ResourceGroup group  ) 

Generate, set and insert unique id.

Definition at line 1494 of file kptproject.cpp.

bool KPlato::Project::setResourceId ( Resource resource  ) 

Generate, set and insert unique id.

Definition at line 1552 of file kptproject.cpp.

void KPlato::Project::setSchedulerPlugins ( const QMap< QString, SchedulerPlugin * > &  plugins  ) 

Definition at line 2449 of file kptproject.cpp.

void KPlato::Project::setStandardWorktime ( StandardWorktime worktime  ) 

Definition at line 2019 of file kptproject.cpp.

void KPlato::Project::setTimeZone ( const KTimeZone &  tz  )  [inline]

Set the time zone to be used in this project.

Definition at line 444 of file kptproject.h.

void KPlato::Project::setWbsDefinition ( const WBSDefinition def  ) 

Set WBS Definition to def.

Definition at line 2111 of file kptproject.cpp.

void KPlato::Project::sigCalculationFinished ( Project project,
ScheduleManager sm 
) [signal]
void KPlato::Project::sigProgress ( int   )  [signal]

Use to show progress during calculation.

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 299 of file kptproject.h.

void KPlato::Project::standardWorktimeChanged ( StandardWorktime  )  [signal]

Emitted when the the standard worktime has been changed.

DateTime KPlato::Project::startTime ( long  id = -1  )  const [virtual]

Return the scheduled start time.

Reimplemented from KPlato::Node.

Definition at line 489 of file kptproject.cpp.

void KPlato::Project::takeCalendar ( Calendar calendar  ) 

Definition at line 1916 of file kptproject.cpp.

void KPlato::Project::takeRelation ( Relation rel  ) 

Removes the relation rel without deleting it.

Emits signals relationToBeRemoved() before the relation is removed, and relationRemoved() after it has been removed.

Definition at line 2412 of file kptproject.cpp.

Resource * KPlato::Project::takeResource ( ResourceGroup group,
Resource resource 
)

Removes the resource from the project and resource group.

The resource is not deleted. Always use this to remove resources.

Definition at line 1097 of file kptproject.cpp.

ResourceGroup * KPlato::Project::takeResourceGroup ( ResourceGroup resource  ) 

Removes the resource group resource from the project.

The resource group is not deleted.

Definition at line 1061 of file kptproject.cpp.

int KPlato::Project::takeScheduleManager ( ScheduleManager sm  ) 

Definition at line 2216 of file kptproject.cpp.

void KPlato::Project::takeTask ( Node node,
bool  emitSignal = true 
)

Remove the node.

The node is not deleted.

Definition at line 1188 of file kptproject.cpp.

const Task& KPlato::Project::taskDefaults (  )  const [inline]

Definition at line 489 of file kptproject.h.

const KDateTime::Spec& KPlato::Project::timeSpec (  )  const [inline]

Return the time spec used in this project.

Definition at line 440 of file kptproject.h.

KTimeZone KPlato::Project::timeZone (  )  const [inline]

Return the time zone used in this project.

Definition at line 442 of file kptproject.h.

int KPlato::Project::type (  )  const [virtual]

Returns the node type. Can be Type_Project or Type_Subproject.

Implements KPlato::Node.

Definition at line 112 of file kptproject.cpp.

bool KPlato::Project::unindentTask ( Node node  ) 

Definition at line 1322 of file kptproject.cpp.

QString KPlato::Project::uniqueCalendarId (  )  const

returns a unique calendar id

Definition at line 1998 of file kptproject.cpp.

QString KPlato::Project::uniqueNodeId ( const QList< QString > &  existingIds,
int  seed = 1 
)

Create a unique id.

Definition at line 1438 of file kptproject.cpp.

QString KPlato::Project::uniqueNodeId ( int  seed = 1  )  const

Create a unique id.

Definition at line 1427 of file kptproject.cpp.

QString KPlato::Project::uniqueResourceGroupId (  )  const

returns a unique resourcegroup id

Definition at line 1517 of file kptproject.cpp.

QString KPlato::Project::uniqueResourceId (  )  const

returns a unique resource id

Definition at line 1575 of file kptproject.cpp.

QString KPlato::Project::uniqueScheduleName (  )  const

Definition at line 2184 of file kptproject.cpp.

WBSDefinition & KPlato::Project::wbsDefinition (  ) 

Return reference to WBS Definition.

Definition at line 2106 of file kptproject.cpp.

void KPlato::Project::wbsDefinitionChanged (  )  [signal]

Emitted when the WBS code definition has changed. This may change all nodes.


Member Data Documentation

Definition at line 616 of file kptproject.h.

Definition at line 619 of file kptproject.h.

Definition at line 620 of file kptproject.h.

Definition at line 617 of file kptproject.h.

Definition at line 622 of file kptproject.h.


The documentation for this class was generated from the following files: