kplato

#include <kptnode.h>

Inheritance diagram for KPlato::Node:
KPlato::Project KPlato::Task

Public Types

enum  ConstraintType {
  ASAP , ALAP , MustStartOn , MustFinishOn ,
  StartNotEarlier , FinishNotLater , FixedInterval
}
 
enum  NodeTypes {
  Type_Node = 0 , Type_Project = 1 , Type_Subproject = 2 , Type_Task = 3 ,
  Type_Milestone = 4 , Type_Periodic = 5 , Type_Summarytask = 6
}
 

Public Member Functions

 Node (Node *parent=0)
 
 Node (Node &node, Node *parent=0)
 
bool setId (TQString id)
 
TQString id () const
 
virtual int type () const =0
 
virtual Node * projectNode ()
 
virtual bool load (TQDomElement &)
 
virtual bool load (TQDomElement &, Project &)
 
virtual void save (TQDomElement &element) const =0
 
virtual void saveRelations (TQDomElement &element) const
 
Node * getParent () const
 
void setParent (Node *newParent)
 
const TQPtrList< Node > & childNodeIterator () const
 
int numChildren () const
 
virtual void addChildNode (Node *node, Node *after=0)
 
virtual void insertChildNode (unsigned int index, Node *node)
 
void delChildNode (Node *node, bool remove=true)
 
void delChildNode (int number, bool remove=true)
 
Node * getChildNode (int number)
 
const Node * getChildNode (int number) const
 
int findChildNode (Node *node)
 
int numDependChildNodes () const
 
virtual void addDependChildNode (Node *node, Relation::Type p=Relation::FinishStart)
 
virtual void addDependChildNode (Node *node, Relation::Type p, Duration lag)
 
virtual bool addDependChildNode (Relation *relation)
 
virtual void insertDependChildNode (unsigned int index, Node *node, Relation::Type p=Relation::FinishStart)
 
void delDependChildNode (Node *node, bool remove=false)
 
void delDependChildNode (Relation *rel, bool remove=false)
 
void delDependChildNode (int number, bool remove=false)
 
Relation * getDependChildNode (int number)
 
TQPtrList< Relation > & dependChildNodes ()
 
void takeDependChildNode (Relation *rel)
 
int numDependParentNodes () const
 
virtual void addDependParentNode (Node *node, Relation::Type p=Relation::FinishStart)
 
virtual void addDependParentNode (Node *node, Relation::Type p, Duration lag)
 
virtual bool addDependParentNode (Relation *relation)
 
virtual void insertDependParentNode (unsigned int index, Node *node, Relation::Type p=Relation::FinishStart)
 
void delDependParentNode (Node *node, bool remove=false)
 
void delDependParentNode (Relation *rel, bool remove=false)
 
void delDependParentNode (int number, bool remove=false)
 
Relation * getDependParentNode (int number)
 
TQPtrList< Relation > & dependParentNodes ()
 
void takeDependParentNode (Relation *rel)
 
bool isParentOf (Node *node)
 
bool isDependChildOf (Node *node)
 
Relation * findParentRelation (Node *node)
 
Relation * findChildRelation (Node *node)
 
Relation * findRelation (Node *node)
 
void setStartTime (DateTime startTime)
 
virtual DateTime startTime () const
 
const TQDate & startDate () const
 
void setEndTime (DateTime endTime)
 
virtual DateTime endTime () const
 
const TQDate & endDate () const
 
void setEffort (Effort *e)
 
Effort * effort () const
 
virtual Duration * getExpectedDuration ()=0
 
virtual Duration * getRandomDuration ()=0
 
Duration * getDelay ()
 
DateTime getEarliestStart () const
 
void setEarliestStart (const DateTime &dt)
 
DateTime getLatestFinish () const
 
void setLatestFinish (const DateTime &dt)
 
TQString & name ()
 
TQString & leader ()
 
TQString & description ()
 
const TQString & name () const
 
const TQString & leader () const
 
const TQString & description () const
 
void setName (const TQString &n)
 
void setLeader (const TQString &l)
 
void setDescription (const TQString &d)
 
virtual void setConstraint (Node::ConstraintType type)
 
void setConstraint (TQString &type)
 
int constraint () const
 
TQString constraintToString () const
 
virtual void setConstraintStartTime (TQDateTime time)
 
virtual void setConstraintEndTime (TQDateTime time)
 
virtual DateTime constraintStartTime () const
 
virtual DateTime constraintEndTime () const
 
virtual DateTime startNotEarlier () const
 
virtual DateTime finishNotLater () const
 
virtual DateTime mustStartOn () const
 
virtual DateTime mustFinishOn () const
 
virtual ResourceGroupRequest * resourceRequest (ResourceGroup *) const
 
virtual void makeAppointments ()
 
bool resourceError () const
 
virtual bool resourceOverbooked () const
 
virtual TQStringList overbookedResources () const
 
virtual void calcResourceOverbooked ()
 
bool resourceNotAvailable () const
 
virtual bool schedulingError () const
 
bool notScheduled () const
 
virtual EffortCostMap plannedEffortCostPrDay (const TQDate &start, const TQDate &end) const =0
 
virtual Duration plannedEffort ()
 
virtual Duration plannedEffort (const TQDate &)
 
virtual Duration plannedEffortTo (const TQDate &)
 
virtual Duration actualEffort ()
 
virtual Duration actualEffort (const TQDate &)
 
virtual Duration actualEffortTo (const TQDate &)
 
virtual double plannedCost ()
 
virtual double plannedCost (const TQDate &)
 
virtual double plannedCostTo (const TQDate &)
 
virtual double actualCost ()
 
virtual double actualCost (const TQDate &)
 
virtual double actualCostTo (const TQDate &)
 
double effortPerformanceIndex (const TQDate &, bool *)
 
double costPerformanceIndex (const TQDate &, bool *)
 
virtual void initiateCalculationLists (TQPtrList< Node > &startnodes, TQPtrList< Node > &endnodes, TQPtrList< Node > &summarytasks)=0
 
virtual DateTime calculateForward (int)=0
 
virtual DateTime calculateBackward (int)=0
 
virtual DateTime scheduleForward (const DateTime &, int)=0
 
virtual DateTime scheduleBackward (const DateTime &, int)=0
 
virtual void adjustSummarytask ()=0
 
