| 189 | } // customInterpolation |
| 190 | |
| 191 | void |
| 192 | StringAnimationManager::insertKeyFrame(double time, |
| 193 | const std::string & v, |
| 194 | double* index) |
| 195 | { |
| 196 | StringKeyFrame k; |
| 197 | |
| 198 | k.time = time; |
| 199 | k.value = v; |
| 200 | QMutexLocker l(&_imp->keyframesMutex); |
| 201 | std::pair<Keyframes::iterator, bool> ret = _imp->keyframes.insert(k); |
| 202 | if (!ret.second) { |
| 203 | _imp->keyframes.erase(ret.first); |
| 204 | ret = _imp->keyframes.insert(k); |
| 205 | assert(ret.second); |
| 206 | } |
| 207 | *index = std::distance(_imp->keyframes.begin(), ret.first); |
| 208 | } |
| 209 | |
| 210 | void |
| 211 | StringAnimationManager::removeKeyFrame(double time) |
no test coverage detected