Logo Search packages:      
Sourcecode: kdenlive version File versions

void Gui::KdenliveApp::slotVirtualZone (  )  [private, slot]

Create a virtual clip

Definition at line 2642 of file kdenlive.cpp.

References addCommand(), DocClipProject::generatePartialSceneList(), getDocument(), Gui::KTimeLine::inpointPosition(), m_projectList, Gui::KTimeLine::outpointPosition(), and KdenliveDoc::projectClip().

Referenced by initActions().

    {
      if ((m_timeline->outpointPosition() - m_timeline->inpointPosition()).frames(KdenliveSettings::defaultfps()) < 10) {
          KMessageBox::sorry(this, i18n("The selected timeline zone is smaller than 10 frames.\nPlease select a zone with the timeline selection tool before creating a virtual clip.\n(Double click in the timeline ruler to bring the selection zone to current time)"));
          return;
      }
      bool ok;
      QString clipName = KInputDialog::getText(i18n("Create Virtual Clip"), i18n("New clip name"), i18n("Virtual Clip"), &ok);
      if (!ok) return;
      KTempFile tmp( KdenliveSettings::currenttmpfolder(), ".westley");
      QTextStream stream( tmp.file() );
      stream << getDocument()->projectClip().generatePartialSceneList(m_timeline->inpointPosition(), m_timeline->outpointPosition(), -1).toString() << "\n";
      tmp.close();
      addCommand(new Command::KAddClipCommand(*getDocument(), m_projectList->parentName(), clipName, KURL(tmp.name()), m_timeline->inpointPosition(), m_timeline->outpointPosition(), QString::null, true));
    }


Generated by  Doxygen 1.6.0   Back to index