#include <kptproject.h>
Inherits KPlato::Node.
Inheritance diagram for KPlato::Project:
Signals | |
void | nodeChanged (Node *) |
This signal is emitted when one of the nodes members is changed. | |
void | nodeToBeAdded (Node *) |
This signal is emitted when the node is to be added to the project. | |
void | nodeAdded (Node *) |
This signal is emitted when the node has been added to the project. | |
void | nodeToBeRemoved (Node *) |
This signal is emitted when the node is to be removed from the project. | |
void | nodeRemoved (Node *) |
This signal is emitted when the node has been removed from the project. | |
void | nodeToBeMoved (Node *) |
This signal is emitted when the node is to be moved up, moved down, indented or unindented. | |
void | nodeMoved (Node *) |
This signal is emitted when the node has been moved up, moved down, indented or unindented. | |
Public Member Functions | |
Project (Node *parent=0) | |
~Project () | |
virtual int | type () const |
Returns the node type. Can be Type_Project or Type_Subproject. | |
void | calculate (Schedule *scedule) |
void | calculate (Effort::Use use) |
void | calculate () |
Calculate current schedule. | |
virtual bool | calcCriticalPath (bool fromEnd) |
virtual DateTime | startTime () const |
Return the scheduled start time. | |
virtual DateTime | endTime () const |
Return the scheduled end time. | |
Duration * | getExpectedDuration () |
Returns the duration calculated as latestFinish - earliestStart. | |
Duration * | getRandomDuration () |
virtual bool | load (QDomElement &element) |
virtual void | save (QDomElement &element) const |
QList< ResourceGroup * > & | resourceGroups () |
virtual void | addResourceGroup (ResourceGroup *resource) |
virtual void | insertResourceGroup (unsigned int index, ResourceGroup *resource) |
void | deleteResourceGroup (ResourceGroup *resource) |
void | deleteResourceGroup (int number) |
ResourceGroup * | takeResourceGroup (ResourceGroup *resource) |
bool | addTask (Node *task, Node *position) |
bool | addSubTask (Node *task, Node *position) |
bool | addSubTask (Node *task, int index, Node *parent) |
void | delTask (Node *node) |
bool | canIndentTask (Node *node) |
bool | indentTask (Node *node, int index=-1) |
bool | canUnindentTask (Node *node) |
bool | unindentTask (Node *node) |
bool | canMoveTaskUp (Node *node) |
bool | moveTaskUp (Node *node) |
bool | canMoveTaskDown (Node *node) |
bool | moveTaskDown (Node *node) |
Task * | createTask (Node *parent) |
Task * | createTask (Task &def, Node *parent) |
ResourceGroup * | group (QString id) |
Returns the resourcegroup with identity id. | |
Resource * | resource (QString id) |
Returns the resource with identity id. | |
virtual EffortCostMap | plannedEffortCostPrDay (const QDate &start, const QDate &end) const |
virtual Duration | plannedEffort () |
Returns the total planned effort for this project (or subproject). | |
virtual Duration | plannedEffort (const QDate &date) |
Returns the total planned effort for this project (or subproject) on date. | |
virtual Duration | plannedEffortTo (const QDate &date) |
Returns the planned effort up to and including date. | |
virtual Duration | actualEffort () |
Returns the actual effort. | |
virtual Duration | actualEffort (const QDate &date) |
Returns the actual effort on date. | |
virtual Duration | actualEffortTo (const QDate &date) |
Returns the actual effort up to and including date. | |
virtual double | plannedCost () |
virtual double | plannedCost (const QDate &date) |
Planned cost on date. | |
virtual double | plannedCostTo (const QDate &date) |
Planned cost up to and including date. | |
virtual double | actualCost () |
virtual double | actualCost (const QDate &date) |
Actual cost on date. | |
virtual double | actualCostTo (const QDate &date) |
Actual cost up to and including date. | |
Calendar * | defaultCalendar () |
QList< Calendar * > | calendars () |
void | addCalendar (Calendar *calendar) |
Calendar * | calendar (const QString id) const |
Returns the calendar with identity id. | |
StandardWorktime * | standardWorktime () |
void | setStandardWorktime (StandardWorktime *worktime) |
void | setDefaultCalendar (Calendar *cal) |
bool | legalToLink (Node *par, Node *child) |
Check if node par can be linked to node child. | |
virtual const QHash< QString, Node * > & | nodeDict () |
virtual Node * | findNode (const QString &id) const |
Find the node with identity id. | |
virtual bool | removeId (const QString &id) |
Remove the node with identity id from the register. | |
virtual void | insertId (const QString &id, Node *node) |
Insert the node with identity id. | |
bool | registerNodeId (Node *node) |
Register node. The nodes id must be unique and non-empty. | |
QString | uniqueNodeId (int seed=1) |
Create a unique id. | |
ResourceGroup * | findResourceGroup (const QString &id) const |
bool | removeResourceGroupId (const QString &id) |
Remove the resourcegroup with identity id from the register. | |
void | insertResourceGroupId (const QString &id, ResourceGroup *group) |
Insert the resourcegroup with identity id. | |
Resource * | findResource (const QString &id) const |
bool | removeResourceId (const QString &id) |
Remove the resource with identity id from the register. | |
void | insertResourceId (const QString &id, Resource *resource) |
Insert the resource with identity id. | |
virtual Calendar * | findCalendar (const QString &id) const |
Find the calendar with identity id. | |
virtual bool | removeCalendarId (const QString &id) |
Remove the calendar with identity id from the register. | |
virtual void | insertCalendarId (const QString &id, Calendar *calendar) |
Insert the calendar with identity id. | |
void | generateWBS (int count, WBSDefinition &def, QString wbs=QString()) |
Generate WBS. | |
Accounts & | accounts () |
virtual void | setCurrentSchedule (long id) |
Set current schedule to schedule with identity id, for me and my children. | |
MainSchedule * | createSchedule (QString name, Schedule::Type type) |
Create new schedule with unique id. | |
virtual void | setParentSchedule (Schedule *sch) |
Set parent schedule for my children. | |
void | printDebug (bool children, QByteArray indent) |
void | printCalendarDebug (QByteArray indent="") |
Protected Member Functions | |
virtual void | changed (Node *node) |
DateTime | calculateForward (int use) |
DateTime | calculateBackward (int use) |
DateTime | scheduleForward (const DateTime &earliest, int use) |
DateTime | scheduleBackward (const DateTime &latest, int use) |
void | adjustSummarytask () |
void | initiateCalculation (Schedule &sch) |
void | initiateCalculationLists (QList< Node * > &startnodes, QList< Node * > &endnodes, QList< Node * > &summarytasks) |
bool | legalParents (Node *par, Node *child) |
bool | legalChildren (Node *par, Node *child) |
Protected Attributes | |
Accounts | m_accounts |
QList< ResourceGroup * > | m_resourceGroups |
QList< Calendar * > | m_calendars |
StandardWorktime * | m_standardWorktime |
Private Member Functions | |
void | init () |
Private Attributes | |
QList< Node * > | m_startNodes |
QList< Node * > | m_endNodes |
QList< Node * > | m_summarytasks |
QHash< QString, ResourceGroup * > | resourceGroupIdDict |
QHash< QString, Resource * > | resourceIdDict |
QHash< QString, Node * > | nodeIdDict |
QHash< QString, Calendar * > | calendarIdDict |
Definition at line 50 of file kptproject.h.
KPlato::Project::Project | ( | Node * | parent = 0 |
) |
Definition at line 44 of file kptproject.cc.
References init(), KPlato::Node::m_constraint, m_standardWorktime, and KPlato::Node::MustStartOn.
Referenced by load().
KPlato::Project::~Project | ( | ) |
Definition at line 64 of file kptproject.cc.
References m_calendars, m_resourceGroups, and m_standardWorktime.
int KPlato::Project::type | ( | ) | const [virtual] |
Returns the node type. Can be Type_Project or Type_Subproject.
Implements KPlato::Node.
Definition at line 73 of file kptproject.cc.
References KPlato::Node::Type_Project.
Referenced by calculate(), calculateBackward(), calculateForward(), generateWBS(), and initiateCalculationLists().
void KPlato::Project::calculate | ( | Schedule * | scedule | ) |
Calculate the whole project.
schedule | Schedule to use |
Definition at line 75 of file kptproject.cc.
References calculate(), and KPlato::Node::m_currentSchedule.
Referenced by KPlato::RecalculateProjectCmd::execute(), and KPlato::CalculateProjectCmd::execute().
void KPlato::Project::calculate | ( | Effort::Use | use | ) |
Calculate the whole project.
use | Calculate using expected-, optimistic- or pessimistic estimate. |
Definition at line 85 of file kptproject.cc.
References calculate(), createSchedule(), KPlato::Node::findSchedule(), and KPlato::Node::m_currentSchedule.
void KPlato::Project::calculate | ( | ) |
Calculate current schedule.
Definition at line 94 of file kptproject.cc.
References calcCriticalPath(), KPlato::Node::calcResourceOverbooked(), calculateBackward(), calculateForward(), initiateCalculation(), KPlato::Node::m_constraint, KPlato::Node::m_constraintEndTime, KPlato::Node::m_constraintStartTime, KPlato::Node::m_currentSchedule, KPlato::Node::makeAppointments(), KPlato::Node::MustStartOn, KPlato::Node::propagateEarliestStart(), KPlato::Node::propagateLatestFinish(), scheduleBackward(), scheduleForward(), type(), KPlato::Schedule::type(), KPlato::Node::Type_Project, and KPlato::Node::Type_Subproject.
Referenced by calculate().
bool KPlato::Project::calcCriticalPath | ( | bool | fromEnd | ) | [virtual] |
Reimplemented from KPlato::Node.
Definition at line 136 of file kptproject.cc.
References m_endNodes, and m_startNodes.
Referenced by calculate().
DateTime KPlato::Project::startTime | ( | ) | const [virtual] |
Return the scheduled start time.
Reimplemented from KPlato::Node.
Definition at line 153 of file kptproject.cc.
References KPlato::Node::m_constraintStartTime, KPlato::Node::m_currentSchedule, and KPlato::Schedule::startTime.
Referenced by KPlato::GanttView::draw(), KPlato::MainProjectPanel::MainProjectPanel(), KPlato::ResourceView::resSelectionChanged(), KPlato::AccountsView::slotUpdate(), and KPlato::TaskAddCmd::TaskAddCmd().
DateTime KPlato::Project::endTime | ( | ) | const [virtual] |
Return the scheduled end time.
Reimplemented from KPlato::Node.
Definition at line 162 of file kptproject.cc.
References KPlato::Schedule::endTime, KPlato::Node::m_constraintEndTime, and KPlato::Node::m_currentSchedule.
Referenced by KPlato::MainProjectPanel::MainProjectPanel(), KPlato::ResourceView::resSelectionChanged(), and KPlato::TaskAddCmd::TaskAddCmd().
Duration * KPlato::Project::getExpectedDuration | ( | ) | [virtual] |
Returns the duration calculated as latestFinish - earliestStart.
Implements KPlato::Node.
Definition at line 171 of file kptproject.cc.
References KPlato::Node::getEarliestStart(), and KPlato::Node::getLatestFinish().
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 177 of file kptproject.cc.
bool KPlato::Project::load | ( | QDomElement & | element | ) | [virtual] |
Reimplemented from KPlato::Node.
Definition at line 296 of file kptproject.cc.
References addCalendar(), addResourceGroup(), KPlato::Node::addSchedule(), addTask(), calendar(), KPlato::Node::constraintToString(), KPlato::Schedule::endTime, KPlato::DateTime::fromString(), KPlato::Accounts::load(), m_accounts, m_calendars, KPlato::Node::m_constraint, KPlato::Node::m_constraintEndTime, KPlato::Node::m_constraintStartTime, KPlato::Node::m_description, KPlato::Node::m_leader, KPlato::Node::m_name, KPlato::Node::m_schedules, KPlato::Node::MustFinishOn, KPlato::Node::MustStartOn, Project(), KPlato::Node::setConstraint(), KPlato::Node::setId(), setParentSchedule(), setStandardWorktime(), and KPlato::Schedule::startTime.
void KPlato::Project::save | ( | QDomElement & | element | ) | const [virtual] |
Implements KPlato::Node.
Definition at line 477 of file kptproject.cc.
References KPlato::Node::childNode(), KPlato::Node::constraintToString(), KPlato::Schedule::id(), KPlato::Schedule::isDeleted(), KPlato::Schedule::isScheduled(), m_accounts, m_calendars, KPlato::Node::m_constraintEndTime, KPlato::Node::m_constraintStartTime, KPlato::Node::m_dependParentNodes, KPlato::Node::m_description, KPlato::Node::m_id, KPlato::Node::m_leader, KPlato::Node::m_name, KPlato::Node::m_nodes, m_resourceGroups, KPlato::Node::m_schedules, m_standardWorktime, KPlato::Node::numChildren(), KPlato::Node::save(), KPlato::StandardWorktime::save(), KPlato::Accounts::save(), KPlato::Node::saveAppointments(), and KPlato::Schedule::saveXML().
Referenced by KPlato::Part::saveXML().
QList< ResourceGroup * > & KPlato::Project::resourceGroups | ( | ) |
Definition at line 573 of file kptproject.cc.
References m_resourceGroups.
Referenced by KPlato::ResourceView::draw(), printDebug(), KPlato::RequestResourcesPanel::RequestResourcesPanel(), and KPlato::ResourcesPanel::ResourcesPanel().
void KPlato::Project::addResourceGroup | ( | ResourceGroup * | resource | ) | [virtual] |
Definition at line 548 of file kptproject.cc.
References group(), and m_resourceGroups.
Referenced by load(), and KPlato::RemoveResourceGroupCmd::unexecute().
void KPlato::Project::insertResourceGroup | ( | unsigned int | index, | |
ResourceGroup * | resource | |||
) | [virtual] |
Definition at line 569 of file kptproject.cc.
void KPlato::Project::deleteResourceGroup | ( | ResourceGroup * | resource | ) |
void KPlato::Project::deleteResourceGroup | ( | int | number | ) |
Definition at line 563 of file kptproject.cc.
ResourceGroup* KPlato::Project::takeResourceGroup | ( | ResourceGroup * | resource | ) | [inline] |
Definition at line 98 of file kptproject.h.
References m_resourceGroups, and resource().
Referenced by KPlato::RemoveResourceGroupCmd::execute().
Definition at line 578 of file kptproject.cc.
References addSubTask(), KPlato::Node::findChildNode(), KPlato::Node::getParent(), KPlato::Node::name(), KPlato::Node::type(), and KPlato::Node::Type_Project.
Referenced by KPlato::TaskAddCmd::execute(), and load().
Definition at line 608 of file kptproject.cc.
References KPlato::Node::addChildNode(), KPlato::Node::name(), nodeAdded(), nodeToBeAdded(), and registerNodeId().
Referenced by addTask(), KPlato::SubtaskAddCmd::execute(), KPlato::Task::load(), and KPlato::NodeDeleteCmd::unexecute().
Definition at line 627 of file kptproject.cc.
References KPlato::Node::insertChildNode(), KPlato::Node::name(), nodeAdded(), nodeToBeAdded(), and registerNodeId().
void KPlato::Project::delTask | ( | Node * | node | ) |
Definition at line 644 of file kptproject.cc.
References KPlato::Node::getParent(), KPlato::Node::id(), nodeRemoved(), nodeToBeRemoved(), KPlato::Node::removeId(), and KPlato::Node::takeChildNode().
Referenced by KPlato::NodeDeleteCmd::execute(), KPlato::SubtaskAddCmd::unexecute(), and KPlato::TaskAddCmd::unexecute().
bool KPlato::Project::canIndentTask | ( | Node * | node | ) |
Definition at line 658 of file kptproject.cc.
References KPlato::Node::findChildNode(), KPlato::Node::findChildRelation(), KPlato::Node::findParentRelation(), KPlato::Node::getParent(), KPlato::Node::siblingBefore(), KPlato::Node::type(), and KPlato::Node::Type_Project.
Referenced by indentTask(), and KPlato::TaskEditor::updateActionsEnabled().
bool KPlato::Project::indentTask | ( | Node * | node, | |
int | index = -1 | |||
) |
Definition at line 690 of file kptproject.cc.
References canIndentTask(), KPlato::Node::getParent(), KPlato::Node::insertChildNode(), nodeMoved(), nodeToBeMoved(), KPlato::Node::siblingBefore(), and KPlato::Node::takeChildNode().
Referenced by KPlato::NodeIndentCmd::execute(), and KPlato::NodeUnindentCmd::unexecute().
bool KPlato::Project::canUnindentTask | ( | Node * | node | ) |
Definition at line 704 of file kptproject.cc.
References KPlato::Node::findChildNode(), KPlato::Node::getParent(), KPlato::Node::type(), and KPlato::Node::Type_Project.
Referenced by unindentTask(), and KPlato::TaskEditor::updateActionsEnabled().
bool KPlato::Project::unindentTask | ( | Node * | node | ) |
Definition at line 734 of file kptproject.cc.
References KPlato::Node::addChildNode(), canUnindentTask(), KPlato::Node::getParent(), nodeMoved(), nodeToBeMoved(), and KPlato::Node::takeChildNode().
Referenced by KPlato::NodeUnindentCmd::execute(), and KPlato::NodeIndentCmd::unexecute().
bool KPlato::Project::canMoveTaskUp | ( | Node * | node | ) |
Definition at line 749 of file kptproject.cc.
References KPlato::Node::findChildNode(), KPlato::Node::getParent(), and KPlato::Node::siblingBefore().
Referenced by moveTaskUp(), and KPlato::TaskEditor::updateActionsEnabled().
bool KPlato::Project::moveTaskUp | ( | Node * | node | ) |
Definition at line 769 of file kptproject.cc.
References canMoveTaskUp(), nodeMoved(), and nodeToBeMoved().
Referenced by KPlato::NodeMoveUpCmd::execute(), and KPlato::NodeMoveDownCmd::unexecute().
bool KPlato::Project::canMoveTaskDown | ( | Node * | node | ) |
Definition at line 783 of file kptproject.cc.
References KPlato::Node::findChildNode(), KPlato::Node::getParent(), and KPlato::Node::siblingAfter().
Referenced by moveTaskDown(), and KPlato::TaskEditor::updateActionsEnabled().
bool KPlato::Project::moveTaskDown | ( | Node * | node | ) |
Definition at line 802 of file kptproject.cc.
References canMoveTaskDown(), nodeMoved(), and nodeToBeMoved().
Referenced by KPlato::NodeMoveDownCmd::execute(), and KPlato::NodeMoveUpCmd::unexecute().
Definition at line 815 of file kptproject.cc.
References KPlato::Node::setId(), and uniqueNodeId().
Referenced by KPlato::View::slotAddMilestone(), KPlato::View::slotAddSubTask(), and KPlato::View::slotAddTask().
ResourceGroup * KPlato::Project::group | ( | QString | id | ) |
Returns the resourcegroup with identity id.
Definition at line 871 of file kptproject.cc.
References findResourceGroup().
Referenced by addResourceGroup(), deleteResourceGroup(), and insertResourceGroupId().
Resource * KPlato::Project::resource | ( | QString | id | ) |
Returns the resource with identity id.
Definition at line 876 of file kptproject.cc.
References findResource().
Referenced by insertResourceId(), KPlato::ResourceRequest::load(), KPlato::Appointment::loadXML(), and takeResourceGroup().
EffortCostMap KPlato::Project::plannedEffortCostPrDay | ( | const QDate & | start, | |
const QDate & | end | |||
) | const [virtual] |
Duration KPlato::Project::plannedEffort | ( | ) | [virtual] |
Returns the total planned effort for this project (or subproject).
Reimplemented from KPlato::Node.
Definition at line 891 of file kptproject.cc.
References KPlato::Node::childNodeIterator().
Duration KPlato::Project::plannedEffort | ( | const QDate & | date | ) | [virtual] |
Returns the total planned effort for this project (or subproject) on date.
Reimplemented from KPlato::Node.
Definition at line 903 of file kptproject.cc.
References KPlato::Node::childNodeIterator().
Duration KPlato::Project::plannedEffortTo | ( | const QDate & | date | ) | [virtual] |
Returns the planned effort up to and including date.
Reimplemented from KPlato::Node.
Definition at line 915 of file kptproject.cc.
References KPlato::Node::childNodeIterator().
Duration KPlato::Project::actualEffort | ( | ) | [virtual] |
Returns the actual effort.
Reimplemented from KPlato::Node.
Definition at line 927 of file kptproject.cc.
References KPlato::Node::childNodeIterator().
Duration KPlato::Project::actualEffort | ( | const QDate & | date | ) | [virtual] |
Returns the actual effort on date.
Reimplemented from KPlato::Node.
Definition at line 939 of file kptproject.cc.
References KPlato::Node::childNodeIterator().
Duration KPlato::Project::actualEffortTo | ( | const QDate & | date | ) | [virtual] |
Returns the actual effort up to and including date.
Reimplemented from KPlato::Node.
Definition at line 951 of file kptproject.cc.
References KPlato::Node::childNodeIterator().
double KPlato::Project::plannedCost | ( | ) | [virtual] |
Returns the total planned cost for this project
Reimplemented from KPlato::Node.
Definition at line 963 of file kptproject.cc.
References KPlato::Node::childNodeIterator().
double KPlato::Project::plannedCost | ( | const QDate & | date | ) | [virtual] |
Planned cost on date.
Reimplemented from KPlato::Node.
Definition at line 976 of file kptproject.cc.
References KPlato::Node::childNodeIterator().
double KPlato::Project::plannedCostTo | ( | const QDate & | date | ) | [virtual] |
Planned cost up to and including date.
Reimplemented from KPlato::Node.
Definition at line 989 of file kptproject.cc.
References KPlato::Node::childNodeIterator().
double KPlato::Project::actualCost | ( | ) | [virtual] |
Returns the actually reported cost for this project
Reimplemented from KPlato::Node.
Definition at line 1001 of file kptproject.cc.
References KPlato::Node::childNodeIterator().
double KPlato::Project::actualCost | ( | const QDate & | date | ) | [virtual] |
Actual cost on date.
Reimplemented from KPlato::Node.
Definition at line 1014 of file kptproject.cc.
References KPlato::Node::childNodeIterator().
double KPlato::Project::actualCostTo | ( | const QDate & | date | ) | [virtual] |
Actual cost up to and including date.
Reimplemented from KPlato::Node.
Definition at line 1027 of file kptproject.cc.
References KPlato::Node::childNodeIterator().
Calendar* KPlato::Project::defaultCalendar | ( | ) | [inline] |
Definition at line 157 of file kptproject.h.
References KPlato::StandardWorktime::calendar(), and m_standardWorktime.
Referenced by KPlato::Resource::calendar(), KPlato::Calendar::effort(), KPlato::Calendar::firstInterval(), and KPlato::Calendar::hasInterval().
QList< Calendar * > KPlato::Project::calendars | ( | ) |
Definition at line 1050 of file kptproject.cc.
References m_calendars.
Referenced by KPlato::CalendarListDialog::CalendarListDialog(), and KPlato::ResourceDialog::ResourceDialog().
void KPlato::Project::addCalendar | ( | Calendar * | calendar | ) |
Definition at line 1039 of file kptproject.cc.
References calendar(), and m_calendars.
Referenced by KPlato::CalendarAddCmd::execute(), and load().
Calendar * KPlato::Project::calendar | ( | const QString | id | ) | const |
Returns the calendar with identity id.
Definition at line 1045 of file kptproject.cc.
References findCalendar().
Referenced by addCalendar(), insertCalendarId(), and load().
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 169 of file kptproject.h.
References m_standardWorktime.
Referenced by KPlato::ConfigDialog::ConfigDialog(), KPlato::RequestResourcesPanel::RequestResourcesPanel(), and KPlato::StandardWorktimeDialog::StandardWorktimeDialog().
void KPlato::Project::setStandardWorktime | ( | StandardWorktime * | worktime | ) |
void KPlato::Project::setDefaultCalendar | ( | Calendar * | cal | ) |
Check if node par can be linked to node child.
Reimplemented from KPlato::Node.
Definition at line 1071 of file kptproject.cc.
References KPlato::Node::isDependChildOf(), KPlato::Node::isParentOf(), legalChildren(), and legalParents().
virtual const QHash<QString, Node*>& KPlato::Project::nodeDict | ( | ) | [inline, virtual] |
Definition at line 176 of file kptproject.h.
References nodeIdDict.
Referenced by KPlato::Accounts::plannedCost().
virtual Node* KPlato::Project::findNode | ( | const QString & | id | ) | const [inline, virtual] |
Find the node with identity id.
Reimplemented from KPlato::Node.
Definition at line 179 of file kptproject.h.
References KPlato::Node::findNode(), KPlato::Node::m_parent, and nodeIdDict.
Referenced by KPlato::Relation::load(), KPlato::Account::CostPlace::load(), KPlato::Appointment::loadXML(), and KPlato::MainProjectPanel::ok().
bool KPlato::Project::removeId | ( | const QString & | id | ) | [virtual] |
Remove the node with identity id from the register.
Reimplemented from KPlato::Node.
Definition at line 838 of file kptproject.cc.
References KPlato::Node::m_parent, nodeIdDict, and KPlato::Node::removeId().
void KPlato::Project::insertId | ( | const QString & | id, | |
Node * | node | |||
) | [virtual] |
Insert the node with identity id.
Reimplemented from KPlato::Node.
Definition at line 844 of file kptproject.cc.
References KPlato::Node::insertId(), KPlato::Node::m_parent, KPlato::Node::name(), and nodeIdDict.
Referenced by registerNodeId().
bool KPlato::Project::registerNodeId | ( | Node * | node | ) |
Register node. The nodes id must be unique and non-empty.
Definition at line 852 of file kptproject.cc.
References KPlato::Node::findNode(), KPlato::Node::id(), and insertId().
Referenced by addSubTask().
QString KPlato::Project::uniqueNodeId | ( | int | seed = 1 |
) |
Create a unique id.
Definition at line 829 of file kptproject.cc.
References KPlato::Node::findNode().
Referenced by createTask().
ResourceGroup* KPlato::Project::findResourceGroup | ( | const QString & | id | ) | const [inline] |
Definition at line 197 of file kptproject.h.
References resourceGroupIdDict.
Referenced by KPlato::ResourceGroup::findId(), group(), and KPlato::ResourceGroupRequest::load().
bool KPlato::Project::removeResourceGroupId | ( | const QString & | id | ) | [inline] |
Remove the resourcegroup with identity id from the register.
Definition at line 204 of file kptproject.h.
References resourceGroupIdDict.
Referenced by KPlato::ResourceGroup::removeId().
void KPlato::Project::insertResourceGroupId | ( | const QString & | id, | |
ResourceGroup * | group | |||
) | [inline] |
Insert the resourcegroup with identity id.
Definition at line 211 of file kptproject.h.
References group(), and resourceGroupIdDict.
Referenced by KPlato::ResourceGroup::insertId().
Resource* KPlato::Project::findResource | ( | const QString & | id | ) | const [inline] |
Definition at line 216 of file kptproject.h.
References resourceIdDict.
Referenced by KPlato::Resource::findId(), and resource().
bool KPlato::Project::removeResourceId | ( | const QString & | id | ) | [inline] |
Remove the resource with identity id from the register.
Definition at line 223 of file kptproject.h.
References resourceIdDict.
Referenced by KPlato::Resource::removeId().
void KPlato::Project::insertResourceId | ( | const QString & | id, | |
Resource * | resource | |||
) | [inline] |
Insert the resource with identity id.
Definition at line 225 of file kptproject.h.
References resource(), and resourceIdDict.
Referenced by KPlato::Resource::insertId().
virtual Calendar* KPlato::Project::findCalendar | ( | const QString & | id | ) | const [inline, virtual] |
Find the calendar with identity id.
Definition at line 229 of file kptproject.h.
References calendarIdDict.
Referenced by calendar(), KPlato::Resource::findCalendar(), and KPlato::Calendar::findCalendar().
bool KPlato::Project::removeCalendarId | ( | const QString & | id | ) | [virtual] |
Remove the calendar with identity id from the register.
Definition at line 1160 of file kptproject.cc.
References calendarIdDict.
Referenced by KPlato::Calendar::removeId().
void KPlato::Project::insertCalendarId | ( | const QString & | id, | |
Calendar * | calendar | |||
) | [virtual] |
Insert the calendar with identity id.
Definition at line 1166 of file kptproject.cc.
References calendar(), calendarIdDict, and KPlato::Calendar::name().
Referenced by KPlato::Calendar::insertId().
void KPlato::Project::generateWBS | ( | int | count, | |
WBSDefinition & | def, | |||
QString | wbs = QString() | |||
) | [virtual] |
Generate WBS.
Reimplemented from KPlato::Node.
Definition at line 1125 of file kptproject.cc.
References KPlato::Node::generateWBS(), KPlato::WBSDefinition::level0Enabled(), KPlato::Node::m_nodes, KPlato::Node::m_wbs, type(), and KPlato::Node::Type_Subproject.
Referenced by KPlato::Part::generateWBS().
Accounts& KPlato::Project::accounts | ( | ) | [inline] |
Definition at line 242 of file kptproject.h.
References m_accounts.
Referenced by KPlato::RemoveAccountCmd::execute(), KPlato::AddAccountCmd::execute(), KPlato::RemoveAccountCmd::RemoveAccountCmd(), KPlato::RemoveAccountCmd::unexecute(), and KPlato::AddAccountCmd::unexecute().
void KPlato::Project::setCurrentSchedule | ( | long | id | ) | [virtual] |
Set current schedule to schedule with identity id, for me and my children.
Reimplemented from KPlato::Node.
Definition at line 1138 of file kptproject.cc.
References KPlato::Node::findSchedule(), resourceIdDict, KPlato::Resource::setCurrentSchedule(), KPlato::Node::setCurrentSchedule(), and KPlato::Node::setCurrentSchedulePtr().
Referenced by KPlato::GanttView::draw(), KPlato::GanttView::drawChanges(), KPlato::View::setContext(), and KPlato::View::View().
MainSchedule * KPlato::Project::createSchedule | ( | QString | name, | |
Schedule::Type | type | |||
) |
Create new schedule with unique id.
Definition at line 1148 of file kptproject.cc.
References KPlato::Node::addSchedule(), and KPlato::Node::m_schedules.
Referenced by calculate(), KPlato::RecalculateProjectCmd::execute(), and KPlato::CalculateProjectCmd::execute().
void KPlato::Project::setParentSchedule | ( | Schedule * | sch | ) | [virtual] |
Set parent schedule for my children.
Reimplemented from KPlato::Node.
Definition at line 540 of file kptproject.cc.
References KPlato::Node::m_nodes.
Referenced by load().
void KPlato::Project::nodeChanged | ( | Node * | ) | [signal] |
void KPlato::Project::nodeToBeAdded | ( | Node * | ) | [signal] |
void KPlato::Project::nodeAdded | ( | Node * | ) | [signal] |
void KPlato::Project::nodeToBeRemoved | ( | Node * | ) | [signal] |
void KPlato::Project::nodeRemoved | ( | Node * | ) | [signal] |
void KPlato::Project::nodeToBeMoved | ( | Node * | ) | [signal] |
This signal is emitted when the node is to be moved up, moved down, indented or unindented.
Referenced by indentTask(), moveTaskDown(), moveTaskUp(), and unindentTask().
void KPlato::Project::nodeMoved | ( | Node * | ) | [signal] |
This signal is emitted when the node has been moved up, moved down, indented or unindented.
Referenced by indentTask(), moveTaskDown(), moveTaskUp(), and unindentTask().
void KPlato::Project::changed | ( | Node * | node | ) | [protected, virtual] |
Reimplemented from KPlato::Node.
Definition at line 1172 of file kptproject.cc.
References KPlato::Node::changed(), KPlato::Node::m_parent, and nodeChanged().
DateTime KPlato::Project::calculateForward | ( | int | use | ) | [protected, virtual] |
Implements KPlato::Node.
Definition at line 182 of file kptproject.cc.
References m_endNodes, type(), and KPlato::Node::Type_Project.
Referenced by calculate().
DateTime KPlato::Project::calculateBackward | ( | int | use | ) | [protected, virtual] |
Implements KPlato::Node.
Definition at line 204 of file kptproject.cc.
References m_startNodes, type(), and KPlato::Node::Type_Project.
Referenced by calculate().
DateTime KPlato::Project::scheduleForward | ( | const DateTime & | earliest, | |
int | use | |||
) | [protected, virtual] |
Implements KPlato::Node.
Definition at line 226 of file kptproject.cc.
References adjustSummarytask(), m_endNodes, and KPlato::Node::resetVisited().
Referenced by calculate().
DateTime KPlato::Project::scheduleBackward | ( | const DateTime & | latest, | |
int | use | |||
) | [protected, virtual] |
Implements KPlato::Node.
Definition at line 242 of file kptproject.cc.
References adjustSummarytask(), m_startNodes, and KPlato::Node::resetVisited().
Referenced by calculate().
void KPlato::Project::adjustSummarytask | ( | ) | [protected, virtual] |
Implements KPlato::Node.
Definition at line 258 of file kptproject.cc.
References m_summarytasks.
Referenced by scheduleBackward(), and scheduleForward().
void KPlato::Project::initiateCalculation | ( | Schedule & | sch | ) | [protected, virtual] |
Reimplemented from KPlato::Node.
Definition at line 266 of file kptproject.cc.
References KPlato::Node::initiateCalculation(), initiateCalculationLists(), m_endNodes, m_resourceGroups, m_startNodes, m_summarytasks, KPlato::Node::m_visitedBackward, and KPlato::Node::m_visitedForward.
Referenced by calculate().
void KPlato::Project::initiateCalculationLists | ( | QList< Node * > & | startnodes, | |
QList< Node * > & | endnodes, | |||
QList< Node * > & | summarytasks | |||
) | [protected, virtual] |
Implements KPlato::Node.
Definition at line 283 of file kptproject.cc.
References KPlato::Node::childNodeIterator(), type(), and KPlato::Node::Type_Project.
Referenced by initiateCalculation().
Definition at line 1091 of file kptproject.cc.
References KPlato::Node::getDependParentNode(), KPlato::Node::isParentOf(), legalChildren(), KPlato::Node::numDependParentNodes(), and KPlato::Relation::parent().
Referenced by legalToLink().
Definition at line 1109 of file kptproject.cc.
References KPlato::Relation::child(), KPlato::Node::getDependChildNode(), KPlato::Node::isParentOf(), and KPlato::Node::numDependChildNodes().
Referenced by legalParents(), and legalToLink().
void KPlato::Project::init | ( | ) | [private] |
Reimplemented from KPlato::Node.
Definition at line 54 of file kptproject.cc.
References KPlato::Node::m_constraintEndTime, KPlato::Node::m_constraintStartTime, and KPlato::Node::m_parent.
Referenced by Project().
void KPlato::Project::printDebug | ( | bool | children, | |
QByteArray | indent | |||
) | [virtual] |
Reimplemented from KPlato::Node.
Definition at line 1182 of file kptproject.cc.
References KPlato::Node::name(), KPlato::Node::printDebug(), and resourceGroups().
Referenced by KPlato::View::slotPrintDebug().
void KPlato::Project::printCalendarDebug | ( | QByteArray | indent = "" |
) |
Definition at line 1193 of file kptproject.cc.
References m_calendars, m_standardWorktime, and KPlato::StandardWorktime::printDebug().
Referenced by KPlato::View::slotPrintCalendarDebug().
Accounts KPlato::Project::m_accounts [protected] |
QList<ResourceGroup*> KPlato::Project::m_resourceGroups [protected] |
Definition at line 271 of file kptproject.h.
Referenced by addResourceGroup(), deleteResourceGroup(), initiateCalculation(), resourceGroups(), save(), takeResourceGroup(), and ~Project().
QList<Calendar*> KPlato::Project::m_calendars [protected] |
Definition at line 273 of file kptproject.h.
Referenced by addCalendar(), calendars(), load(), printCalendarDebug(), save(), and ~Project().
StandardWorktime* KPlato::Project::m_standardWorktime [protected] |
Definition at line 275 of file kptproject.h.
Referenced by defaultCalendar(), printCalendarDebug(), Project(), save(), setStandardWorktime(), standardWorktime(), and ~Project().
QList<Node*> KPlato::Project::m_startNodes [private] |
Definition at line 292 of file kptproject.h.
Referenced by calcCriticalPath(), calculateBackward(), initiateCalculation(), and scheduleBackward().
QList<Node*> KPlato::Project::m_endNodes [private] |
Definition at line 293 of file kptproject.h.
Referenced by calcCriticalPath(), calculateForward(), initiateCalculation(), and scheduleForward().
QList<Node*> KPlato::Project::m_summarytasks [private] |
Definition at line 294 of file kptproject.h.
Referenced by adjustSummarytask(), and initiateCalculation().
QHash<QString, ResourceGroup*> KPlato::Project::resourceGroupIdDict [private] |
Definition at line 296 of file kptproject.h.
Referenced by findResourceGroup(), insertResourceGroupId(), and removeResourceGroupId().
QHash<QString, Resource*> KPlato::Project::resourceIdDict [private] |
Definition at line 297 of file kptproject.h.
Referenced by findResource(), insertResourceId(), removeResourceId(), and setCurrentSchedule().
QHash<QString, Node*> KPlato::Project::nodeIdDict [private] |
Definition at line 298 of file kptproject.h.
Referenced by findNode(), insertId(), nodeDict(), and removeId().
QHash<QString, Calendar*> KPlato::Project::calendarIdDict [private] |
Definition at line 299 of file kptproject.h.
Referenced by findCalendar(), insertCalendarId(), and removeCalendarId().