| 212 | } |
| 213 | |
| 214 | void SessionsGraph::Clear() |
| 215 | { |
| 216 | for ( int i = 0; i < this->items.size(); i++ ) { |
| 217 | if (this->items[i]) { |
| 218 | if (this->items[i]->parentLink) { |
| 219 | this->graphScene->removeItem(this->items[i]->parentLink); |
| 220 | delete this->items[i]->parentLink; |
| 221 | this->items[i]->parentLink = nullptr; |
| 222 | } |
| 223 | if (this->items[i]->agent) |
| 224 | this->items[i]->agent->graphItem = nullptr; |
| 225 | this->graphScene->removeItem( this->items[ i ] ); |
| 226 | delete this->items[ i ]; |
| 227 | this->items[ i ] = nullptr; |
| 228 | } |
| 229 | } |
| 230 | this->items.clear(); |
| 231 | |
| 232 | this->RootInit(); |
| 233 | } |
| 234 | |
| 235 | void SessionsGraph::scaleView(qreal scaleFactor) |
| 236 | { |
no test coverage detected