| 63 | } |
| 64 | |
| 65 | void SessionsGraph::AddAgent(Agent *agent, bool drawTree) |
| 66 | { |
| 67 | if (agent->data.Mark == "Terminated" || agent->data.Mark == "Inactive") |
| 68 | return; |
| 69 | |
| 70 | GraphItem* item = new GraphItem( this, agent ); |
| 71 | agent->graphItem = item; |
| 72 | |
| 73 | if (agent->parentId.isEmpty()) |
| 74 | this->LinkToRoot(item); |
| 75 | |
| 76 | this->graphScene->addItem( item ); |
| 77 | this->graphScene->addItem( item->parentLink ); |
| 78 | this->items.push_back( item ); |
| 79 | |
| 80 | if (drawTree) |
| 81 | this->TreeDraw(); |
| 82 | } |
| 83 | |
| 84 | void SessionsGraph::RemoveAgent(Agent* agent, bool drawTree) |
| 85 | { |
no test coverage detected