Logo Search packages:      
Sourcecode: kdenlive version File versions

void Gui::KdenliveApp::openDocumentFile ( const KURL &  url = 0  )  [slot]

opens a file specified by commandline option

Definition at line 1889 of file kdenlive.cpp.

References documentModified(), Gui::KTimeLine::ensureCursorVisible(), getDocument(), initView(), m_doc, ProjectFormatManager::openDocument(), requestDocumentClose(), saveModified(), slotFileNew(), slotRenderExportTimeline(), slotStatusMsg(), and KdenliveDoc::URL().

Referenced by initActions(), openLastFile(), and slotFileOpen().

                                                       {
      if (!saveModified()) {
          // here saving wasn't successful
      } else if (KIO::NetAccess::exists(url, true, this)) {
            requestDocumentClose(url);
          initView();
          initMonitors();
          QTime t;
          t.start();
          m_projectFormatManager.openDocument(url, m_doc);
          if (!m_exportWidget) slotRenderExportTimeline(false);
          m_exportWidget->setMetaData(getDocument()->metadata());
          documentModified(false);
          fileOpenRecent->addURL(m_doc->URL());
          if (m_exportWidget) m_exportWidget->resetValues();
          kdDebug()<<" + + +  Loading Time : "<<t.elapsed()<<"ms"<<endl;
      }
      else {
          KMessageBox::sorry(this, i18n("Cannot read file: %1").arg(url.path()));
          slotFileNew();
          return;
      }

/*    if (!KIO::NetAccess::exists(KURL(KdenliveSettings::currenttmpfolder()), false, this)) {
            if (KMessageBox::questionYesNo(this, i18n("Cannot write to the temporary folder:\n%1\nDo you want to create the folder ?\n Answering no will disable audio thumbnails").arg(KdenliveSettings::currentdefaultfolder())) ==  KMessageBox::No) {
                  KdenliveSettings::setAudiothumbnails(false);
            }
            else {
                  if (!KIO::NetAccess::exists(KURL(KdenliveSettings::defaultfolder()), false, this))
                        KIO::NetAccess::mkdir(KURL(KdenliveSettings::defaultfolder()), this);
                  if (!KIO::NetAccess::exists(KURL(KdenliveSettings::currentdefaultfolder()), false, this)) {
                        KIO::NetAccess::mkdir(KURL(KdenliveSettings::currentdefaultfolder()), this);
                        
                        if (!KIO::NetAccess::exists(KURL(KdenliveSettings::currentdefaultfolder()), false, this)) {
                              KMessageBox::sorry(0, i18n("Unable to create the project folder. Audio thumbnails will be disabled."));
                              KdenliveSettings::setAudiothumbnails(false);
                        }
                  }
            }
      }
      */
      m_timeline->ensureCursorVisible();
      slotStatusMsg(i18n("Ready."));
    }


Generated by  Doxygen 1.6.0   Back to index