Logo Search packages:      
Sourcecode: kdenlive version File versions

void Gui::KdenliveApp::slotProjectDeleteClips ( QStringList  list  )  [slot]

Remove clips from the project

Definition at line 3436 of file kdenlive.cpp.

References KdenliveDoc::activateSceneListGeneration(), addCommand(), Gui::TransitionDialog::belongsToClip(), Gui::MonitorManager::clearClip(), KdenliveDoc::clipManager(), effectList(), ClipManager::findClipById(), KdenliveDoc::findClipNodeById(), getDocument(), m_doc, m_monitorManager, KdenliveDoc::referencedClips(), Gui::TransitionDialog::setTransition(), and slotStatusMsg().

      slotStatusMsg(i18n("Removing Clips"));
      DocClipRef *refClip;
      // Create a macro command that will delete all clips from the timeline involving this avfile. Then, delete it.
      KMacroCommand *macroCommand = new KMacroCommand(i18n("Delete Clip"));
      for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
          int id = (*it).toInt();
          DocClipBase *clip = getDocument()->clipManager().findClipById(id);

          // NOTE - we clear the monitors of the clip here - this does _not_ go into the macro command.

          DocClipRefList list = m_doc->referencedClips(clip);
          QPtrListIterator < DocClipRef > itt(list);

          while (itt.current()) {
                Command::KAddRefClipCommand * command = new Command::KAddRefClipCommand(effectList(), *m_doc, itt.current(), false);
                if (m_transitionPanel->belongsToClip(itt.current())) m_transitionPanel->setTransition(0);

          // remove audio thumbnail and tmp files

          DocumentBaseNode *node = m_doc->findClipNodeById(id);
          if (!node) kdDebug()<<"++++++  CANNOT FIND NODE: "<<id<<endl;
          macroCommand->addCommand(new Command::KAddClipCommand(*m_doc, node->name(), clip, node->parent(), false));
      addCommand(macroCommand, true);

Generated by  Doxygen 1.6.0   Back to index