virtual void initiateCalculation (Schedule &sch)
 
virtual void resetVisited ()
 
void propagateEarliestStart (DateTime &time)
 
void propagateLatestFinish (DateTime &time)
 
void moveEarliestStart (DateTime &time)
 
void moveLatestFinish (DateTime &time)
 
virtual Duration summarytaskDurationForward (const DateTime &)
 
virtual DateTime summarytaskEarliestStart ()
 
virtual Duration summarytaskDurationBackward (const DateTime &)
 
virtual DateTime summarytaskLatestFinish ()
 
const Duration & duration ()
 
Duration duration (const DateTime &time, int use, bool backward)
 
virtual Duration calcDuration (const DateTime &, const Duration &, bool)
 
Node * siblingBefore ()
 
Node * childBefore (Node *node)
 
Node * siblingAfter ()
 
Node * childAfter (Node *node)
 
bool moveChildUp (Node *node)
 
bool moveChildDown (Node *node)
 
bool legalToLink (Node *node)
 
virtual bool legalToLink (Node *, Node *)
 
virtual bool isEndNode () const
 
virtual bool isStartNode () const
 
virtual void clearProxyRelations ()
 
virtual void addParentProxyRelations (TQPtrList< Relation > &)
 
virtual void addChildProxyRelations (TQPtrList< Relation > &)
 
virtual void addParentProxyRelation (Node *, const Relation *)
 
virtual void addChildProxyRelation (Node *, const Relation *)
 
virtual void saveAppointments (TQDomElement &element, long id) const
 
TQPtrList< Appointment > appointments ()
 
virtual bool addAppointment (Appointment *appointment)
 
virtual bool addAppointment (Appointment *appointment, Schedule &main)
 
virtual void addAppointment (ResourceSchedule *resource, DateTime &start, DateTime &end, double load=100)
 
virtual Node * findNode () const
 
virtual Node * findNode (const TQString &id) const
 
virtual bool removeId ()
 
virtual bool removeId (const TQString &id)
 
virtual void insertId (const TQString &id)
 
virtual void insertId (const TQString &id, const Node *node)
 
virtual DateTime workStartTime () const
 
void setWorkStartTime (const DateTime &dt)
 
virtual DateTime workEndTime () const
 
void setWorkEndTime (const DateTime &dt)
 
virtual bool isCritical () const
 
virtual bool inCriticalPath () const
 
virtual bool calcCriticalPath (bool fromEnd)
 
virtual int level ()
 
virtual void generateWBS (int count, WBSDefinition &def, TQString wbs=TQString())
 
TQString wbs () const
 
double startupCost () const
 
void setStartupCost (double cost)
 
Account * startupAccount () const
 
void setStartupAccount (Account *acc)
 
double shutdownCost () const
 
void setShutdownCost (double cost)
 
Account * shutdownAccount () const
 
void setShutdownAccount (Account *acc)
 
Account * runningAccount () const
 
void setRunningAccount (Account *acc)
 
Schedule * currentSchedule () const
 
virtual void setCurrentSchedule (long id)
 
void setCurrentSchedulePtr (Schedule *schedule)
 
TQIntDict< Schedule > & schedules ()
 
Schedule * findSchedule (const TQString name, const Schedule::Type type) const
 
Schedule * findSchedule (const Schedule::Type type) const
 
Schedule * findSchedule (long id) const
 
void takeSchedule (const Schedule *schedule)
 
void addSchedule (Schedule *schedule)
 
Schedule * createSchedule (TQString name, Schedule::Type type, long id)
 
Schedule * createSchedule (Schedule *parent)
 
void setScheduleDeleted (long id, bool onoff)
 
virtual void setParentSchedule (Schedule *sch)
 
DateTime startTime ()
 
DateTime endTime ()
 
virtual void printDebug (bool children, TQCString indent)
 

Protected Attributes

TQPtrList< Node > m_nodes
 
TQPtrList< Relation > m_dependChildNodes
 
TQPtrList< Relation > m_dependParentNodes
 
Node * m_parent
 
TQString m_id
 
TQString m_name
 
TQString m_leader
 
TQString m_description
 
Effort * m_effort
 
ConstraintType m_constraint
 
DateTime m_constraintStartTime
 
DateTime m_constraintEndTime
 
bool m_visitedForward
 
bool m_visitedBackward
 
Duration m_durationForward
 
Duration m_durationBackward
 
TQDate m_dateOnlyStartDate
 
TQDate m_dateOnlyEndDate
 
Duration m_dateOnlyDuration
 
TQIntDict< Schedule > m_schedules
 
Schedule * m_currentSchedule
 
TQString m_wbs
 
double m_startupCost
 
Account * m_startupAccount
 
double m_shutdownCost
 
Account * m_shutdownAccount
 
Account * m_runningAccount
 

Detailed Description

This class represents any node in the project, a node can be a project or a subproject or any task.

This class is basically an abstract interface to make the design more OO.

Definition at line 57 of file kptnode.h.

Member Enumeration Documentation

◆ ConstraintType

enum KPlato::Node::ConstraintType

Definition at line 60 of file kptnode.h.

◆ NodeTypes

enum KPlato::Node::NodeTypes

Definition at line 72 of file kptnode.h.

Constructor & Destructor Documentation

◆ Node() [1/2]

KPlato::Node::Node ( Node *  parent = 0)

Definition at line 37 of file kptnode.cpp.

◆ Node() [2/2]

KPlato::Node::Node ( Node &  node,
Node *  parent = 0 
)

Definition at line 44 of file kptnode.cpp.

◆ ~Node()

KPlato::Node::~Node ( )
pure virtual

Definition at line 71 of file kptnode.cpp.

Member Function Documentation

◆ actualCost() [1/2]

virtual double KPlato::Node::actualCost ( )
inlinevirtual

Actual cost is the sum total of the reported costs actually used for this node.

Reimplemented in KPlato::Project, and KPlato::Task.

Definition at line 313 of file kptnode.h.

◆ actualCost() [2/2]

virtual double KPlato::Node::actualCost ( const TQDate &  )
inlinevirtual

Actual cost on date.

Reimplemented in KPlato::Task, and KPlato::Project.

Definition at line 315 of file kptnode.h.

◆ actualCostTo()

virtual double KPlato::Node::actualCostTo ( const TQDate &  )
inlinevirtual

