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