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

void CFormMain::slotSave (  )  [protected, virtual, slot]

Saves the current sail definition to an XML file.

Definition at line 1367 of file formmain.cpp.

References fileAccess(), filename, saildef, and slotSaveAs().

Referenced by setupMenuBar().

{
    if ( filename.isEmpty() )
    {
        slotSaveAs();
        return;
    }

    // try writing to file, catch exception
    try
    {
        CSailDefXmlWriter(saildef , "saildef").write(filename);
        fileAccess(tr("wrote '%1'").arg(filename),filename);
    }
    catch (CException e)
    {
        QMessageBox::information( this, tr("error"), tr("There was an error writing to the selected file") );
    }
}


Generated by  Doxygen 1.6.0   Back to index