Actual cost up to and including date.

Reimplemented in KPlato::Task, and KPlato::Project.

Definition at line 317 of file kptnode.h.

◆ actualEffort() [1/2]

virtual Duration KPlato::Node::actualEffort ( )
inlinevirtual

Returns the total actual effort for this task (or subtasks)

Reimplemented in KPlato::Project, and KPlato::Task.

Definition at line 290 of file kptnode.h.

◆ actualEffort() [2/2]

virtual Duration KPlato::Node::actualEffort ( const TQDate &  )
inlinevirtual

Returns the total actual effort for this task (or subtasks) on date.

Reimplemented in KPlato::Project, and KPlato::Task.

Definition at line 292 of file kptnode.h.

◆ actualEffortTo()

virtual Duration KPlato::Node::actualEffortTo ( const TQDate &  )
inlinevirtual

Returns the total actual effort for this task (or subtasks) up to and including date.

Reimplemented in KPlato::Project, and KPlato::Task.

Definition at line 294 of file kptnode.h.

◆ addAppointment() [1/3]

bool KPlato::Node::addAppointment ( Appointment *  appointment)
virtual

Return appointment this node have with resource.

Adds appointment to this node only (not to resource)

Definition at line 636 of file kptnode.cpp.

◆ addAppointment() [2/3]

bool KPlato::Node::addAppointment ( Appointment *  appointment,
Schedule &  main 
)
virtual

Adds appointment to this node only (not to resource)

Definition at line 642 of file kptnode.cpp.

◆ addAppointment() [3/3]

void KPlato::Node::addAppointment ( ResourceSchedule *  resource,
DateTime &  start,
DateTime &  end,
double  load = 100 
)
virtual

Adds appointment to both this node and resource.

Definition at line 652 of file kptnode.cpp.

◆ addChildNode()

void KPlato::Node::addChildNode ( Node *  node,
Node *  after = 0 
)
virtual

Definition at line 150 of file kptnode.cpp.

◆ addChildProxyRelation()

virtual void KPlato::Node::addChildProxyRelation ( Node *  ,
const Relation *   
)
inlinevirtual

Definition at line 383 of file kptnode.h.

◆ addChildProxyRelations()

virtual void KPlato::Node::addChildProxyRelations ( TQPtrList< Relation > &  )
inlinevirtual

Definition at line 381 of file kptnode.h.

◆ addDependChildNode() [1/3]

void KPlato::Node::addDependChildNode ( Node *  node,
Relation::Type  p,
Duration  lag 
)
virtual

Adds relation to both this node and address node.

Definition at line 187 of file kptnode.cpp.

◆ addDependChildNode() [2/3]

void KPlato::Node::addDependChildNode ( Node *  node,
Relation::Type  p = Relation::FinishStart 
)
virtual

Adds relation to both this node and address node.

Definition at line 183 of file kptnode.cpp.

◆ addDependChildNode() [3/3]

bool KPlato::Node::addDependChildNode ( Relation *  relation)
virtual

Adds relation only to this node.

Definition at line 203 of file kptnode.cpp.

◆ addDependParentNode() [1/3]

void KPlato::Node::addDependParentNode ( Node *  node,
Relation::Type  p,
Duration  lag 
)
virtual

Adds relation to both this node and node.

Definition at line 246 of file kptnode.cpp.

◆ addDependParentNode() [2/3]

void KPlato::Node::addDependParentNode ( Node *  node,
Relation::Type  p = Relation::FinishStart 
)
virtual

Adds relation to both this node and node.

Definition at line 242 of file kptnode.cpp.

◆ addDependParentNode() [3/3]

bool KPlato::Node::addDependParentNode ( Relation *  relation)
virtual

Adds relation only to this node.

Definition at line 262 of file kptnode.cpp.

◆ addParentProxyRelation()

virtual void KPlato::Node::addParentProxyRelation ( Node *  ,
const Relation *   
)
inlinevirtual

Definition at line 382 of file kptnode.h.

◆ addParentProxyRelations()

virtual void KPlato::Node::addParentProxyRelations ( TQPtrList< Relation > &  )
inlinevirtual

Definition at line 380 of file kptnode.h.

◆ addSchedule()

void KPlato::Node::addSchedule ( Schedule *  schedule)

Add schedule to list, replace if schedule with same id allready exists.

Definition at line 668 of file kptnode.cpp.

◆ adjustSummarytask()

virtual void KPlato::Node::adjustSummarytask ( )
pure virtual

Implemented in KPlato::Task.

◆ appointments()

TQPtrList< Appointment > KPlato::Node::appointments ( )

Return the list of appointments for current schedule.

Definition at line 624 of file kptnode.cpp.

◆ calcCriticalPath()

bool KPlato::Node::calcCriticalPath ( bool  fromEnd)
virtual

Reimplemented in KPlato::Task.

Definition at line 729 of file kptnode.cpp.

◆ calcDuration()

virtual Duration KPlato::Node::calcDuration ( const DateTime &  ,
const Duration &  ,
bool   
)
inlinevirtual

Reimplemented in KPlato::Task.

Definition at line 362 of file kptnode.h.

◆ calcResourceOverbooked()

void KPlato::Node::calcResourceOverbooked ( )
virtual

Calculates if the assigned resource is overbooked within the duration of this node.

Reimplemented in KPlato::Task.

Definition at line 376 of file kptnode.cpp.

◆ calculateBackward()

virtual DateTime KPlato::Node::calculateBackward ( int  )
pure virtual

Implemented in KPlato::Task.

◆ calculateForward()

virtual DateTime KPlato::Node::calculateForward ( int  )
pure virtual

Implemented in KPlato::Task.

◆ childAfter()

Node * KPlato::Node::childAfter ( Node *  node)

Definition at line 521 of file kptnode.cpp.

◆ childBefore()

Node * KPlato::Node::childBefore ( Node *  node)

Definition at line 505 of file kptnode.cpp.

◆ childNodeIterator()

const TQPtrList< Node > & KPlato::Node::childNodeIterator ( ) const
inline

Definition at line 103 of file kptnode.h.

◆ clearProxyRelations()

virtual void KPlato::Node::clearProxyRelations ( )
inlinevirtual

Definition at line 379 of file kptnode.h.

◆ constraint()

int KPlato::Node::constraint ( ) const
inline

