* @brief Clear the contents of this object * * The contents of the ControlNet object are deleted. The internal variables * that hold the contents are not. See the destructor. * * @author Kris Becker */
| 176 | * @author Kris Becker |
| 177 | */ |
| 178 | void ControlNet::clear() { |
| 179 | |
| 180 | // Now must also own points to delete them. |
| 181 | if (points) { |
| 182 | if (GetNumPoints() > 0) { |
| 183 | if (m_ownPoints) { |
| 184 | QHashIterator<QString, ControlPoint*> i(*points); |
| 185 | while (i.hasNext()) { |
| 186 | i.next(); |
| 187 | delete(*points)[i.key()]; |
| 188 | (*points)[i.key()] = NULL; |
| 189 | } |
| 190 | } |
| 191 | } |
| 192 | points->clear(); |
| 193 | } |
| 194 | |
| 195 | m_vertexMap.clear(); |
| 196 | m_controlGraph.clear(); |
| 197 | |
| 198 | if (pointIds) { |
| 199 | pointIds->clear(); |
| 200 | } |
| 201 | |
| 202 | return; |
| 203 | } |
| 204 | |
| 205 | |
| 206 | /** |