| 671 | } |
| 672 | |
| 673 | void |
| 674 | Monitor::MonitorDataStorage::deleteProcessNode( TreeNode* node) |
| 675 | { |
| 676 | std::pair< bool, ProcessToTreeMap::key_type> pResult |
| 677 | = this->findKey( this->processToTreeMap_, node); |
| 678 | if( pResult.first) { |
| 679 | this->processToTreeMap_.erase( pResult.second); |
| 680 | } |
| 681 | |
| 682 | // Remove the process from the host. |
| 683 | TreeNode* hostNode = node->parent(); |
| 684 | hostNode->removeChildren( node->row(), 1); |
| 685 | |
| 686 | // Check and remove the host node if there are no pid nodes remaining |
| 687 | // after the removal (no children). |
| 688 | if( hostNode->size() == 0) { |
| 689 | std::pair< bool, HostToTreeMap::key_type> hResult |
| 690 | = this->findKey( this->hostToTreeMap_, hostNode); |
| 691 | if( hResult.first) { |
| 692 | this->hostToTreeMap_.erase( hResult.second); |
| 693 | } |
| 694 | delete hostNode; |
| 695 | } |
| 696 | |
| 697 | delete node; |
| 698 | |
| 699 | // Notify the GUI to update. |
| 700 | this->model_->changed(); |
| 701 | } |
| 702 | |
| 703 | void |
| 704 | Monitor::MonitorDataStorage::displayNvp( |