Definition at line 243 of file kptnode.h.

◆ constraintEndTime()

virtual DateTime KPlato::Node::constraintEndTime ( ) const
inlinevirtual

Definition at line 250 of file kptnode.h.

◆ constraintStartTime()

virtual DateTime KPlato::Node::constraintStartTime ( ) const
inlinevirtual

Definition at line 249 of file kptnode.h.

◆ constraintToString()

TQString KPlato::Node::constraintToString ( ) const

Definition at line 418 of file kptnode.cpp.

◆ costPerformanceIndex()

double KPlato::Node::costPerformanceIndex ( const TQDate &  ,
bool *   
)
inline

Cost performance index.

Definition at line 322 of file kptnode.h.

◆ createSchedule() [1/2]

Schedule * KPlato::Node::createSchedule ( Schedule *  parent)

Create a new schedule.

Definition at line 681 of file kptnode.cpp.

◆ createSchedule() [2/2]

Schedule * KPlato::Node::createSchedule ( TQString  name,
Schedule::Type  type,
long  id 
)

Create a new schedule.

Definition at line 674 of file kptnode.cpp.

◆ currentSchedule()

Schedule * KPlato::Node::currentSchedule ( ) const
inline

Definition at line 460 of file kptnode.h.

◆ delChildNode() [1/2]

void KPlato::Node::delChildNode ( int  number,
bool  remove = true 
)

Definition at line 131 of file kptnode.cpp.

◆ delChildNode() [2/2]

void KPlato::Node::delChildNode ( Node *  node,
bool  remove = true 
)

Definition at line 120 of file kptnode.cpp.

◆ delDependChildNode() [1/3]

void KPlato::Node::delDependChildNode ( int  number,
bool  remove = false 
)

Definition at line 229 of file kptnode.cpp.

◆ delDependChildNode() [2/3]

void KPlato::Node::delDependChildNode ( Node *  node,
bool  remove = false 
)

Definition at line 211 of file kptnode.cpp.

◆ delDependChildNode() [3/3]

void KPlato::Node::delDependChildNode ( Relation *  rel,
bool  remove = false 
)

Definition at line 220 of file kptnode.cpp.

◆ delDependParentNode() [1/3]

void KPlato::Node::delDependParentNode ( int  number,
bool  remove = false 
)

Definition at line 288 of file kptnode.cpp.

◆ delDependParentNode() [2/3]

void KPlato::Node::delDependParentNode ( Node *  node,
bool  remove = false 
)

Definition at line 270 of file kptnode.cpp.

◆ delDependParentNode() [3/3]

void KPlato::Node::delDependParentNode ( Relation *  rel,
bool  remove = false 
)

Definition at line 279 of file kptnode.cpp.

◆ dependChildNodes()

TQPtrList< Relation > & KPlato::Node::dependChildNodes ( )
inline

Definition at line 134 of file kptnode.h.

◆ dependParentNodes()

TQPtrList< Relation > & KPlato::Node::dependParentNodes ( )
inline

Definition at line 157 of file kptnode.h.

◆ description() [1/2]

TQString & KPlato::Node::description ( )
inline

Definition at line 233 of file kptnode.h.

◆ description() [2/2]

const TQString & KPlato::Node::description ( ) const
inline

Definition at line 236 of file kptnode.h.

◆ duration() [1/2]

const Duration & KPlato::Node::duration ( )
inline

Definition at line 350 of file kptnode.h.

◆ duration() [2/2]

Duration KPlato::Node::duration ( const DateTime &  time,
int  use,
bool  backward 
)

Calculates and returns the duration of the node.

Uses the correct expected-, optimistic- or pessimistic effort dependent on use.

Parameters
timeWhere to start calculation.
useCalculate using expected-, optimistic- or pessimistic estimate.
backwardIf true, time specifies when the task should end.

Definition at line 350 of file kptnode.cpp.

◆ effort()

Effort * KPlato::Node::effort ( ) const
inline

Definition at line 184 of file kptnode.h.

◆ effortPerformanceIndex()

double KPlato::Node::effortPerformanceIndex ( const TQDate &  ,
bool *   
)
inline

Effort based performance index.

Definition at line 320 of file kptnode.h.

◆ endDate()

const TQDate & KPlato::Node::endDate ( ) const
inline

Definition at line 181 of file kptnode.h.

◆ endTime() [1/2]

DateTime KPlato::Node::endTime ( )
inline

Definition at line 489 of file kptnode.h.

◆ endTime() [2/2]

virtual DateTime KPlato::Node::endTime ( ) const
inlinevirtual

Return the scheduled end time.

Reimplemented in KPlato::Project.

Definition at line 179 of file kptnode.h.

◆ findChildNode()

int KPlato::Node::findChildNode ( Node *  node)

Definition at line 164 of file kptnode.cpp.

◆ findChildRelation()

Relation * KPlato::Node::findChildRelation ( Node *  node)

Definition at line 322 of file kptnode.cpp.

◆ findNode() [1/2]

virtual Node * KPlato::Node::findNode ( ) const
inlinevirtual

Find the node with my id.

Definition at line 399 of file kptnode.h.

◆ findNode() [2/2]

virtual Node * KPlato::Node::findNode ( const TQString &  id) const
inlinevirtual

Find the node with identity id.

Reimplemented in KPlato::Project.

Definition at line 401 of file kptnode.h.

◆ findParentRelation()

Relation * KPlato::Node::findParentRelation ( Node *  node)

Definition at line 313 of file kptnode.cpp.

◆ findRelation()

Relation * KPlato::Node::findRelation ( Node *  node)

Definition at line 331 of file kptnode.cpp.

◆ findSchedule() [1/3]

Schedule * KPlato::Node::findSchedule ( const Schedule::Type  type) const

Find schedule matching type. Does not return deleted schedule.

Definition at line 698 of file kptnode.cpp.

◆ findSchedule() [2/3]

Schedule * KPlato::Node::findSchedule ( const TQString  name,
const Schedule::Type  type 
) const

Find schedule matching name and type. Does not return deleted schedule.

Definition at line 688 of file kptnode.cpp.

◆ findSchedule() [3/3]

Schedule * KPlato::Node::findSchedule ( long  id) const
inline

Find schedule matching id. Also returns deleted schedule.

Definition at line 472 of file kptnode.h.

◆ finishNotLater()

