13 #include <q3textstream.h> 14 #include <qstringlist.h> 15 #include <qnamespace.h> 16 #include <qkeysequence.h> 21 #include "../../config.h" 26 return QString(
"%1/shortcuts.html").arg(
TEMP_DIR);
31 QString Control =
"Ctrl";
32 QString ControlPlus =
"Ctrl+";
33 #if defined(Q_OS_MACX) 34 Control = (QString(QChar(0x2318)));
35 ControlPlus = Control;
40 if(file.open(QIODevice::WriteOnly))
44 stream.setEncoding( type );
45 stream.setDevice( &file );
47 stream <<
"<html><head>\n";
48 stream <<
"<meta http-equiv='Content-Type' content='text/html; charset=" << charSet <<
"'>\n";
49 stream <<
"</head><body>\n";
51 stream <<
"<table cellpadding='4'><tr>\n";
52 stream <<
" <td><img src='" <<
IMAGE_PATH <<
"helpImages/asHelpLogoSmall.png'></td>\n";
53 stream <<
" <td valign='middle'><font face='Arial, sans-serif' size='+3'>";
54 stream << HelpWindow::tr(
"Keyboard Shortcuts") <<
"</font></td>\n";
55 stream <<
"</tr></table>\n";
57 stream <<
"<font face='Arial, sans-serif'>\n";
58 stream <<
"<table cellspacing='10' cellpadding='0'><tr><td>\n";
60 stream <<
"<table width='100%' cellpadding='4' cellspacing='0'>\n";
61 stream <<
"<tr><td width='50%' bgcolor='lightgray'><font size='+1'><b>" << HelpWindow::tr(
"Action") <<
"</font></b></td>\n";
62 stream <<
"<td width='50%' bgcolor='lightgray'><font size='+1'><b>" << HelpWindow::tr(
"Shortcut") <<
"</font></b></td></tr>\n";
63 stream <<
"<!-- -------------------------------------------------- -->\n";
64 stream <<
"<tr><td colspan='2'><font size='+1'><b><u>" << HelpWindow::tr(
"Opening & Saving") <<
"</u></font></b></td></tr>\n";
65 stream <<
"<tr><td>" << HelpWindow::tr(
"New album") <<
"</td>\n";
66 stream <<
" <td>" << ((QString)QKeySequence(Qt::CTRL + Qt::Key_N)) <<
"</td></tr>\n";
67 stream <<
"<tr><td>" << HelpWindow::tr(
"Open album") <<
"</td>\n";
68 stream <<
" <td>" << ((QString)QKeySequence(Qt::CTRL + Qt::Key_O)) <<
"</td></tr>\n";
69 stream <<
"<tr><td>" << HelpWindow::tr(
"Open recent album") <<
"</td>\n";
70 stream <<
" <td>" << ControlPlus <<
"[1-9]" <<
"</td></tr>\n";
71 stream <<
"<tr><td>" << HelpWindow::tr(
"Save album") <<
"</td>\n";
72 stream <<
" <td>" << ((QString)QKeySequence(Qt::CTRL + Qt::Key_S)) <<
"</td></tr>\n";
73 stream <<
"<tr><td>" << HelpWindow::tr(
"Save album as") <<
"</td>\n";
74 stream <<
" <td>" << ((QString)QKeySequence(Qt::SHIFT + Qt::CTRL + Qt::Key_S)) <<
"</td></tr>\n";
75 stream <<
"<tr><td>" << HelpWindow::tr(
"Quit") <<
"</td>\n";
76 stream <<
" <td>" << ((QString)QKeySequence(Qt::CTRL + Qt::Key_Q)) <<
"</td></tr>\n";
77 stream <<
"<!-- -------------------------------------------------- -->\n";
78 stream <<
"<tr><td colspan='2'><hr></td></tr>\n";
79 stream <<
"<tr><td colspan='2'><font size='+1'><b><u>" << HelpWindow::tr(
"Organizing") <<
"</u></font></b></td></tr>\n";
80 stream <<
"<tr><td>" << HelpWindow::tr(
"Move to the first photo in the collection") <<
"</td>\n";
81 stream <<
" <td> Home </td></tr>\n";
82 stream <<
"<tr><td>" << HelpWindow::tr(
"Move to the last photo in the collection") <<
"</td>\n";
83 stream <<
" <td> End </td></tr>\n";
84 stream <<
"<tr><td>" << HelpWindow::tr(
"Select all photos") <<
"</td>\n";
85 stream <<
" <td>" << ((QString)QKeySequence(Qt::CTRL + Qt::Key_A)) <<
"</td></tr>\n";
86 stream <<
"<tr><td>" << HelpWindow::tr(
"Deselect all photos") <<
"</td>\n";
87 stream <<
" <td>" << ((QString)QKeySequence(Qt::SHIFT + Qt::CTRL + Qt::Key_A)) <<
"</td></tr>\n";
88 stream <<
"<tr><td>" << HelpWindow::tr(
"Rotate selected photos right") <<
"</td>\n";
89 stream <<
" <td>" << ((QString)QKeySequence(Qt::CTRL + Qt::Key_R)) <<
"</td></tr>\n";
90 stream <<
"<tr><td>" << HelpWindow::tr(
"Rotate selected photos left") <<
"</td>\n";
91 stream <<
" <td>" << ((QString)QKeySequence(Qt::CTRL + Qt::Key_L)) <<
"</td></tr>\n";
92 stream <<
"<tr><td>" << HelpWindow::tr(
"Delete selected photos") <<
"</td>\n";
93 stream <<
" <td> Del </td></tr>\n";
94 stream <<
"<tr><td>" << HelpWindow::tr(
"Modify selected photo description") <<
"</td>\n";
95 stream <<
" <td> Enter </td></tr>\n";
96 stream <<
"<tr><td>" << HelpWindow::tr(
"Finish modifying selected photo description") <<
"</td>\n";
97 stream <<
" <td> Esc </td></tr>\n";
98 stream <<
"<tr><td>" << HelpWindow::tr(
"Edit first of selected photos") <<
"</td>\n";
99 stream <<
" <td>" << ((QString)QKeySequence(Qt::CTRL + Qt::Key_E)) <<
"</td></tr>\n";
100 stream <<
"<!-- -------------------------------------------------- -->\n";
101 stream <<
"<tr><td colspan='2'><hr></td></tr>\n";
102 stream <<
"<tr><td colspan='2'><font size='+1'><b><u>" << HelpWindow::tr(
"Editing") <<
"</u></font></b></td></tr>\n";
104 stream <<
"<tr><td>" << HelpWindow::tr(
"Go to previous photo") <<
"</td>\n";
105 stream <<
" <td> PgUp </td></tr>\n";
106 stream <<
"<tr><td>" << HelpWindow::tr(
"Go to next photo") <<
"</td>\n";
107 stream <<
" <td> PgDown </td></tr>\n";
108 stream <<
"<tr><td>" << HelpWindow::tr(
"Go to first photo in the collection") <<
"</td>\n";
109 stream <<
" <td> Home </td></tr>\n";
110 stream <<
"<tr><td>" << HelpWindow::tr(
"Go to last photo in the collection") <<
"</td>\n";
111 stream <<
" <td> End </td></tr>\n";
112 stream <<
"<tr><td>" << HelpWindow::tr(
"Return to organizing") <<
"</td>\n";
113 stream <<
" <td> Esc </td></tr>\n";
115 stream <<
"<!-- =-=-=-=-=-=-=-=-=-=-= -->\n";
116 stream <<
"<tr><td colspan='2'> </td></tr>\n";
117 stream <<
"<!-- =-=-=-=-=-=-=-=-=-=-= -->\n";
118 stream <<
"<tr><td>" << HelpWindow::tr(
"Rotate photo right") <<
"</td>\n";
119 stream <<
" <td>" << ((QString)QKeySequence(Qt::CTRL + Qt::Key_R)) <<
"</td></tr>\n";
120 stream <<
"<tr><td>" << HelpWindow::tr(
"Rotate photo left") <<
"</td>\n";
121 stream <<
" <td>" << ((QString)QKeySequence(Qt::CTRL + Qt::Key_L)) <<
"</td></tr>\n";
122 stream <<
"<tr><td>" << HelpWindow::tr(
"Flip photo horizontally") <<
"</td>\n";
123 stream <<
" <td>" << ((QString)QKeySequence(Qt::CTRL + Qt::Key_F)) <<
"</td></tr>\n";
124 stream <<
"<tr><td>" << HelpWindow::tr(
"Flip photo vertically") <<
"</td>\n";
125 stream <<
" <td>" << ((QString)QKeySequence(Qt::ALT + Qt::CTRL + Qt::Key_F)) <<
"</td></tr>\n";
126 stream <<
"<!-- =-=-=-=-=-=-=-=-=-=-= -->\n";
127 stream <<
"<tr><td colspan='2'> </td></tr>\n";
128 stream <<
"<!-- =-=-=-=-=-=-=-=-=-=-= -->\n";
129 stream <<
"<tr><td>" << HelpWindow::tr(
"Select all") <<
"</td>\n";
130 stream <<
" <td>" << ((QString)QKeySequence(Qt::CTRL + Qt::Key_A)) <<
"</td></tr>\n";
131 stream <<
"<tr><td>" << HelpWindow::tr(
"Deselect all") <<
"</td>\n";
132 stream <<
" <td>" << ((QString)QKeySequence(Qt::SHIFT + Qt::CTRL + Qt::Key_A)) <<
"</td></tr>\n";
133 stream <<
"<tr><td>" << HelpWindow::tr(
"Nudge selection left") <<
"</td>\n";
134 stream <<
" <td>←</td></tr>\n";
135 stream <<
"<tr><td>" << HelpWindow::tr(
"Nudge selection right") <<
"</td>\n";
136 stream <<
" <td>→</td></tr>\n";
137 stream <<
"<tr><td>" << HelpWindow::tr(
"Nudge selection up") <<
"</td>\n";
138 stream <<
" <td>↑</td></tr>\n";
139 stream <<
"<tr><td>" << HelpWindow::tr(
"Nudge selection down") <<
"</td>\n";
140 stream <<
" <td>↓</td></tr>\n";
141 stream <<
"<tr><td>" << HelpWindow::tr(
"Expand selection") <<
"</td>\n";
142 stream <<
" <td>" << ((QString)QKeySequence(Qt::Key_Plus,Qt::Key_Equal)) <<
"</td></tr>\n";
143 stream <<
"<tr><td>" << HelpWindow::tr(
"Shrink selection") <<
"</td>\n";
144 stream <<
" <td>" << ((QString)QKeySequence(Qt::Key_Minus,Qt::Key_Underscore)) <<
"</td></tr>\n";
145 stream <<
"<tr><td>" << HelpWindow::tr(
"Resize selection") <<
"</td>\n";
146 stream <<
" <td>" << HelpWindow::tr(
"Press and hold Shift, then Click and Drag Left / Right") <<
"</td></tr>\n";
147 stream <<
"<tr><td>" << HelpWindow::tr(
"Rotate selection") <<
"</td>\n";
148 stream <<
" <td>" << (QString(HelpWindow::tr(
"Press and hold %1, then Click selection"))
149 .arg( Control )) <<
"</td></tr>\n";
150 stream <<
"<!-- -------------------------------------------------- -->\n";
151 stream <<
"<tr><td colspan='2'><hr></td></tr>\n";
152 stream <<
"<tr><td colspan='2'><font size='+1'><b><u>" << HelpWindow::tr(
"Levels and Grain Editors") <<
"</u></font></b></td></tr>\n";
154 stream <<
"<tr><td>" << HelpWindow::tr(
"Show alternative") <<
"</td>\n";
155 stream <<
" <td>" << QString(HelpWindow::tr(
"Hold %1")).arg( Control ) <<
"</td></tr>\n";
156 stream <<
"<tr><td>" << HelpWindow::tr(
"Select entire luminosity/color range") <<
"</td>\n";
157 stream <<
" <td>" << ((QString)QKeySequence(Qt::CTRL + Qt::Key_A)) <<
"</td></tr>\n";
158 stream <<
"<tr><td>" << HelpWindow::tr(
"Apply") <<
"</td>\n";
159 stream <<
" <td> Enter </td></tr>\n";
160 stream <<
"<tr><td>" << HelpWindow::tr(
"Cancel") <<
"</td>\n";
161 stream <<
" <td> Esc </td></tr>\n";
163 stream <<
"<!-- -------------------------------------------------- -->\n";
164 stream <<
"<tr><td colspan='2'><hr></td></tr>\n";
165 stream <<
"<tr><td colspan='2'><font size='+1'><b><u>" << HelpWindow::tr(
"Miscellaneous") <<
"</u></font></b></td></tr>\n";
166 stream <<
"<tr><td>" << HelpWindow::tr(
"View album statistics") <<
"</td>\n";
167 stream <<
" <td>" << ((QString)QKeySequence(Qt::CTRL + Qt::Key_I)) <<
"</td></tr>\n";
168 stream <<
"<tr><td>" << HelpWindow::tr(
"Album Shaper help") <<
"</td>\n";
169 stream <<
" <td>" << ((QString)QKeySequence(Qt::CTRL + Qt::Key_Question)) <<
"</td></tr>\n";
170 stream <<
"<!-- -------------------------------------------------- -->\n";
171 stream <<
"</table>\n";
173 stream <<
"</td></tr>\n";
174 stream <<
"</table></font>\n";
176 stream <<
"</body></html>\n";
static void generateHTML(Q3TextStream::Encoding type, QString charSet)
generates the shortcuts html file
static QString filename()
returns the shortcuts html filename