#include <kptrelation.h>
Inherited by KPlato::ProxyRelation.
Inheritance diagram for KPlato::Relation:
Public Types | |
enum | Type { None, FinishStart, FinishFinish, StartStart } |
enum | Result { SUCCESS = 0l, HASCHILDREN = 1l, NOTIMPL = 2l } |
Public Member Functions | |
Relation (Node *parent, Node *child, Type type, Duration lag) | |
Relation (Node *parent=0, Node *child=0, Type type=FinishStart) | |
Relation (Relation *rel) | |
virtual | ~Relation () |
void | setType (Type) |
Type | type () const |
const Duration & | lag () const |
void | setLag (Duration lag) |
Node * | parent () const |
Node * | child () const |
bool | load (QDomElement &element, Project &project) |
void | save (QDomElement &element) const |
void | printDebug (QByteArray indent) |
Protected Attributes | |
Node * | m_parent |
Node * | m_child |
Type | m_type |
Duration | m_lag |
Private Attributes | |
QString | m_parentId |
Definition at line 44 of file kptrelation.h.
KPlato::Relation::Relation | ( | Relation * | rel | ) |
KPlato::Relation::~Relation | ( | ) | [virtual] |
When deleted the relation will remove itself from the parent- and child nodes lists
Definition at line 57 of file kptrelation.cc.
References m_child, m_parent, KPlato::Node::takeDependChildNode(), and KPlato::Node::takeDependParentNode().
void KPlato::Relation::setType | ( | Type | ) |
Definition at line 65 of file kptrelation.cc.
References m_type.
Referenced by KPlato::ModifyRelationTypeCmd::execute(), and KPlato::ModifyRelationTypeCmd::unexecute().
Type KPlato::Relation::type | ( | ) | const [inline] |
Definition at line 59 of file kptrelation.h.
References m_type.
Referenced by KPlato::Task::addChildProxyRelation(), KPlato::Task::addParentProxyRelation(), KPlato::AddRelationDialog::AddRelationDialog(), KPlato::ModifyRelationDialog::buildCommand(), KPlato::Task::calculatePredeccessors(), KPlato::Task::calculateSuccessors(), KPlato::GanttViewEventItem::insertRelations(), KPlato::GanttViewTaskItem::insertRelations(), KPlato::GanttViewSummaryItem::insertRelations(), KPlato::Task::isEndNode(), KPlato::Task::isStartNode(), KPlato::ModifyRelationTypeCmd::ModifyRelationTypeCmd(), Relation(), save(), KPlato::Task::schedulePredeccessors(), KPlato::Task::scheduleSuccessors(), KPlato::AddRelationDialog::slotFinishFinishToggled(), KPlato::AddRelationDialog::slotFinishStartToggled(), KPlato::AddRelationDialog::slotStartStartToggled(), and KPlato::AddRelationDialog::typeClicked().
const Duration& KPlato::Relation::lag | ( | ) | const [inline] |
returns the lag. The lag of a relation is the time it takes between the parent starting/stopping and the start of the child.
Definition at line 65 of file kptrelation.h.
References m_lag.
Referenced by KPlato::Task::addChildProxyRelation(), KPlato::Task::addParentProxyRelation(), KPlato::AddRelationDialog::AddRelationDialog(), KPlato::ModifyRelationDialog::buildCommand(), KPlato::Task::calculatePredeccessors(), KPlato::Task::calculateSuccessors(), KPlato::GanttViewEventItem::insertRelations(), KPlato::GanttViewTaskItem::insertRelations(), KPlato::GanttViewSummaryItem::insertRelations(), KPlato::ModifyRelationLagCmd::ModifyRelationLagCmd(), Relation(), KPlato::Task::schedulePredeccessors(), KPlato::Task::scheduleSuccessors(), and setLag().
void KPlato::Relation::setLag | ( | Duration | lag | ) | [inline] |
Definition at line 66 of file kptrelation.h.
Referenced by KPlato::ModifyRelationLagCmd::execute(), and KPlato::ModifyRelationLagCmd::unexecute().
Node* KPlato::Relation::parent | ( | ) | const [inline] |
Definition at line 71 of file kptrelation.h.
References m_parent.
Referenced by KPlato::Task::addParentProxyRelations(), KPlato::AddRelationCmd::AddRelationCmd(), KPlato::AddRelationDialog::AddRelationDialog(), KPlato::Task::calcCriticalPath(), KPlato::Task::calculatePredeccessors(), KPlato::DeleteRelationCmd::DeleteRelationCmd(), KPlato::DeleteRelationCmd::execute(), KPlato::AddRelationCmd::execute(), KPlato::Project::legalParents(), KPlato::ModifyRelationLagCmd::ModifyRelationLagCmd(), KPlato::ModifyRelationTypeCmd::ModifyRelationTypeCmd(), Relation(), KPlato::Task::schedulePredeccessors(), KPlato::DeleteRelationCmd::unexecute(), and KPlato::AddRelationCmd::unexecute().
Node* KPlato::Relation::child | ( | ) | const [inline] |
Definition at line 75 of file kptrelation.h.
References m_child.
Referenced by KPlato::Task::addChildProxyRelations(), KPlato::AddRelationDialog::AddRelationDialog(), KPlato::Task::calcCriticalPath(), KPlato::Task::calculateSuccessors(), KPlato::DeleteRelationCmd::execute(), KPlato::AddRelationCmd::execute(), KPlato::GanttViewEventItem::insertRelations(), KPlato::GanttViewTaskItem::insertRelations(), KPlato::GanttViewSummaryItem::insertRelations(), KPlato::Project::legalChildren(), Relation(), KPlato::Task::scheduleSuccessors(), KPlato::DeleteRelationCmd::unexecute(), and KPlato::AddRelationCmd::unexecute().
bool KPlato::Relation::load | ( | QDomElement & | element, | |
Project & | project | |||
) |
Definition at line 70 of file kptrelation.cc.
References KPlato::Node::addDependChildNode(), KPlato::Node::addDependParentNode(), KPlato::Project::findNode(), FinishFinish, FinishStart, KPlato::Duration::fromString(), KPlato::Node::legalToLink(), m_child, m_lag, m_parent, m_type, KPlato::Node::name(), StartStart, and KPlato::Node::takeDependChildNode().
void KPlato::Relation::save | ( | QDomElement & | element | ) | const |
Definition at line 117 of file kptrelation.cc.
References FinishFinish, FinishStart, KPlato::Node::id(), m_child, m_lag, m_parent, m_type, StartStart, KPlato::Duration::toString(), and type().
void KPlato::Relation::printDebug | ( | QByteArray | indent | ) |
Definition at line 140 of file kptrelation.cc.
References m_child, m_parent, m_type, and KPlato::Node::name().
Node* KPlato::Relation::m_parent [protected] |
Definition at line 87 of file kptrelation.h.
Referenced by load(), parent(), printDebug(), Relation(), save(), KPlato::ProxyRelation::~ProxyRelation(), and ~Relation().
Node* KPlato::Relation::m_child [protected] |
Definition at line 88 of file kptrelation.h.
Referenced by child(), load(), printDebug(), Relation(), save(), KPlato::ProxyRelation::~ProxyRelation(), and ~Relation().
Type KPlato::Relation::m_type [protected] |
Definition at line 89 of file kptrelation.h.
Referenced by load(), printDebug(), Relation(), save(), setType(), and type().
Duration KPlato::Relation::m_lag [protected] |
Definition at line 90 of file kptrelation.h.
Referenced by lag(), load(), Relation(), save(), and setLag().
QString KPlato::Relation::m_parentId [private] |
Definition at line 93 of file kptrelation.h.