virtual DateTime KPlato::Node::finishNotLater ( ) const
inlinevirtual

Definition at line 252 of file kptnode.h.

◆ generateWBS()

void KPlato::Node::generateWBS ( int  count,
WBSDefinition &  def,
TQString  wbs = TQString() 
)
virtual

Generate WBS.

Reimplemented in KPlato::Project.

Definition at line 758 of file kptnode.cpp.

◆ getChildNode() [1/2]

Node * KPlato::Node::getChildNode ( int  number)
inline

Definition at line 109 of file kptnode.h.

◆ getChildNode() [2/2]

const Node * KPlato::Node::getChildNode ( int  number) const

Definition at line 170 of file kptnode.cpp.

◆ getDelay()

Duration * KPlato::Node::getDelay ( )

Calculate the delay of this node.

It is the difference between the actual startTime and scheduled startTime.

Definition at line 176 of file kptnode.cpp.

◆ getDependChildNode()

Relation * KPlato::Node::getDependChildNode ( int  number)
inline

Definition at line 131 of file kptnode.h.

◆ getDependParentNode()

Relation * KPlato::Node::getDependParentNode ( int  number)
inline

Definition at line 154 of file kptnode.h.

◆ getEarliestStart()

DateTime KPlato::Node::getEarliestStart ( ) const
inline

getEarliestStart() returns earliest time this node can start given the constraints of the network.

See also
earliestStart

Definition at line 209 of file kptnode.h.

◆ getExpectedDuration()

virtual Duration * KPlato::Node::getExpectedDuration ( )
pure virtual

Returns the (previously) calculated duration.

Implemented in KPlato::Project, and KPlato::Task.

◆ getLatestFinish()

DateTime KPlato::Node::getLatestFinish ( ) const
inline

getLatestFinish() returns latest time this node can finish

See also
latestFinish

Definition at line 221 of file kptnode.h.

◆ getParent()

Node * KPlato::Node::getParent ( ) const
inline

Definition at line 101 of file kptnode.h.

◆ getRandomDuration()

virtual Duration * KPlato::Node::getRandomDuration ( )
pure 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.

Implemented in KPlato::Project, and KPlato::Task.

◆ id()

TQString KPlato::Node::id ( ) const
inline

Definition at line 70 of file kptnode.h.

◆ inCriticalPath()

virtual bool KPlato::Node::inCriticalPath ( ) const
inlinevirtual

Definition at line 435 of file kptnode.h.

◆ initiateCalculation()

void KPlato::Node::initiateCalculation ( Schedule &  sch)
virtual

Definition at line 482 of file kptnode.cpp.

◆ initiateCalculationLists()

virtual void KPlato::Node::initiateCalculationLists ( TQPtrList< Node > &  startnodes,
TQPtrList< Node > &  endnodes,
TQPtrList< Node > &  summarytasks 
)
pure virtual

Implemented in KPlato::Task.

◆ insertChildNode()

void KPlato::Node::insertChildNode ( unsigned int  index,
Node *  node 
)
virtual

Definition at line 144 of file kptnode.cpp.

◆ insertDependChildNode()

void KPlato::Node::insertDependChildNode ( unsigned int  index,
Node *  node,
Relation::Type  p = Relation::FinishStart 
)
virtual

Inserts relation to this node at index address index and appends relation to address node.

Definition at line 195 of file kptnode.cpp.

◆ insertDependParentNode()

void KPlato::Node::insertDependParentNode ( unsigned int  index,
Node *  node,
Relation::Type  p = Relation::FinishStart 
)
virtual

Inserts relation to this node at index and appends relation to node.

Definition at line 254 of file kptnode.cpp.

◆ insertId() [1/2]

virtual void KPlato::Node::insertId ( const TQString &  id)
inlinevirtual

Insert myself into the id register.

Definition at line 409 of file kptnode.h.

◆ insertId() [2/2]

virtual void KPlato::Node::insertId ( const TQString &  id,
const Node *  node 
)
inlinevirtual

Insert node with identity id into the register.

Reimplemented in KPlato::Project.

Definition at line 411 of file kptnode.h.

◆ isCritical()

virtual bool KPlato::Node::isCritical ( ) const
inlinevirtual

Definition at line 434 of file kptnode.h.

◆ isDependChildOf()

bool KPlato::Node::isDependChildOf ( Node *  node)

Definition at line 338 of file kptnode.cpp.

◆ isEndNode()

bool KPlato::Node::isEndNode ( ) const
virtual

Check if this node has any dependent child nodes.

Reimplemented in KPlato::Task.

Definition at line 566 of file kptnode.cpp.

◆ isParentOf()

bool KPlato::Node::isParentOf ( Node *  node)

Definition at line 301 of file kptnode.cpp.

◆ isStartNode()

bool KPlato::Node::isStartNode ( ) const
virtual

Check if this node has any dependent parent nodes.

Reimplemented in KPlato::Task.

Definition at line 569 of file kptnode.cpp.

◆ leader() [1/2]

TQString & KPlato::Node::leader ( )
inline

Definition at line 232 of file kptnode.h.

◆ leader() [2/2]

const TQString & KPlato::Node::leader ( ) const
inline

Definition at line 235 of file kptnode.h.

◆ legalToLink() [1/2]

virtual bool KPlato::Node::legalToLink ( Node *  ,
Node *   
)
inlinevirtual

Check if node par can be linked to node child. (Reimplement)

Reimplemented in KPlato::Project.

Definition at line 374 of file kptnode.h.

◆ legalToLink() [2/2]

bool KPlato::Node::legalToLink ( Node *  node)

Check if this node can be linked to node.

Definition at line 559 of file kptnode.cpp.

◆ level()

int KPlato::Node::level ( )
virtual

Returns the level this node is in the hierarchy. Top node is level 0.

Definition at line 753 of file kptnode.cpp.

◆ load() [1/2]

virtual bool KPlato::Node::load ( TQDomElement &  )
inlinevirtual

Definition at line 91 of file kptnode.h.

◆ load() [2/2]

virtual bool KPlato::Node::load ( TQDomElement &  ,
Project &   
)
inlinevirtual

Reimplemented in KPlato::Task.

Definition at line 92 of file kptnode.h.

◆ makeAppointments()

void KPlato::Node::makeAppointments ( )
virtual

Definition at line 369 of file kptnode.cpp.

