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

void TitleWidget::loadAlbum (  )  [private, slot]

Loads an album specified with file chooser.

make sure we want to proceed

Definition at line 621 of file titleWidget.cpp.

References Window::getConfig(), Configuration::getString(), proceedWithLoad(), Configuration::resetSetting(), and window.

Referenced by loadRecentAlbum(), revertToSaved(), and TitleWidget().

{
  ///make sure we want to proceed
  if(!proceedWithLoad())
    return;

  QString path = window->getConfig()->getString( "loadSave", "loadSaveDir" );
  QDir testPath(path);
  if(!testPath.exists())
  {
    window->getConfig()->resetSetting( "loadSave", "loadSaveDir" );
    path = window->getConfig()->getString( "loadSave", "loadSaveDir" );
  }
  
  QString albumXML = QFileDialog::getOpenFileName( path,
                                                   tr("XML Files (*.xml)"),
                                                   this,
                                                   "open file dialog",
                                                   tr("Choose an album to load") );
  
  //if null bail
  if(albumXML.isNull()) return;
  
  //attempt to load album
  loadAlbum( albumXML );    
}  


Generated by  Doxygen 1.6.0   Back to index