Logo Search packages:      
Sourcecode: kallery version File versions  Download package

void FirstPage::slotOpenProject (  )  [private, slot]

Called when the user selects to open an existing project.

Definition at line 39 of file firstpage.cpp.

References KalleryFunctions::openProject(), projectLoaded(), KalleryGlobals::ref(), KalleryFunctions::ref(), KalleryGlobals::setDefaultOptions(), KalleryGlobals::setProjectBaseDir(), and KalleryGlobals::setProjectFile().

{
  QString projectFileName;

  projectFileName = KFileDialog::getOpenFileName("","*.kallery\n*|All files",this,i18n("Open project"));
  if (!projectFileName.isEmpty())
  {
    if (KalleryFunctions::ref()->openProject(projectFileName) )
    {
      QString baseDir = QFileInfo(KalleryGlobals::ref()->options.galleryFile).dirPath()+"/";
      KalleryGlobals::ref()->setProjectBaseDir(baseDir);
      KalleryGlobals::ref()->setProjectFile(projectFileName);
      emit projectLoaded();
    }
    else
    {
      KalleryGlobals::ref()->setDefaultOptions();
    }
  } else
    StartNewBtn->setChecked(true);
}


Generated by  Doxygen 1.6.0   Back to index