return;
}
QDomElement effect = insertedEffect.cloneNode().toElement();
- //kDebug() << "// update effect ix: " << effect.attribute("kdenlive_ix")<<", TRACK: "<<track;
+ //kDebug() << "// update effect ix: " << effect.attribute("kdenlive_ix")<<", GAIN: "<<EffectsList::parameter(effect, "gain");
if (pos < GenTime()) {
// editing a track effect
EffectsParameterList effectParams = getEffectArgs(effect);
emit clipItemSelected(clip, ix);
}
}
+ else emit displayMessage(i18n("Cannot find clip to update effect"), ErrorMessage);
setDocumentModified();
}
viewport()->update();
}
+void CustomTrackView::slotSelectClipsInTrack()
+{
+ QRectF rect(0, m_selectedTrack * m_tracksHeight + m_tracksHeight / 2, sceneRect().width(), m_tracksHeight / 2 - 1);
+ QList<QGraphicsItem *> selection = m_scene->items(rect);
+ m_scene->clearSelection();
+ for (int i = 0; i < selection.count(); i++) {
+ if (selection.at(i)->type() == AVWIDGET || selection.at(i)->type() == TRANSITIONWIDGET || selection.at(i)->type() == GROUPWIDGET) {
+ selection.at(i)->setSelected(true);
+ }
+ }
+ resetSelectionGroup();
+ groupSelectedItems();
+}
+
+void CustomTrackView::slotSelectAllClips()
+{
+ QList<QGraphicsItem *> selection = m_scene->items();
+ m_scene->clearSelection();
+ for (int i = 0; i < selection.count(); i++) {
+ if (selection.at(i)->type() == AVWIDGET || selection.at(i)->type() == TRANSITIONWIDGET || selection.at(i)->type() == GROUPWIDGET) {
+ selection.at(i)->setSelected(true);
+ }
+ }
+ resetSelectionGroup();
+ groupSelectedItems();
+}
+
void CustomTrackView::selectClip(bool add, bool group, int track, int pos)
{
QRectF rect;
}
+void CustomTrackView::slotGotFilterJobResults(const QString &/*id*/, int startPos, int track, const QString &filter, stringMap filterParams)
+{
+ ClipItem *clip = getClipItemAt(GenTime(startPos, m_document->fps()), track);
+ if (clip == NULL) {
+ emit displayMessage(i18n("Cannot find clip for effect update %1.", filter), ErrorMessage);
+ return;
+ }
+ QDomElement newEffect;
+ QDomElement effect = clip->getEffectAt(clip->selectedEffectIndex());
+ if (effect.attribute("id") == filter) {
+ newEffect = effect.cloneNode().toElement();
+ QMap<QString, QString>::const_iterator i = filterParams.constBegin();
+ while (i != filterParams.constEnd()) {
+ EffectsList::setParameter(newEffect, i.key(), i.value());
+ kDebug()<<"// RESULT FILTER: "<<i.key()<<"="<< i.value();
+ ++i;
+ }
+ EditEffectCommand *command = new EditEffectCommand(this, m_document->tracksCount() - clip->track(), clip->startPos(), effect, newEffect, clip->selectedEffectIndex(), true);
+ m_commandStack->push(command);
+ emit clipItemSelected(clip, clip->selectedEffectIndex());
+ }
+
+}
+
+