Logo Search packages:      
Sourcecode: kdenlive version File versions

void Gui::KdenliveApp::slotFileNew (  )  [slot]

clears the document in the actual view to reuse it as the new document

Definition at line 2155 of file kdenlive.cpp.

References initView(), m_doc, m_projectFormat, m_selectedFile, KdenliveDoc::newDocument(), requestDocumentClose(), saveModified(), setFramesPerSecond(), KdenliveDoc::setProjectName(), and slotStatusMsg().

Referenced by initActions(), and openDocumentFile().

                                  {
      slotStatusMsg(i18n("Creating new project..."));

      if (!saveModified()) {
          // here saving wasn't successful
      } else {
          int videoTracks = KdenliveSettings::videotracks();
          int audioTracks = KdenliveSettings::audiotracks();
          QString newProjectName;
          m_selectedFile = NULL;
          if (!slotNewProject(&newProjectName, &m_selectedFile, &videoTracks, &audioTracks))
            return;
            if (!m_selectedFile.isEmpty()) {
            openSelectedFile();
          }
          else {
            requestDocumentClose();
            initView();
            m_doc->newDocument(videoTracks, audioTracks);
            setCaption(newProjectName + ".kdenlive" + " - " + projectFormatName(m_projectFormat), false);
            m_doc->setProjectName( newProjectName + ".kdenlive");
            setFramesPerSecond();
            if (m_exportWidget) m_exportWidget->resetValues();
            initMonitors();
          }
      }

      slotStatusMsg(i18n("Ready."));
    }


Generated by  Doxygen 1.6.0   Back to index