◆ moveChildDown()

bool KPlato::Node::moveChildDown ( Node *  node)

Definition at line 547 of file kptnode.cpp.

◆ moveChildUp()

bool KPlato::Node::moveChildUp ( Node *  node)

Definition at line 530 of file kptnode.cpp.

◆ moveEarliestStart()

void KPlato::Node::moveEarliestStart ( DateTime &  time)

Definition at line 460 of file kptnode.cpp.

◆ moveLatestFinish()

void KPlato::Node::moveLatestFinish ( DateTime &  time)

Definition at line 471 of file kptnode.cpp.

◆ mustFinishOn()

virtual DateTime KPlato::Node::mustFinishOn ( ) const
inlinevirtual

Definition at line 254 of file kptnode.h.

◆ mustStartOn()

virtual DateTime KPlato::Node::mustStartOn ( ) const
inlinevirtual

Definition at line 253 of file kptnode.h.

◆ name() [1/2]

TQString & KPlato::Node::name ( )
inline

Definition at line 231 of file kptnode.h.

◆ name() [2/2]

const TQString & KPlato::Node::name ( ) const
inline

Definition at line 234 of file kptnode.h.

◆ notScheduled()

bool KPlato::Node::notScheduled ( ) const
inline

The node has not been scheduled.

Definition at line 277 of file kptnode.h.

◆ numChildren()

int KPlato::Node::numChildren ( ) const
inline

Definition at line 104 of file kptnode.h.

◆ numDependChildNodes()

int KPlato::Node::numDependChildNodes ( ) const
inline

Definition at line 119 of file kptnode.h.

◆ numDependParentNodes()

int KPlato::Node::numDependParentNodes ( ) const
inline

Definition at line 142 of file kptnode.h.

◆ overbookedResources()

TQStringList KPlato::Node::overbookedResources ( ) const
virtual

Return a list of overbooked resources.

Definition at line 383 of file kptnode.cpp.

◆ plannedCost() [1/2]

virtual double KPlato::Node::plannedCost ( )
inlinevirtual

Planned cost is the sum total of all resources and other costs planned for this node.

Reimplemented in KPlato::Project, and KPlato::Task.

Definition at line 300 of file kptnode.h.

◆ plannedCost() [2/2]

virtual double KPlato::Node::plannedCost ( const TQDate &  )
inlinevirtual

Planned cost on date.

Reimplemented in KPlato::Task, and KPlato::Project.

Definition at line 303 of file kptnode.h.

◆ plannedCostTo()

virtual double KPlato::Node::plannedCostTo ( const TQDate &  )
inlinevirtual

Planned cost from start of activity up to and including date is the sum of all resource costs and other costs planned for this node.

Reimplemented in KPlato::Task, and KPlato::Project.

Definition at line 308 of file kptnode.h.

◆ plannedEffort() [1/2]

virtual Duration KPlato::Node::plannedEffort ( )
inlinevirtual

Returns the total planned effort for this task (or subtasks)

Reimplemented in KPlato::Project, and KPlato::Task.

Definition at line 283 of file kptnode.h.

◆ plannedEffort() [2/2]

virtual Duration KPlato::Node::plannedEffort ( const TQDate &  )
inlinevirtual

Returns the total planned effort for this task (or subtasks) on date.

Reimplemented in KPlato::Project, and KPlato::Task.

Definition at line 285 of file kptnode.h.

◆ plannedEffortCostPrDay()

virtual EffortCostMap KPlato::Node::plannedEffortCostPrDay ( const TQDate &  start,
const TQDate &  end 
) const
pure virtual

Implemented in KPlato::Task.

◆ plannedEffortTo()

virtual Duration KPlato::Node::plannedEffortTo ( const TQDate &  )
inlinevirtual

Returns the planned effort up to and including date.

Reimplemented in KPlato::Project, and KPlato::Task.

Definition at line 287 of file kptnode.h.

◆ printDebug()

void KPlato::Node::printDebug ( bool  children,
TQCString  indent 
)
virtual

Definition at line 945 of file kptnode.cpp.

◆ projectNode()

Node * KPlato::Node::projectNode ( )
virtual

Returns a pointer to the project node (main- or sub-project) Returns 0 if no project exists.

Definition at line 109 of file kptnode.cpp.

◆ propagateEarliestStart()

void KPlato::Node::propagateEarliestStart ( DateTime &  time)

Definition at line 438 of file kptnode.cpp.

◆ propagateLatestFinish()

void KPlato::Node::propagateLatestFinish ( DateTime &  time)

Definition at line 449 of file kptnode.cpp.

◆ removeId() [1/2]

virtual bool KPlato::Node::removeId ( )
inlinevirtual

Remove myself from the id register.

Definition at line 404 of file kptnode.h.

◆ removeId() [2/2]

virtual bool KPlato::Node::removeId ( const TQString &  id)
inlinevirtual

Remove the registered identity id.

Reimplemented in KPlato::Project.

Definition at line 406 of file kptnode.h.

◆ resetVisited()

void KPlato::Node::resetVisited ( )
virtual

Definition at line 489 of file kptnode.cpp.

◆ resourceError()

bool KPlato::Node::resourceError ( ) const
inline

EffortType == Effort, but no resource is requested.

Definition at line 260 of file kptnode.h.

◆ resourceNotAvailable()

bool KPlato::Node::resourceNotAvailable ( ) const
inline

The requested resource is not available.

Definition at line 271 of file kptnode.h.

◆ resourceOverbooked()

virtual bool KPlato::Node::resourceOverbooked ( ) const
inlinevirtual

The assigned resource is overbooked.

Definition at line 263 of file kptnode.h.

◆ resourceRequest()

virtual ResourceGroupRequest * KPlato::Node::resourceRequest ( ResourceGroup *  ) const
inlinevirtual

Definition at line 256 of file kptnode.h.

◆ runningAccount()

Account * KPlato::Node::runningAccount ( ) const
inline

Definition at line 457 of file kptnode.h.

◆ save()

virtual void KPlato::Node::save ( TQDomElement &  element) const
pure virtual

Implemented in KPlato::Task.

◆ saveAppointments()

void KPlato::Node::saveAppointments ( TQDomElement &  element,
long  id 
) const
virtual

Save appointments for schedule with id.

Reimplemented in KPlato::Task.

