| 100 | } |
| 101 | |
| 102 | TreeNode* |
| 103 | MonitorDataModel::getNode( const QModelIndex &index, bool defaultToRoot) const |
| 104 | { |
| 105 | if( index.isValid()) { |
| 106 | TreeNode* node = static_cast< TreeNode*>( index.internalPointer()); |
| 107 | if( node) { |
| 108 | return node; |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | if (defaultToRoot) { |
| 113 | return this->root_; |
| 114 | } else { |
| 115 | return NULL; |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | QModelIndex |
| 120 | MonitorDataModel::index( |
no test coverage detected