#include <importing.h>
Static Public Member Functions | |
static QString | filename () |
returns the html filename | |
static void | generateHTML (QTextStream::Encoding type, QString charSet) |
generates the html file |
Definition at line 16 of file importing.h.
QString Importing::filename | ( | ) | [static] |
returns the html filename
Definition at line 24 of file importing.cpp.
References TEMP_DIR.
Referenced by generateHTML(), and HelpWindow::showCurrentPage().
00025 { 00026 return QString("%1/importing.html").arg(TEMP_DIR); 00027 }
void Importing::generateHTML | ( | QTextStream::Encoding | type, | |
QString | charSet | |||
) | [static] |
generates the html file
Definition at line 29 of file importing.cpp.
References filename(), and IMAGE_PATH.
Referenced by HelpWindow::HelpWindow().
00030 { 00031 QString finder = HelpWindow::tr("the desktop or the Finder"); 00032 QString exporer = HelpWindow::tr("the desktop or Windows Explorer"); 00033 QString desktop = HelpWindow::tr("the desktop"); 00034 00035 QString dragLocation; 00036 QString ctrlKey; 00037 #if defined(Q_OS_MACX) 00038 dragLocation = finder; 00039 ctrlKey = "Command"; 00040 #elif defined(Q_OS_WIN) 00041 dragLocation = exporer; 00042 ctrlKey = "Ctrl"; 00043 #else 00044 dragLocation = desktop; 00045 ctrlKey = "Ctrl"; 00046 #endif 00047 00048 //create/open html file 00049 QFile file( filename() ); 00050 if(file.open(IO_WriteOnly)) 00051 { 00052 //----- 00053 QTextStream stream; 00054 stream.setEncoding( type ); 00055 stream.setDevice( &file ); 00056 //----- 00057 stream << "<html><head>\n"; 00058 stream << "<meta http-equiv='Content-Type' content='text/html; charset=" << charSet << "'>\n"; 00059 stream << "</head><body>\n"; 00060 stream << "<table cellpadding='4'><tr>\n"; 00061 stream << "<td><img src='" << IMAGE_PATH << "helpImages/asHelpLogoSmall.png'></td>\n"; 00062 stream << "<td valign='middle'><font face='Arial, sans-serif' size='+3'>"; 00063 stream << HelpWindow::tr("Importing & Organizing") << "</font></td>\n"; 00064 stream << "</tr></table>\n"; 00065 00066 stream << "<font face='Arial, sans-serif'>\n"; 00067 stream << "<table cellspacing='10' cellpadding='0'><tr><td>\n"; 00068 00069 stream << "<table width='100%' cellpadding='4' cellspacing='0'><tr><td bgcolor='lightgray'>\n"; 00070 stream << "<font size='+1'><b>" << HelpWindow::tr("Albums, Collections, and Photos:") << "</b></font>\n"; 00071 stream << "</td></tr></table>\n"; 00072 00073 stream << "<table cellpadding='4' cellspacing='0'><tr><td valign='middle'>\n"; 00074 stream << "<p align='justify'>\n"; 00075 stream << HelpWindow::tr("Album Shaper lets you organize your photos into albums much as one does with film and traditional prints. Since photo albums are often created for more complex or longer events, such as multi-day trips, an additional level of organization (collections) has been added. Photo albums contain one or more collections, each of which can contain as many photos as you choose.") << "\n"; 00076 stream << "</td></tr></table>\n"; 00077 00078 stream << "<table width='100%' cellpadding='4' cellspacing='0'><tr><td bgcolor='lightgray'>\n"; 00079 stream << "<font size='+1'><b>" << HelpWindow::tr("Importing:") <<"</b></font>\n"; 00080 stream << "</td></tr></table>\n"; 00081 00082 stream << "<table cellpadding='4' cellspacing='0'><tr><td valign='middle'>\n"; 00083 stream << "<p align='justify'>\n"; 00084 stream << HelpWindow::tr("When you start Album Shaper, you are presented an empty album that contains a single, empty collection. A list of the album collections is shown on the left, while the majority of the screen is used to show the photos in the currently selected collection.") << "\n"; 00085 stream << "</td><td valign='middle'>\n"; 00086 stream << "<img src='" << IMAGE_PATH << "helpImages/newAlbum.png'>\n"; 00087 stream << "</td></tr></table>\n"; 00088 00089 stream << "</td></tr><tr><td>\n"; 00090 00091 stream << "<table cellpadding='4' cellspacing='0'><tr><td valign='middle'>\n"; 00092 stream << "<img src='" << IMAGE_PATH << "helpImages/addRemoveButtons.png'>\n"; 00093 stream << "</td><td valign='middle'>\n"; 00094 stream << "<p align='justify'>\n"; 00095 stream << HelpWindow::tr("To add photos to your album, click the <font color='red'>Add Photo</font> button and select the photos you wish to insert. If you have already started labeling your photos by changing their filenames, check the <font color='red'>use filenames for descriptions</font> checkbox to automatically assign labels to your imported photos.") << "\n"; 00096 stream << "</td></tr></table>\n"; 00097 00098 stream << "<table cellpadding='4' cellspacing='0'><tr><td valign='middle'>\n"; 00099 stream << "<p align='justify'>\n"; 00100 stream << QString(HelpWindow::tr("Alternatively, you can import photos by dragging them from %1 and dropping them on the organize view. Album Shaper makes extensive use of drag and drop throughout the album creation process.")).arg(dragLocation) << "\n"; 00101 stream << "</td><td valign='middle'>\n"; 00102 stream << "<img src='" << IMAGE_PATH << "helpImages/addingPhotos.png'>\n"; 00103 stream << "</td></tr></table>\n"; 00104 00105 stream << "</td></tr><tr><td>\n"; 00106 00107 stream << "<table width='100%' cellpadding='4' cellspacing='0'><tr><td bgcolor='lightgray'>\n"; 00108 stream << "<font size='+1'><b>" << HelpWindow::tr("Organizing:") << "</b></font>\n"; 00109 stream << "</td></tr></table>\n"; 00110 00111 stream << "<table cellpadding='4' cellspacing='0'><tr><td valign='middle'>\n"; 00112 stream << "<img src='" << IMAGE_PATH << "helpImages/createCollection.png'>\n"; 00113 stream << "</td><td valign='middle'>\n"; 00114 stream << "<p align='justify'>\n"; 00115 stream << HelpWindow::tr("When imported, photos are always placed at the end of the currently selected collection. In order to create additional collections, click the <font color='red'>Create</font> button below the list of collections. The new collection will be automatically selected and ready for you to import photos. You can switch between collections by clicking a collection icon in this list.") << "\n"; 00116 stream << "</td></tr></table>\n"; 00117 00118 stream << "<table cellpadding='4' cellspacing='0'><tr><td valign='middle'>\n"; 00119 stream << "<p align='justify'>\n"; 00120 stream << QString(HelpWindow::tr("Photos can be rearranged within collections by selecting them, then dragging and dropping them on their intended placement. To select a range of photos, select the first photo, then, while holding the Shift key, select the last photo in a range. All photos in between should now be selected. You can add or remove photos individually from the selection by holding the %1 key while selecting photos.")).arg(ctrlKey) << "\n"; 00121 00122 stream << "<p align='justify'>\n"; 00123 stream << HelpWindow::tr("In addition to moving photos within collections, photos can also be moved from one collection to another, using drag and drop. Collections themselves can be reordered within the collections listing using drag and drop as well.") << "\n"; 00124 00125 stream << "</td><td valign='middle'>\n"; 00126 stream << "<img src='" << IMAGE_PATH << "helpImages/multipleCollections.png'>\n"; 00127 stream << "</td></tr></table>\n"; 00128 00129 stream << "<p align='justify'>\n"; 00130 stream << HelpWindow::tr("In order to remove one or more photos, simply select them and click the <font color='red'>Remove Photo</font> button. You can also remove entire collections at a time, using the <font color='red'>Delete</font> button at the bottom of the collections listing.") << "\n"; 00131 00132 stream << "</td></tr></table>\n"; 00133 00134 stream << "</td></tr>\n"; 00135 stream << "</table></font>\n"; 00136 stream << "</body></html>\n"; 00137 file.close(); 00138 } 00139 }