//============================================== // copyright : (C) 2003-2005 by Will Stokes //============================================== // This program is free software; you can redistribute it // and/or modify it under the terms of the GNU General // Public License as published by the Free Software // Foundation; either version 2 of the License, or // (at your option) any later version. //============================================== //Systemwide includes #include #include #include #include #include //Projectwide includes #include "framing.h" #include "helpWindow.h" #include "../../config.h" //============================================== QString Framing::filename() { return QString("%1/framing.html").arg(TEMP_DIR); } //============================================== void Framing::generateHTML(QTextStream::Encoding type, QString charSet) { QString ctrlKey; #if defined(Q_OS_MACX) ctrlKey = "Command"; #else ctrlKey = "Ctrl"; #endif //create/open html file QFile file( filename() ); if(file.open(IO_WriteOnly)) { //----- QTextStream stream; stream.setEncoding( type ); stream.setDevice( &file ); //----- stream << "\n"; stream << "\n"; stream << "\n"; stream << "\n"; stream << "\n"; stream << "\n"; stream << "
"; stream << HelpWindow::tr("Framing") << "
\n"; stream << "\n"; stream << "
\n"; stream << "
\n"; stream << "" << HelpWindow::tr("Batch Effects:") << "\n"; stream << "
\n"; stream << "

\n"; stream << HelpWindow::tr("Album Shaper makes rotating your pictures a snap; in fact, you can rotate multiple pictures at once! Select one or more photos in a collection and click the Rotate Right or Rotate Left button. If you scanned a negative backwards and need a quick flip, or if you took that photo that is a little tilted, double click the photo or select it and switch to the Edit tab to use additional framing tools.") << "\n"; stream << "

\n"; stream << "
\n"; stream << "" << HelpWindow::tr("Rotating & Flipping:") << "\n"; stream << "
\n"; stream << "
\n"; stream << "

\n"; stream << HelpWindow::tr("Using the framing controls found at the bottom left of the photo editor, you can rotate, correct tilt, flip, and crop your photos. Rotate and flip operations require a single click.") << "\n"; stream << "

\n"; stream << "\n"; stream << "
\n"; stream << "
\n"; stream << "
\n"; stream << "" << HelpWindow::tr("Tilt Correction:") << "\n"; stream << "
\n"; stream << "
\n"; stream << "\n"; stream << "\n"; stream << "

\n"; stream << HelpWindow::tr("You can correct tilt in images by identifying what should be a vertical or horizontal edge. Click the green tilt correction button, then click two places along what should be a vertical or horizontal edge. Album Shaper takes cares of the rest, figuring out how many degrees to rotate your image for you.") << "\n"; stream << "

\n"; stream << "
\n"; stream << "
\n"; stream << "" << HelpWindow::tr("Cropping:") << "\n"; stream << "
\n"; stream << "
\n"; stream << "

\n"; stream << HelpWindow::tr("Cropping to preset size is easy. First, select the dimensions you are interested in from the aspect ratio menu. The largest portion of the photo that matches that size is automatically selected. Simply click and drag to move the selected region. You can scale the selection by holding Shift and clicking and dragging right and left to expand or shrink the selection about its center. To crop to the selected region, click the crop button.") << "\n"; stream << "

\n"; stream << "\n"; stream << "
\n"; stream << "
\n"; stream << "
\n"; stream << "\n"; stream << "\n"; stream << "

\n"; stream << HelpWindow::tr("Album Shaper takes the difficulties out of cropping and printing your photos. If you crop too small, you will get lower quality prints. If Album Shaper knows the dimensions you want, it passively lets you know if you are cropping too small by changing the color of the selection rectangle. If the selection rectangle turns red, you know the quality of your print will be lower. In such situations the target DPI (dots per inch) is printed next to the selected resolution.") << "\n"; stream << "

\n"; stream << "
\n"; stream << "
\n"; stream << "

\n"; stream << HelpWindow::tr("In addition to cropping to standard print sizes, you can crop images to your current display resolution for creating desktop wallpapers, or even crop to a custom size by clicking and dragging out a selection. You can adjust the corners and edges of the selection independently by clicking and dragging as well.") << "\n"; stream << "

\n"; stream << QString(HelpWindow::tr("To rotate the selected region about its center, hold %1 and click the selected region.")).arg(ctrlKey) << "\n"; stream << "

\n"; stream << "\n"; stream << "
\n"; stream << "\n"; stream << "\n"; file.close(); } } //==============================================