Definition at line 616 of file kptnode.cpp.

◆ saveRelations()

void KPlato::Node::saveRelations ( TQDomElement &  element) const
virtual

Save my and my childrens relations.

Definition at line 387 of file kptnode.cpp.

◆ scheduleBackward()

virtual DateTime KPlato::Node::scheduleBackward ( const DateTime &  ,
int   
)
pure virtual

Implemented in KPlato::Task.

◆ scheduleForward()

virtual DateTime KPlato::Node::scheduleForward ( const DateTime &  ,
int   
)
pure virtual

Implemented in KPlato::Task.

◆ schedules()

TQIntDict< Schedule > & KPlato::Node::schedules ( )
inline

Definition at line 466 of file kptnode.h.

◆ schedulingError()

virtual bool KPlato::Node::schedulingError ( ) const
inlinevirtual

The task cannot be scheduled to fullfill all the constraints.

Definition at line 274 of file kptnode.h.

◆ setConstraint() [1/2]

virtual void KPlato::Node::setConstraint ( Node::ConstraintType  type)
inlinevirtual

Definition at line 241 of file kptnode.h.

◆ setConstraint() [2/2]

void KPlato::Node::setConstraint ( TQString &  type)

Definition at line 398 of file kptnode.cpp.

◆ setConstraintEndTime()

virtual void KPlato::Node::setConstraintEndTime ( TQDateTime  time)
inlinevirtual

Definition at line 247 of file kptnode.h.

◆ setConstraintStartTime()

virtual void KPlato::Node::setConstraintStartTime ( TQDateTime  time)
inlinevirtual

Definition at line 246 of file kptnode.h.

◆ setCurrentSchedule()

void KPlato::Node::setCurrentSchedule ( long  id)
virtual

Set current schedule to schedule with identity id, for me and my children.

Reimplemented in KPlato::Project, and KPlato::Task.

Definition at line 769 of file kptnode.cpp.

◆ setCurrentSchedulePtr()

void KPlato::Node::setCurrentSchedulePtr ( Schedule *  schedule)
inline

Definition at line 464 of file kptnode.h.

◆ setDescription()

void KPlato::Node::setDescription ( const TQString &  d)
inline

Definition at line 239 of file kptnode.h.

◆ setEarliestStart()

void KPlato::Node::setEarliestStart ( const DateTime &  dt)
inline

setEarliestStart() sets earliest time this node can start

See also
earliestStart

Definition at line 215 of file kptnode.h.

◆ setEffort()

void KPlato::Node::setEffort ( Effort *  e)
inline

Definition at line 183 of file kptnode.h.

◆ setEndTime()

void KPlato::Node::setEndTime ( DateTime  endTime)

Definition at line 607 of file kptnode.cpp.

◆ setId()

bool KPlato::Node::setId ( TQString  id)

Definition at line 573 of file kptnode.cpp.

◆ setLatestFinish()

void KPlato::Node::setLatestFinish ( const DateTime &  dt)
inline

setLatestFinish() sets latest time this node can finish given the constraints of the network.

See also
latestFinish

Definition at line 228 of file kptnode.h.

◆ setLeader()

void KPlato::Node::setLeader ( const TQString &  l)
inline

Definition at line 238 of file kptnode.h.

◆ setName()

void KPlato::Node::setName ( const TQString &  n)
inline

Definition at line 237 of file kptnode.h.

◆ setParent()

void KPlato::Node::setParent ( Node *  newParent)
inline

Definition at line 102 of file kptnode.h.

◆ setParentSchedule()

void KPlato::Node::setParentSchedule ( Schedule *  sch)
virtual

Set parent schedule recursivly.

Reimplemented in KPlato::Project.

Definition at line 718 of file kptnode.cpp.

◆ setRunningAccount()

void KPlato::Node::setRunningAccount ( Account *  acc)
inline

Definition at line 458 of file kptnode.h.

◆ setScheduleDeleted()

void KPlato::Node::setScheduleDeleted ( long  id,
bool  onoff 
)

Set deleted = onoff for schedule with id.

Definition at line 709 of file kptnode.cpp.

◆ setShutdownAccount()

void KPlato::Node::setShutdownAccount ( Account *  acc)
inline

Definition at line 455 of file kptnode.h.

◆ setShutdownCost()

void KPlato::Node::setShutdownCost ( double  cost)
inline

Definition at line 452 of file kptnode.h.

◆ setStartTime()

void KPlato::Node::setStartTime ( DateTime  startTime)

Definition at line 601 of file kptnode.cpp.

◆ setStartupAccount()

void KPlato::Node::setStartupAccount ( Account *  acc)
inline

Definition at line 449 of file kptnode.h.

◆ setStartupCost()

void KPlato::Node::setStartupCost ( double  cost)
inline

Definition at line 446 of file kptnode.h.

◆ setWorkEndTime()

void KPlato::Node::setWorkEndTime ( const DateTime &  dt)
inline

Definition at line 431 of file kptnode.h.

◆ setWorkStartTime()

void KPlato::Node::setWorkStartTime ( const DateTime &  dt)
inline

Definition at line 421 of file kptnode.h.

◆ shutdownAccount()

Account * KPlato::Node::shutdownAccount ( ) const
inline

Definition at line 454 of file kptnode.h.

◆ shutdownCost()

double KPlato::Node::shutdownCost ( ) const
inline

Definition at line 451 of file kptnode.h.

◆ siblingAfter()

Node * KPlato::Node::siblingAfter ( )

Definition at line 514 of file kptnode.cpp.

◆ siblingBefore()

Node * KPlato::Node::siblingBefore ( )

Definition at line 498 of file kptnode.cpp.

◆ startDate()

const TQDate & KPlato::Node::startDate ( ) const
inline

Definition at line 176 of file kptnode.h.

◆ startNotEarlier()

virtual DateTime KPlato::Node::startNotEarlier ( ) const
inlinevirtual

Definition at line 251 of file kptnode.h.

◆ startTime() [1/2]

DateTime KPlato::Node::startTime ( )
inline

Definition at line 487 of file kptnode.h.

◆ startTime() [2/2]

virtual DateTime KPlato::Node::startTime ( ) const
inlinevirtual

Return the scheduled start time.

Reimplemented in KPlato::Project.

Definition at line 174 of file kptnode.h.

◆ startupAccount()

