AlbumShaper
1.0a3
|
00001 //============================================== 00002 // copyright : (C) 2003-2005 by Will Stokes 00003 //============================================== 00004 // This program is free software; you can redistribute it 00005 // and/or modify it under the terms of the GNU General 00006 // Public License as published by the Free Software 00007 // Foundation; either version 2 of the License, or 00008 // (at your option) any later version. 00009 //============================================== 00010 00011 //Systemwide includes 00012 #include <qfile.h> 00013 #include <qtextstream.h> 00014 #include <qstringlist.h> 00015 #include <qnamespace.h> 00016 #include <qkeysequence.h> 00017 00018 //Projectwide includes 00019 #include "loadSave.h" 00020 #include "helpWindow.h" 00021 #include "../../config.h" 00022 00023 //============================================== 00024 QString LoadSave::filename() 00025 { 00026 return QString("%1/saveLoad.html").arg(TEMP_DIR); 00027 } 00028 //============================================== 00029 void LoadSave::generateHTML(QTextStream::Encoding type, QString charSet) 00030 { 00031 //create/open html file 00032 QFile file( filename() ); 00033 if(file.open(IO_WriteOnly)) 00034 { 00035 //----- 00036 QTextStream stream; 00037 stream.setEncoding( type ); 00038 stream.setDevice( &file ); 00039 //----- 00040 stream << "<html><head>\n"; 00041 stream << "<meta http-equiv='Content-Type' content='text/html; charset=" << charSet << "'>\n"; 00042 stream << "</head><body>\n"; 00043 stream << "<table cellpadding='4'><tr>\n"; 00044 stream << "<td><img src='" << IMAGE_PATH << "helpImages/asHelpLogoSmall.png'></td>\n"; 00045 stream << "<td valign='middle'><font face='Arial, sans-serif' size='+3'>"; 00046 stream << HelpWindow::tr("Saving & Loading") << "</font></td>\n"; 00047 stream << "</tr></table>\n"; 00048 00049 stream << "<font face='Arial, sans-serif'>\n"; 00050 stream << "<table cellspacing='10' cellpadding='0'><tr><td>\n"; 00051 00052 stream << "<table width='100%' cellpadding='4' cellspacing='0'><tr><td bgcolor='lightgray'>\n"; 00053 stream << "<font size='+1'><b>" << HelpWindow::tr("Saving Albums:") << "</b></font>\n"; 00054 stream << "</td></tr></table>\n"; 00055 00056 stream << "<table cellpadding='4' cellspacing='0'><tr><td valign='middle'>\n"; 00057 stream << "<p align='justify'>\n"; 00058 00059 stream << HelpWindow::tr("To save an album, choose <font color='red'>File → Save</font>. The first time an album is saved, or whenever using the <font color='red'>Save As</font> command, you will be presented with the dialog pictured at the right. First, choose a theme to use when saving your album on the left. Preview images and additional details of the selected theme are shown to the right. Themes determine the look and feel of the generated web album. At the bottom you can choose the location you wish to save to.") << "\n"; 00060 00061 stream << "<p align='justify'>\n"; 00062 stream << HelpWindow::tr("If you wish to switch themes in the future, use the <font color='red'>Save As</font> command, pick the new theme, and save over the top of the old album.") << "\n"; 00063 00064 stream << "</td><td valign='middle'>\n"; 00065 stream << "<img src='" << IMAGE_PATH << "helpImages/saveAs.png'>\n"; 00066 stream << "</td></tr></table>\n"; 00067 00068 stream << "</td></tr><tr><td>\n"; 00069 00070 stream << "<table width='100%' cellpadding='4' cellspacing='0'><tr><td bgcolor='lightgray'>\n"; 00071 stream << "<font size='+1'><b>" << HelpWindow::tr("Loading Albums:") << "</b></font>\n"; 00072 stream << "</td></tr></table>\n"; 00073 00074 stream << "<table cellpadding='4' cellspacing='0'><tr><td valign='middle'>\n"; 00075 stream << "<img src='" << IMAGE_PATH << "helpImages/recentAlbums.png'>\n"; 00076 stream << "</td><td valign='middle'>\n"; 00077 stream << "<p align='justify'>\n"; 00078 stream << HelpWindow::tr("Album Shaper makes loading albums easy. Use the <font color='red'>File → Open Recent</font> menu. If you have a lot of albums, or if you are opening an album created on a different machine, select <font color='red'>File → Open</font>, browse to the album's location, and open the <font color='red'>Album.xml</font> file within this directory.") << "\n"; 00079 00080 stream << "<p align='justify'>\n"; 00081 stream << HelpWindow::tr("If you want to restore an album to its last saved state, you can either load it again, or use <font color='red'>File → Revert to Saved</font>.") << "\n"; 00082 00083 stream << "</td></tr></table>\n"; 00084 00085 stream << "</td></tr><tr><td>\n"; 00086 00087 stream << "<table width='100%' cellpadding='4' cellspacing='0'><tr><td bgcolor='lightgray'>\n"; 00088 stream << "<font size='+1'><b>" << HelpWindow::tr("Exporting:") << "</b></font>\n"; 00089 stream << "</td></tr></table>\n"; 00090 00091 stream << "<table cellpadding='4' cellspacing='0'><tr><td valign='middle'>\n"; 00092 stream << "<p align='justify'>\n"; 00093 00094 stream << HelpWindow::tr("In addition to producing web galleries, Album Shaper can export your photos in a number of other formats.") << "\n"; 00095 00096 stream << "<p align='justify'><ul>\n"; 00097 stream << "<li>" << HelpWindow::tr("To use a photo as your desktop wallpaper, select the photo and click the <font color='red'>Desktop</font> button at the bottom of the organize view.") << "\n"; 00098 00099 stream << "<p align='justify'>\n"; 00100 stream << "<li>" << HelpWindow::tr("To export a small web gallery that does not include full-size images, select <font color='red'>File → Export → Small Web Gallery</font>.") << "\n"; 00101 00102 stream << "<p align='justify'>\n"; 00103 stream << "<li>" << HelpWindow::tr("To export an entire album's contents for printing, select <font color='red'>File → Export → Images for Printing</font>. Only the full-size images will be exported to a directory along side your album on disk.") << "\n"; 00104 00105 stream << "</ul>\n"; 00106 00107 stream << "</td></tr></table>\n"; 00108 stream << "</td></tr>\n"; 00109 stream << "</font>\n"; 00110 stream << "</body></html>\n"; 00111 file.close(); 00112 } 00113 } 00114 //==============================================