| 203 | } |
| 204 | |
| 205 | void NotesPlugin::slotInsertTimecode() |
| 206 | { |
| 207 | if (pCore->monitorManager()->isActive(Kdenlive::ClipMonitor)) { |
| 208 | // Add a note on the current bin clip |
| 209 | int frames = pCore->monitorManager()->clipMonitor()->position(); |
| 210 | QString position = pCore->timecode().getTimecodeFromFrames(frames); |
| 211 | const QString binId = pCore->monitorManager()->clipMonitor()->activeClipId(); |
| 212 | if (binId.isEmpty()) { |
| 213 | pCore->displayMessage(i18n("Cannot add note, no clip selected in project bin"), ErrorMessage); |
| 214 | return; |
| 215 | } |
| 216 | const QString clipName = pCore->bin()->getBinClipName(binId); |
| 217 | const QString uuid = pCore->projectItemModel()->getBinClipUuid(binId); |
| 218 | m_widget->insertHtml(QStringLiteral("<a href=\"%1#%2\">%3 %4</a> ").arg(uuid, QString::number(frames), clipName, position)); |
| 219 | } else { |
| 220 | int frames = pCore->monitorManager()->projectMonitor()->position(); |
| 221 | QString position = pCore->timecode().getTimecodeFromFrames(frames); |
| 222 | QPair<int, QString> currentTrackInfo = pCore->currentTrackInfo(); |
| 223 | const QUuid uuid = pCore->currentTimelineId(); |
| 224 | if (currentTrackInfo.first != -1) { |
| 225 | // Insert timeline position with track reference |
| 226 | m_widget->insertHtml( |
| 227 | QStringLiteral("<a href=\"%1!%2?%3\">%4 %5</a> ") |
| 228 | .arg(uuid.toString(), QString::number(frames), QString::number(currentTrackInfo.first), currentTrackInfo.second, position)); |
| 229 | } else { |
| 230 | m_widget->insertHtml(QStringLiteral("<a href=\"%1!%2\">%3</a> ").arg(uuid.toString(), QString::number(frames), position)); |
| 231 | } |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | void NotesPlugin::slotReAssign(const QStringList &anchors, const QList<QPoint> &points, QString binId, int offset) |
| 236 | { |
nothing calls this directly
no test coverage detected