Account * KPlato::Node::startupAccount ( ) const
inline

Definition at line 448 of file kptnode.h.

◆ startupCost()

double KPlato::Node::startupCost ( ) const
inline

Definition at line 445 of file kptnode.h.

◆ summarytaskDurationBackward()

virtual Duration KPlato::Node::summarytaskDurationBackward ( const DateTime &  )
inlinevirtual

Definition at line 344 of file kptnode.h.

◆ summarytaskDurationForward()

virtual Duration KPlato::Node::summarytaskDurationForward ( const DateTime &  )
inlinevirtual

Definition at line 338 of file kptnode.h.

◆ summarytaskEarliestStart()

virtual DateTime KPlato::Node::summarytaskEarliestStart ( )
inlinevirtual

Definition at line 341 of file kptnode.h.

◆ summarytaskLatestFinish()

virtual DateTime KPlato::Node::summarytaskLatestFinish ( )
inlinevirtual

Definition at line 347 of file kptnode.h.

◆ takeDependChildNode()

void KPlato::Node::takeDependChildNode ( Relation *  rel)

Takes the relation rel from this node only.

Never deletes even when autoDelete = true.

Definition at line 236 of file kptnode.cpp.

◆ takeDependParentNode()

void KPlato::Node::takeDependParentNode ( Relation *  rel)

Takes the relation rel from this node only.

Never deletes even when autoDelete = true.

Definition at line 295 of file kptnode.cpp.

◆ takeSchedule()

void KPlato::Node::takeSchedule ( const Schedule *  schedule)

Take, don't delete (as in destruct).

Definition at line 660 of file kptnode.cpp.

◆ type()

virtual int KPlato::Node::type ( ) const
pure virtual

Implemented in KPlato::Project, and KPlato::Task.

◆ wbs()

TQString KPlato::Node::wbs ( ) const
inline

Definition at line 443 of file kptnode.h.

◆ workEndTime()

virtual DateTime KPlato::Node::workEndTime ( ) const
inlinevirtual

This is when work can finish on this node in accordance with the calendar of allocated resources.

Normally this is the same as endTime(), but may differ if timing constraints are set.

Reimplemented in KPlato::Task.

Definition at line 429 of file kptnode.h.

◆ workStartTime()

virtual DateTime KPlato::Node::workStartTime ( ) const
inlinevirtual

This is when work can start on this node in accordance with the calendar of allocated resources.

Normally this is the same as startTime(), but may differ if timing constraints are set.

Reimplemented in KPlato::Task.

Definition at line 419 of file kptnode.h.

Member Data Documentation

◆ m_constraint

ConstraintType KPlato::Node::m_constraint
protected

Definition at line 506 of file kptnode.h.

◆ m_constraintEndTime

DateTime KPlato::Node::m_constraintEndTime
protected

m_constraintEndTime is used if any of the constraints FixedInterval, FinishNotLater, MustFinishOn or FixedInterval is selected

Definition at line 517 of file kptnode.h.

◆ m_constraintStartTime

DateTime KPlato::Node::m_constraintStartTime
protected

m_constraintTime is used if any of the constraints FixedInterval, StartNotEarlier, MustStartOn or FixedInterval is selected

Definition at line 512 of file kptnode.h.

◆ m_currentSchedule

Schedule* KPlato::Node::m_currentSchedule
protected

Definition at line 529 of file kptnode.h.

◆ m_dateOnlyDuration

Duration KPlato::Node::m_dateOnlyDuration
protected

Definition at line 526 of file kptnode.h.

◆ m_dateOnlyEndDate

TQDate KPlato::Node::m_dateOnlyEndDate
protected

Definition at line 525 of file kptnode.h.

◆ m_dateOnlyStartDate

TQDate KPlato::Node::m_dateOnlyStartDate
protected

Definition at line 524 of file kptnode.h.

◆ m_dependChildNodes

TQPtrList<Relation> KPlato::Node::m_dependChildNodes
protected

Definition at line 494 of file kptnode.h.

◆ m_dependParentNodes

TQPtrList<Relation> KPlato::Node::m_dependParentNodes
protected

Definition at line 495 of file kptnode.h.

◆ m_description

TQString KPlato::Node::m_description
protected

Definition at line 501 of file kptnode.h.

◆ m_durationBackward

Duration KPlato::Node::m_durationBackward
protected

Definition at line 522 of file kptnode.h.

◆ m_durationForward

Duration KPlato::Node::m_durationForward
protected

Definition at line 521 of file kptnode.h.

◆ m_effort

Effort* KPlato::Node::m_effort
protected

Definition at line 503 of file kptnode.h.

◆ m_id

TQString KPlato::Node::m_id
protected

Definition at line 498 of file kptnode.h.

◆ m_leader

TQString KPlato::Node::m_leader
protected

Definition at line 500 of file kptnode.h.

◆ m_name

TQString KPlato::Node::m_name
protected

Definition at line 499 of file kptnode.h.

◆ m_nodes

TQPtrList<Node> KPlato::Node::m_nodes
protected

Definition at line 493 of file kptnode.h.

◆ m_parent

Node* KPlato::Node::m_parent
protected

Definition at line 496 of file kptnode.h.

◆ m_runningAccount

Account* KPlato::Node::m_runningAccount
protected

Definition at line 537 of file kptnode.h.

◆ m_schedules

TQIntDict<Schedule> KPlato::Node::m_schedules
protected

Definition at line 528 of file kptnode.h.

◆ m_shutdownAccount

Account* KPlato::Node::m_shutdownAccount
protected

Definition at line 536 of file kptnode.h.

◆ m_shutdownCost

double KPlato::Node::m_shutdownCost
protected

Definition at line 535 of file kptnode.h.

◆ m_startupAccount

Account* KPlato::Node::m_startupAccount
protected

Definition at line 534 of file kptnode.h.

◆ m_startupCost

double KPlato::Node::m_startupCost
protected

Definition at line 533 of file kptnode.h.

◆ m_visitedBackward

bool KPlato::Node::m_visitedBackward
protected

Definition at line 520 of file kptnode.h.

◆ m_visitedForward

bool KPlato::Node::m_visitedForward
protected

Definition at line 519 of file kptnode.h.

◆ m_wbs

TQString KPlato::Node::m_wbs
protected

Definition at line 531 of file kptnode.h.


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