AlbumShaper 1.0a3
manipulating.cpp
Go to the documentation of this file.
1//==============================================
2// copyright : (C) 2003-2005 by Will Stokes
3//==============================================
4// This program is free software; you can redistribute it
5// and/or modify it under the terms of the GNU General
6// Public License as published by the Free Software
7// Foundation; either version 2 of the License, or
8// (at your option) any later version.
9//==============================================
10
11//Systemwide includes
12#include <qfile.h>
13#include <q3textstream.h>
14#include <qstringlist.h>
15#include <qnamespace.h>
16#include <qkeysequence.h>
17
18//Projectwide includes
19#include "manipulating.h"
20#include "helpWindow.h"
21#include "../../config.h"
22
23//==============================================
25{
26 return QString("%1/manipulating.html").arg(TEMP_DIR);
27}
28//==============================================
29void Manipulating::generateHTML(Q3TextStream::Encoding type, QString charSet)
30{
31 //create/open html file
32 QFile file( filename() );
33 if(file.open(QIODevice::WriteOnly))
34 {
35 //-----
36 Q3TextStream stream;
37 stream.setEncoding( type );
38 stream.setDevice( &file );
39 //-----
40 stream << "<html><head>\n";
41 stream << "<meta http-equiv='Content-Type' content='text/html; charset=" << charSet << "'>\n";
42 stream << "</head><body>\n";
43 stream << "<table cellpadding='4'><tr>\n";
44 stream << "<td><img src='" << IMAGE_PATH << "helpImages/asHelpLogoSmall.png'></td>\n";
45 stream << "<td valign='middle'><font face='Arial, sans-serif' size='+3'>";
46 stream << HelpWindow::tr("Manipulations") << "</font></td>\n";
47 stream << "</tr></table>\n";
48 stream << "<font face='Arial, sans-serif'>\n";
49
50 stream << "<table cellspacing='10' cellpadding='0'><tr><td>\n";
51
52 stream << "<table width='100%' cellpadding='4' cellspacing='0'><tr><td bgcolor='lightgray'>\n";
53 stream << "<font size='+1'><b>" << HelpWindow::tr("Stylize your Photos:") << "</b></font>\n";
54 stream << "</td></tr></table>\n";
55
56 stream << "<table cellpadding='4' cellspacing='0'><tr><td valign='middle'>\n";
57 stream << "<p align='justify'>\n";
58 stream << HelpWindow::tr("If you want to stylize your photo, try applying one of the many manipulations. Manipulation controls are located at the lower right of the photo editor. A preview of the selected manipulation is shown to the right of the manipulation controls. Create your own effects by applying several manipulations.") << "\n";
59 stream << "</td><td valign='middle'>\n";
60 stream << "<img src='" << IMAGE_PATH << "helpImages/manipulateControls.png'>\n";
61 stream << "</td></tr></table>\n";
62
63 stream << "</td></tr><tr><td>\n";
64
65 stream << "<table cellpadding='4' cellspacing='0'><tr><td valign='middle'>\n";
66 stream << "<img src='" << IMAGE_PATH << "helpImages/manipulations.png'>\n";
67 stream << "</td><td valign='middle'>\n";
68 stream << "<p align='justify'>\n";
69 stream << HelpWindow::tr("Album Shaper currently supports the following manipulations pictured from left to right: black and white, sepia coloring, invert colors, color preserving emboss, and an oil painting effect.") << "\n";
70 stream << "</td></tr></table>\n";
71 stream << "</font>\n";
72 stream << "</body></html>\n";
73 file.close();
74 }
75}
76//==============================================
static void generateHTML(Q3TextStream::Encoding type, QString charSet)
generates the html file
static QString filename()
returns the html filename
QString IMAGE_PATH
Definition config.cpp:18
QString TEMP_DIR
Definition config.cpp:23