| 107 | } |
| 108 | |
| 109 | bool |
| 110 | Monitor::MonitorData::clearData() |
| 111 | { |
| 112 | if( !this->enabled_) { |
| 113 | return false; |
| 114 | } |
| 115 | |
| 116 | // Copy out the previous header settings. |
| 117 | QList< QVariant> list; |
| 118 | int cols = this->model_->columnCount(); |
| 119 | for( int index = 0; index < cols; ++index) { |
| 120 | QString value |
| 121 | = this->model_->headerData( index, Qt::Horizontal).toString(); |
| 122 | list << value; |
| 123 | } |
| 124 | |
| 125 | // Clear the mappings. |
| 126 | this->storage_->reset(); |
| 127 | |
| 128 | // Create a new tree to install fresh data into. |
| 129 | TreeNode* root = new TreeNode( list); |
| 130 | |
| 131 | // Install the empty tree into the data model. |
| 132 | this->model_->newRoot( root); |
| 133 | |
| 134 | // Clear the active IOR field. |
| 135 | this->storage_->activeIor() = std::string(); |
| 136 | |
| 137 | return true; |
| 138 | } |
| 139 | |
| 140 | bool |
| 141 | Monitor::MonitorData::stopInstrumentation() |
no test coverage detected