| 50 | } |
| 51 | |
| 52 | void ProblemModelSet::removeModel(const QString &id) |
| 53 | { |
| 54 | Q_D(ProblemModelSet); |
| 55 | |
| 56 | QVector<ModelData>::iterator itr = d->data.begin(); |
| 57 | |
| 58 | while (itr != d->data.end()) { |
| 59 | if(itr->id == id) |
| 60 | break; |
| 61 | ++itr; |
| 62 | } |
| 63 | |
| 64 | if(itr != d->data.end()) { |
| 65 | (*itr).model->disconnect(this); |
| 66 | d->data.erase(itr); |
| 67 | emit removed(id); |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | void ProblemModelSet::showModel(const QString &id) |
| 72 | { |