eric6/Documentation/Source/eric6.UI.Previewers.PreviewerHTML.html

changeset 7273
391d6b7b1eff
parent 7204
cbf6d88004ce
child 7301
6df711503ec0
equal deleted inserted replaced
7272:1779dc278077 7273:391d6b7b1eff
16 16
17 a { color: #BA6D36; } 17 a { color: #BA6D36; }
18 18
19 </style> 19 </style>
20 </head> 20 </head>
21 <body><a NAME="top" ID="top"></a> 21 <body>
22 <a NAME="top" ID="top"></a>
22 <h1>eric6.UI.Previewers.PreviewerHTML</h1> 23 <h1>eric6.UI.Previewers.PreviewerHTML</h1>
24
23 <p> 25 <p>
24 Module implementing a previewer widget for HTML, Markdown and ReST files. 26 Module implementing a previewer widget for HTML, Markdown and ReST files.
25 </p> 27 </p>
26 <h3>Global Attributes</h3> 28 <h3>Global Attributes</h3>
29
27 <table> 30 <table>
28 <tr><td>None</td></tr> 31 <tr><td>None</td></tr>
29 </table> 32 </table>
30 <h3>Classes</h3> 33 <h3>Classes</h3>
31 <table> 34
35 <table>
36
32 <tr> 37 <tr>
33 <td><a href="#PreviewProcessingThread">PreviewProcessingThread</a></td> 38 <td><a href="#PreviewProcessingThread">PreviewProcessingThread</a></td>
34 <td>Class implementing a thread to process some text into HTML usable by the previewer view.</td> 39 <td>Class implementing a thread to process some text into HTML usable by the previewer view.</td>
35 </tr><tr> 40 </tr>
41 <tr>
36 <td><a href="#PreviewerHTML">PreviewerHTML</a></td> 42 <td><a href="#PreviewerHTML">PreviewerHTML</a></td>
37 <td>Class implementing a previewer widget for HTML, Markdown and ReST files.</td> 43 <td>Class implementing a previewer widget for HTML, Markdown and ReST files.</td>
38 </tr><tr> 44 </tr>
45 <tr>
39 <td><a href="#_StrikeThroughExtension">_StrikeThroughExtension</a></td> 46 <td><a href="#_StrikeThroughExtension">_StrikeThroughExtension</a></td>
40 <td>Class is placed here, because it depends on imported markdown, and markdown import is lazy.</td> 47 <td>Class is placed here, because it depends on imported markdown, and markdown import is lazy.</td>
41 </tr> 48 </tr>
42 </table> 49 </table>
43 <h3>Functions</h3> 50 <h3>Functions</h3>
44 <table> 51
45 <tr><td>None</td></tr> 52 <table>
46 </table> 53 <tr><td>None</td></tr>
47 <hr /><hr /> 54 </table>
55 <hr />
56 <hr />
48 <a NAME="PreviewProcessingThread" ID="PreviewProcessingThread"></a> 57 <a NAME="PreviewProcessingThread" ID="PreviewProcessingThread"></a>
49 <h2>PreviewProcessingThread</h2> 58 <h2>PreviewProcessingThread</h2>
59
50 <p> 60 <p>
51 Class implementing a thread to process some text into HTML usable by the 61 Class implementing a thread to process some text into HTML usable by the
52 previewer view. 62 previewer view.
53 </p><h3>Signals</h3> 63 </p>
54 <dl> 64 <h3>Signals</h3>
65 <dl>
66
55 <dt>htmlReady(str, str, str)</dt> 67 <dt>htmlReady(str, str, str)</dt>
56 <dd> 68 <dd>
57 emitted with the file name, the processed 69 emitted with the file name, the processed
58 HTML and the web site root path to signal the availability of the 70 HTML and the web site root path to signal the availability of the
59 processed HTML 71 processed HTML
60 </dd> 72 </dd>
61 </dl> 73 </dl>
62 <h3>Derived from</h3> 74 <h3>Derived from</h3>
63 QThread 75 QThread
64 <h3>Class Attributes</h3> 76 <h3>Class Attributes</h3>
77
65 <table> 78 <table>
66 <tr><td>None</td></tr> 79 <tr><td>None</td></tr>
67 </table> 80 </table>
68 <h3>Class Methods</h3> 81 <h3>Class Methods</h3>
82
69 <table> 83 <table>
70 <tr><td>None</td></tr> 84 <tr><td>None</td></tr>
71 </table> 85 </table>
72 <h3>Methods</h3> 86 <h3>Methods</h3>
73 <table> 87
88 <table>
89
74 <tr> 90 <tr>
75 <td><a href="#PreviewProcessingThread.__init__">PreviewProcessingThread</a></td> 91 <td><a href="#PreviewProcessingThread.__init__">PreviewProcessingThread</a></td>
76 <td>Constructor</td> 92 <td>Constructor</td>
77 </tr><tr> 93 </tr>
94 <tr>
78 <td><a href="#PreviewProcessingThread.__convertMarkdown">__convertMarkdown</a></td> 95 <td><a href="#PreviewProcessingThread.__convertMarkdown">__convertMarkdown</a></td>
79 <td>Private method to convert Markdown text into HTML.</td> 96 <td>Private method to convert Markdown text into HTML.</td>
80 </tr><tr> 97 </tr>
98 <tr>
81 <td><a href="#PreviewProcessingThread.__convertReST">__convertReST</a></td> 99 <td><a href="#PreviewProcessingThread.__convertReST">__convertReST</a></td>
82 <td>Private method to convert ReST text into HTML.</td> 100 <td>Private method to convert ReST text into HTML.</td>
83 </tr><tr> 101 </tr>
102 <tr>
84 <td><a href="#PreviewProcessingThread.__convertReSTDocutils">__convertReSTDocutils</a></td> 103 <td><a href="#PreviewProcessingThread.__convertReSTDocutils">__convertReSTDocutils</a></td>
85 <td>Private method to convert ReST text into HTML using 'docutils'.</td> 104 <td>Private method to convert ReST text into HTML using 'docutils'.</td>
86 </tr><tr> 105 </tr>
106 <tr>
87 <td><a href="#PreviewProcessingThread.__convertReSTSphinx">__convertReSTSphinx</a></td> 107 <td><a href="#PreviewProcessingThread.__convertReSTSphinx">__convertReSTSphinx</a></td>
88 <td>Private method to convert ReST text into HTML using 'sphinx'.</td> 108 <td>Private method to convert ReST text into HTML using 'sphinx'.</td>
89 </tr><tr> 109 </tr>
110 <tr>
90 <td><a href="#PreviewProcessingThread.__getHtml">__getHtml</a></td> 111 <td><a href="#PreviewProcessingThread.__getHtml">__getHtml</a></td>
91 <td>Private method to process the given text depending upon the given language.</td> 112 <td>Private method to process the given text depending upon the given language.</td>
92 </tr><tr> 113 </tr>
114 <tr>
93 <td><a href="#PreviewProcessingThread.__processRootPath">__processRootPath</a></td> 115 <td><a href="#PreviewProcessingThread.__processRootPath">__processRootPath</a></td>
94 <td>Private method to adjust absolute references to the given root path.</td> 116 <td>Private method to adjust absolute references to the given root path.</td>
95 </tr><tr> 117 </tr>
118 <tr>
96 <td><a href="#PreviewProcessingThread.__processSSI">__processSSI</a></td> 119 <td><a href="#PreviewProcessingThread.__processSSI">__processSSI</a></td>
97 <td>Private method to process the given text for SSI statements.</td> 120 <td>Private method to process the given text for SSI statements.</td>
98 </tr><tr> 121 </tr>
122 <tr>
99 <td><a href="#PreviewProcessingThread.process">process</a></td> 123 <td><a href="#PreviewProcessingThread.process">process</a></td>
100 <td>Public method to convert the given text to HTML.</td> 124 <td>Public method to convert the given text to HTML.</td>
101 </tr><tr> 125 </tr>
126 <tr>
102 <td><a href="#PreviewProcessingThread.run">run</a></td> 127 <td><a href="#PreviewProcessingThread.run">run</a></td>
103 <td>Public thread method to convert the stored data.</td> 128 <td>Public thread method to convert the stored data.</td>
104 </tr> 129 </tr>
105 </table> 130 </table>
106 <h3>Static Methods</h3> 131 <h3>Static Methods</h3>
107 <table> 132
108 <tr><td>None</td></tr> 133 <table>
109 </table> 134 <tr><td>None</td></tr>
135 </table>
136
110 <a NAME="PreviewProcessingThread.__init__" ID="PreviewProcessingThread.__init__"></a> 137 <a NAME="PreviewProcessingThread.__init__" ID="PreviewProcessingThread.__init__"></a>
111 <h4>PreviewProcessingThread (Constructor)</h4> 138 <h4>PreviewProcessingThread (Constructor)</h4>
112 <b>PreviewProcessingThread</b>(<i>parent=None</i>) 139 <b>PreviewProcessingThread</b>(<i>parent=None</i>)
140
113 <p> 141 <p>
114 Constructor 142 Constructor
115 </p><dl> 143 </p>
144 <dl>
145
116 <dt><i>parent</i></dt> 146 <dt><i>parent</i></dt>
117 <dd> 147 <dd>
118 reference to the parent object (QObject) 148 reference to the parent object (QObject)
119 </dd> 149 </dd>
120 </dl><a NAME="PreviewProcessingThread.__convertMarkdown" ID="PreviewProcessingThread.__convertMarkdown"></a> 150 </dl>
151 <a NAME="PreviewProcessingThread.__convertMarkdown" ID="PreviewProcessingThread.__convertMarkdown"></a>
121 <h4>PreviewProcessingThread.__convertMarkdown</h4> 152 <h4>PreviewProcessingThread.__convertMarkdown</h4>
122 <b>__convertMarkdown</b>(<i>text, convertNewLineToBreak, htmlFormat</i>) 153 <b>__convertMarkdown</b>(<i>text, convertNewLineToBreak, htmlFormat</i>)
154
123 <p> 155 <p>
124 Private method to convert Markdown text into HTML. 156 Private method to convert Markdown text into HTML.
125 </p><dl> 157 </p>
158 <dl>
159
126 <dt><i>text</i></dt> 160 <dt><i>text</i></dt>
127 <dd> 161 <dd>
128 text to be processed (string) 162 text to be processed (string)
129 </dd><dt><i>convertNewLineToBreak</i></dt> 163 </dd>
164 <dt><i>convertNewLineToBreak</i></dt>
130 <dd> 165 <dd>
131 flag indicating to convert new lines 166 flag indicating to convert new lines
132 to HTML break (Markdown only) (boolean) 167 to HTML break (Markdown only) (boolean)
133 </dd><dt><i>htmlFormat</i></dt> 168 </dd>
169 <dt><i>htmlFormat</i></dt>
134 <dd> 170 <dd>
135 HTML format to be generated by markdown (string) 171 HTML format to be generated by markdown (string)
136 </dd> 172 </dd>
137 </dl><dl> 173 </dl>
174 <dl>
138 <dt>Returns:</dt> 175 <dt>Returns:</dt>
139 <dd> 176 <dd>
140 processed HTML (string) 177 processed HTML (string)
141 </dd> 178 </dd>
142 </dl><a NAME="PreviewProcessingThread.__convertReST" ID="PreviewProcessingThread.__convertReST"></a> 179 </dl>
180 <a NAME="PreviewProcessingThread.__convertReST" ID="PreviewProcessingThread.__convertReST"></a>
143 <h4>PreviewProcessingThread.__convertReST</h4> 181 <h4>PreviewProcessingThread.__convertReST</h4>
144 <b>__convertReST</b>(<i>text, useSphinx, restDocutilsHtmlFormat</i>) 182 <b>__convertReST</b>(<i>text, useSphinx, restDocutilsHtmlFormat</i>)
183
145 <p> 184 <p>
146 Private method to convert ReST text into HTML. 185 Private method to convert ReST text into HTML.
147 </p><dl> 186 </p>
187 <dl>
188
148 <dt><i>text</i></dt> 189 <dt><i>text</i></dt>
149 <dd> 190 <dd>
150 text to be processed (string) 191 text to be processed (string)
151 </dd><dt><i>useSphinx</i></dt> 192 </dd>
193 <dt><i>useSphinx</i></dt>
152 <dd> 194 <dd>
153 flag indicating to use Sphinx to generate the 195 flag indicating to use Sphinx to generate the
154 ReST preview (boolean) 196 ReST preview (boolean)
155 </dd><dt><i>restDocutilsHtmlFormat</i></dt> 197 </dd>
198 <dt><i>restDocutilsHtmlFormat</i></dt>
156 <dd> 199 <dd>
157 HTML format to be generated by docutils 200 HTML format to be generated by docutils
158 (string) 201 (string)
159 </dd> 202 </dd>
160 </dl><dl> 203 </dl>
204 <dl>
161 <dt>Returns:</dt> 205 <dt>Returns:</dt>
162 <dd> 206 <dd>
163 processed HTML (string) 207 processed HTML (string)
164 </dd> 208 </dd>
165 </dl><a NAME="PreviewProcessingThread.__convertReSTDocutils" ID="PreviewProcessingThread.__convertReSTDocutils"></a> 209 </dl>
210 <a NAME="PreviewProcessingThread.__convertReSTDocutils" ID="PreviewProcessingThread.__convertReSTDocutils"></a>
166 <h4>PreviewProcessingThread.__convertReSTDocutils</h4> 211 <h4>PreviewProcessingThread.__convertReSTDocutils</h4>
167 <b>__convertReSTDocutils</b>(<i>text, htmlFormat</i>) 212 <b>__convertReSTDocutils</b>(<i>text, htmlFormat</i>)
213
168 <p> 214 <p>
169 Private method to convert ReST text into HTML using 'docutils'. 215 Private method to convert ReST text into HTML using 'docutils'.
170 </p><dl> 216 </p>
217 <dl>
218
171 <dt><i>text</i></dt> 219 <dt><i>text</i></dt>
172 <dd> 220 <dd>
173 text to be processed (string) 221 text to be processed (string)
174 </dd><dt><i>htmlFormat</i></dt> 222 </dd>
223 <dt><i>htmlFormat</i></dt>
175 <dd> 224 <dd>
176 HTML format to be generated (string) 225 HTML format to be generated (string)
177 </dd> 226 </dd>
178 </dl><dl> 227 </dl>
228 <dl>
179 <dt>Returns:</dt> 229 <dt>Returns:</dt>
180 <dd> 230 <dd>
181 processed HTML (string) 231 processed HTML (string)
182 </dd> 232 </dd>
183 </dl><a NAME="PreviewProcessingThread.__convertReSTSphinx" ID="PreviewProcessingThread.__convertReSTSphinx"></a> 233 </dl>
234 <a NAME="PreviewProcessingThread.__convertReSTSphinx" ID="PreviewProcessingThread.__convertReSTSphinx"></a>
184 <h4>PreviewProcessingThread.__convertReSTSphinx</h4> 235 <h4>PreviewProcessingThread.__convertReSTSphinx</h4>
185 <b>__convertReSTSphinx</b>(<i>text</i>) 236 <b>__convertReSTSphinx</b>(<i>text</i>)
237
186 <p> 238 <p>
187 Private method to convert ReST text into HTML using 'sphinx'. 239 Private method to convert ReST text into HTML using 'sphinx'.
188 </p><dl> 240 </p>
241 <dl>
242
189 <dt><i>text</i></dt> 243 <dt><i>text</i></dt>
190 <dd> 244 <dd>
191 text to be processed (string) 245 text to be processed (string)
192 </dd> 246 </dd>
193 </dl><dl> 247 </dl>
248 <dl>
194 <dt>Returns:</dt> 249 <dt>Returns:</dt>
195 <dd> 250 <dd>
196 processed HTML (string) 251 processed HTML (string)
197 </dd> 252 </dd>
198 </dl><a NAME="PreviewProcessingThread.__getHtml" ID="PreviewProcessingThread.__getHtml"></a> 253 </dl>
254 <a NAME="PreviewProcessingThread.__getHtml" ID="PreviewProcessingThread.__getHtml"></a>
199 <h4>PreviewProcessingThread.__getHtml</h4> 255 <h4>PreviewProcessingThread.__getHtml</h4>
200 <b>__getHtml</b>(<i>language, text, ssiEnabled, filePath, rootPath, useSphinx, convertNewLineToBreak, markdownHtmlFormat, restDocutilsHtmlFormat</i>) 256 <b>__getHtml</b>(<i>language, text, ssiEnabled, filePath, rootPath, useSphinx, convertNewLineToBreak, markdownHtmlFormat, restDocutilsHtmlFormat</i>)
257
201 <p> 258 <p>
202 Private method to process the given text depending upon the given 259 Private method to process the given text depending upon the given
203 language. 260 language.
204 </p><dl> 261 </p>
262 <dl>
263
205 <dt><i>language</i></dt> 264 <dt><i>language</i></dt>
206 <dd> 265 <dd>
207 language of the text (string) 266 language of the text (string)
208 </dd><dt><i>text</i></dt> 267 </dd>
268 <dt><i>text</i></dt>
209 <dd> 269 <dd>
210 to be processed (string) 270 to be processed (string)
211 </dd><dt><i>ssiEnabled</i></dt> 271 </dd>
272 <dt><i>ssiEnabled</i></dt>
212 <dd> 273 <dd>
213 flag indicating to do some (limited) SSI processing 274 flag indicating to do some (limited) SSI processing
214 (boolean) 275 (boolean)
215 </dd><dt><i>filePath</i></dt> 276 </dd>
277 <dt><i>filePath</i></dt>
216 <dd> 278 <dd>
217 file path of the text (string) 279 file path of the text (string)
218 </dd><dt><i>rootPath</i></dt> 280 </dd>
281 <dt><i>rootPath</i></dt>
219 <dd> 282 <dd>
220 root path to be used for SSI processing (str) 283 root path to be used for SSI processing (str)
221 </dd><dt><i>useSphinx</i></dt> 284 </dd>
285 <dt><i>useSphinx</i></dt>
222 <dd> 286 <dd>
223 flag indicating to use Sphinx to generate the 287 flag indicating to use Sphinx to generate the
224 ReST preview (boolean) 288 ReST preview (boolean)
225 </dd><dt><i>convertNewLineToBreak</i></dt> 289 </dd>
290 <dt><i>convertNewLineToBreak</i></dt>
226 <dd> 291 <dd>
227 flag indicating to convert new lines 292 flag indicating to convert new lines
228 to HTML break (Markdown only) (boolean) 293 to HTML break (Markdown only) (boolean)
229 </dd><dt><i>markdownHtmlFormat</i></dt> 294 </dd>
295 <dt><i>markdownHtmlFormat</i></dt>
230 <dd> 296 <dd>
231 HTML format to be generated by markdown 297 HTML format to be generated by markdown
232 (string) 298 (string)
233 </dd><dt><i>restDocutilsHtmlFormat</i></dt> 299 </dd>
300 <dt><i>restDocutilsHtmlFormat</i></dt>
234 <dd> 301 <dd>
235 HTML format to be generated by docutils 302 HTML format to be generated by docutils
236 (string) 303 (string)
237 </dd> 304 </dd>
238 </dl><dl> 305 </dl>
306 <dl>
239 <dt>Returns:</dt> 307 <dt>Returns:</dt>
240 <dd> 308 <dd>
241 processed HTML text (string) 309 processed HTML text (string)
242 </dd> 310 </dd>
243 </dl><a NAME="PreviewProcessingThread.__processRootPath" ID="PreviewProcessingThread.__processRootPath"></a> 311 </dl>
312 <a NAME="PreviewProcessingThread.__processRootPath" ID="PreviewProcessingThread.__processRootPath"></a>
244 <h4>PreviewProcessingThread.__processRootPath</h4> 313 <h4>PreviewProcessingThread.__processRootPath</h4>
245 <b>__processRootPath</b>(<i>txt, root</i>) 314 <b>__processRootPath</b>(<i>txt, root</i>)
315
246 <p> 316 <p>
247 Private method to adjust absolute references to the given root path. 317 Private method to adjust absolute references to the given root path.
248 </p><dl> 318 </p>
319 <dl>
320
249 <dt><i>txt</i> (str)</dt> 321 <dt><i>txt</i> (str)</dt>
250 <dd> 322 <dd>
251 text to be processed 323 text to be processed
252 </dd><dt><i>root</i> (str)</dt> 324 </dd>
325 <dt><i>root</i> (str)</dt>
253 <dd> 326 <dd>
254 directory of the document root 327 directory of the document root
255 </dd> 328 </dd>
256 </dl><dl> 329 </dl>
330 <dl>
257 <dt>Returns:</dt> 331 <dt>Returns:</dt>
258 <dd> 332 <dd>
259 processed HTML 333 processed HTML
260 </dd> 334 </dd>
261 </dl><dl> 335 </dl>
336 <dl>
262 <dt>Return Type:</dt> 337 <dt>Return Type:</dt>
263 <dd> 338 <dd>
264 str 339 str
265 </dd> 340 </dd>
266 </dl><a NAME="PreviewProcessingThread.__processSSI" ID="PreviewProcessingThread.__processSSI"></a> 341 </dl>
342 <a NAME="PreviewProcessingThread.__processSSI" ID="PreviewProcessingThread.__processSSI"></a>
267 <h4>PreviewProcessingThread.__processSSI</h4> 343 <h4>PreviewProcessingThread.__processSSI</h4>
268 <b>__processSSI</b>(<i>txt, filename, root</i>) 344 <b>__processSSI</b>(<i>txt, filename, root</i>)
345
269 <p> 346 <p>
270 Private method to process the given text for SSI statements. 347 Private method to process the given text for SSI statements.
271 </p><p> 348 </p>
349 <p>
272 Note: Only a limited subset of SSI statements are supported. 350 Note: Only a limited subset of SSI statements are supported.
273 </p><dl> 351 </p>
352 <dl>
353
274 <dt><i>txt</i></dt> 354 <dt><i>txt</i></dt>
275 <dd> 355 <dd>
276 text to be processed (string) 356 text to be processed (string)
277 </dd><dt><i>filename</i></dt> 357 </dd>
358 <dt><i>filename</i></dt>
278 <dd> 359 <dd>
279 name of the file associated with the given text 360 name of the file associated with the given text
280 (string) 361 (string)
281 </dd><dt><i>root</i></dt> 362 </dd>
363 <dt><i>root</i></dt>
282 <dd> 364 <dd>
283 directory of the document root (string) 365 directory of the document root (string)
284 </dd> 366 </dd>
285 </dl><dl> 367 </dl>
368 <dl>
286 <dt>Returns:</dt> 369 <dt>Returns:</dt>
287 <dd> 370 <dd>
288 processed HTML (string) 371 processed HTML (string)
289 </dd> 372 </dd>
290 </dl><a NAME="PreviewProcessingThread.process" ID="PreviewProcessingThread.process"></a> 373 </dl>
374 <a NAME="PreviewProcessingThread.process" ID="PreviewProcessingThread.process"></a>
291 <h4>PreviewProcessingThread.process</h4> 375 <h4>PreviewProcessingThread.process</h4>
292 <b>process</b>(<i>filePath, language, text, ssiEnabled, rootPath, useSphinx, convertNewLineToBreak, markdownHtmlFormat, restDocutilsHtmlFormat</i>) 376 <b>process</b>(<i>filePath, language, text, ssiEnabled, rootPath, useSphinx, convertNewLineToBreak, markdownHtmlFormat, restDocutilsHtmlFormat</i>)
377
293 <p> 378 <p>
294 Public method to convert the given text to HTML. 379 Public method to convert the given text to HTML.
295 </p><dl> 380 </p>
381 <dl>
382
296 <dt><i>filePath</i></dt> 383 <dt><i>filePath</i></dt>
297 <dd> 384 <dd>
298 file path of the text (string) 385 file path of the text (string)
299 </dd><dt><i>language</i></dt> 386 </dd>
387 <dt><i>language</i></dt>
300 <dd> 388 <dd>
301 language of the text (string) 389 language of the text (string)
302 </dd><dt><i>text</i></dt> 390 </dd>
391 <dt><i>text</i></dt>
303 <dd> 392 <dd>
304 text to be processed (string) 393 text to be processed (string)
305 </dd><dt><i>ssiEnabled</i></dt> 394 </dd>
395 <dt><i>ssiEnabled</i></dt>
306 <dd> 396 <dd>
307 flag indicating to do some (limited) SSI processing 397 flag indicating to do some (limited) SSI processing
308 (boolean) 398 (boolean)
309 </dd><dt><i>rootPath</i></dt> 399 </dd>
400 <dt><i>rootPath</i></dt>
310 <dd> 401 <dd>
311 root path to be used for SSI processing (str) 402 root path to be used for SSI processing (str)
312 </dd><dt><i>useSphinx</i></dt> 403 </dd>
404 <dt><i>useSphinx</i></dt>
313 <dd> 405 <dd>
314 flag indicating to use Sphinx to generate the 406 flag indicating to use Sphinx to generate the
315 ReST preview (boolean) 407 ReST preview (boolean)
316 </dd><dt><i>convertNewLineToBreak</i></dt> 408 </dd>
409 <dt><i>convertNewLineToBreak</i></dt>
317 <dd> 410 <dd>
318 flag indicating to convert new lines 411 flag indicating to convert new lines
319 to HTML break (Markdown only) (boolean) 412 to HTML break (Markdown only) (boolean)
320 </dd><dt><i>markdownHtmlFormat</i></dt> 413 </dd>
414 <dt><i>markdownHtmlFormat</i></dt>
321 <dd> 415 <dd>
322 HTML format to be generated by markdown 416 HTML format to be generated by markdown
323 (string) 417 (string)
324 </dd><dt><i>restDocutilsHtmlFormat</i></dt> 418 </dd>
419 <dt><i>restDocutilsHtmlFormat</i></dt>
325 <dd> 420 <dd>
326 HTML format to be generated by docutils 421 HTML format to be generated by docutils
327 (string) 422 (string)
328 </dd> 423 </dd>
329 </dl><a NAME="PreviewProcessingThread.run" ID="PreviewProcessingThread.run"></a> 424 </dl>
425 <a NAME="PreviewProcessingThread.run" ID="PreviewProcessingThread.run"></a>
330 <h4>PreviewProcessingThread.run</h4> 426 <h4>PreviewProcessingThread.run</h4>
331 <b>run</b>(<i></i>) 427 <b>run</b>(<i></i>)
428
332 <p> 429 <p>
333 Public thread method to convert the stored data. 430 Public thread method to convert the stored data.
334 </p> 431 </p>
335 <div align="right"><a href="#top">Up</a></div> 432 <div align="right"><a href="#top">Up</a></div>
336 <hr /><hr /> 433 <hr />
434 <hr />
337 <a NAME="PreviewerHTML" ID="PreviewerHTML"></a> 435 <a NAME="PreviewerHTML" ID="PreviewerHTML"></a>
338 <h2>PreviewerHTML</h2> 436 <h2>PreviewerHTML</h2>
437
339 <p> 438 <p>
340 Class implementing a previewer widget for HTML, Markdown and ReST files. 439 Class implementing a previewer widget for HTML, Markdown and ReST files.
341 </p> 440 </p>
342 <h3>Derived from</h3> 441 <h3>Derived from</h3>
343 QWidget 442 QWidget
344 <h3>Class Attributes</h3> 443 <h3>Class Attributes</h3>
444
345 <table> 445 <table>
346 <tr><td>None</td></tr> 446 <tr><td>None</td></tr>
347 </table> 447 </table>
348 <h3>Class Methods</h3> 448 <h3>Class Methods</h3>
449
349 <table> 450 <table>
350 <tr><td>None</td></tr> 451 <tr><td>None</td></tr>
351 </table> 452 </table>
352 <h3>Methods</h3> 453 <h3>Methods</h3>
353 <table> 454
455 <table>
456
354 <tr> 457 <tr>
355 <td><a href="#PreviewerHTML.__init__">PreviewerHTML</a></td> 458 <td><a href="#PreviewerHTML.__init__">PreviewerHTML</a></td>
356 <td>Constructor</td> 459 <td>Constructor</td>
357 </tr><tr> 460 </tr>
461 <tr>
358 <td><a href="#PreviewerHTML.__execJavaScript">__execJavaScript</a></td> 462 <td><a href="#PreviewerHTML.__execJavaScript">__execJavaScript</a></td>
359 <td>Private function to execute a JavaScript function Synchroneously.</td> 463 <td>Private function to execute a JavaScript function Synchroneously.</td>
360 </tr><tr> 464 </tr>
465 <tr>
361 <td><a href="#PreviewerHTML.__restoreScrollBarPositions">__restoreScrollBarPositions</a></td> 466 <td><a href="#PreviewerHTML.__restoreScrollBarPositions">__restoreScrollBarPositions</a></td>
362 <td>Private method to restore scroll bar positions for a previewed editor.</td> 467 <td>Private method to restore scroll bar positions for a previewed editor.</td>
363 </tr><tr> 468 </tr>
469 <tr>
364 <td><a href="#PreviewerHTML.__saveScrollBarPositions">__saveScrollBarPositions</a></td> 470 <td><a href="#PreviewerHTML.__saveScrollBarPositions">__saveScrollBarPositions</a></td>
365 <td>Private method to save scroll bar positions for a previewed editor.</td> 471 <td>Private method to save scroll bar positions for a previewed editor.</td>
366 </tr><tr> 472 </tr>
473 <tr>
367 <td><a href="#PreviewerHTML.__setHtml">__setHtml</a></td> 474 <td><a href="#PreviewerHTML.__setHtml">__setHtml</a></td>
368 <td>Private method to set the HTML to the view and restore the scroll bars positions.</td> 475 <td>Private method to set the HTML to the view and restore the scroll bars positions.</td>
369 </tr><tr> 476 </tr>
477 <tr>
370 <td><a href="#PreviewerHTML.__setJavaScriptEnabled">__setJavaScriptEnabled</a></td> 478 <td><a href="#PreviewerHTML.__setJavaScriptEnabled">__setJavaScriptEnabled</a></td>
371 <td>Private method to enable/disable JavaScript.</td> 479 <td>Private method to enable/disable JavaScript.</td>
372 </tr><tr> 480 </tr>
481 <tr>
373 <td><a href="#PreviewerHTML.__showLink">__showLink</a></td> 482 <td><a href="#PreviewerHTML.__showLink">__showLink</a></td>
374 <td>Private slot to show the hovered link in a tooltip.</td> 483 <td>Private slot to show the hovered link in a tooltip.</td>
375 </tr><tr> 484 </tr>
485 <tr>
376 <td><a href="#PreviewerHTML.on_jsCheckBox_clicked">on_jsCheckBox_clicked</a></td> 486 <td><a href="#PreviewerHTML.on_jsCheckBox_clicked">on_jsCheckBox_clicked</a></td>
377 <td>Private slot to enable/disable JavaScript.</td> 487 <td>Private slot to enable/disable JavaScript.</td>
378 </tr><tr> 488 </tr>
489 <tr>
379 <td><a href="#PreviewerHTML.on_previewView_titleChanged">on_previewView_titleChanged</a></td> 490 <td><a href="#PreviewerHTML.on_previewView_titleChanged">on_previewView_titleChanged</a></td>
380 <td>Private slot to handle a change of the title.</td> 491 <td>Private slot to handle a change of the title.</td>
381 </tr><tr> 492 </tr>
493 <tr>
382 <td><a href="#PreviewerHTML.on_ssiCheckBox_clicked">on_ssiCheckBox_clicked</a></td> 494 <td><a href="#PreviewerHTML.on_ssiCheckBox_clicked">on_ssiCheckBox_clicked</a></td>
383 <td>Private slot to enable/disable SSI.</td> 495 <td>Private slot to enable/disable SSI.</td>
384 </tr><tr> 496 </tr>
497 <tr>
385 <td><a href="#PreviewerHTML.processEditor">processEditor</a></td> 498 <td><a href="#PreviewerHTML.processEditor">processEditor</a></td>
386 <td>Public slot to process an editor's text.</td> 499 <td>Public slot to process an editor's text.</td>
387 </tr><tr> 500 </tr>
501 <tr>
388 <td><a href="#PreviewerHTML.resultCallback">resultCallback</a></td> 502 <td><a href="#PreviewerHTML.resultCallback">resultCallback</a></td>
389 <td></td> 503 <td></td>
390 </tr><tr> 504 </tr>
505 <tr>
391 <td><a href="#PreviewerHTML.shutdown">shutdown</a></td> 506 <td><a href="#PreviewerHTML.shutdown">shutdown</a></td>
392 <td>Public method to perform shutdown actions.</td> 507 <td>Public method to perform shutdown actions.</td>
393 </tr> 508 </tr>
394 </table> 509 </table>
395 <h3>Static Methods</h3> 510 <h3>Static Methods</h3>
396 <table> 511
397 <tr><td>None</td></tr> 512 <table>
398 </table> 513 <tr><td>None</td></tr>
514 </table>
515
399 <a NAME="PreviewerHTML.__init__" ID="PreviewerHTML.__init__"></a> 516 <a NAME="PreviewerHTML.__init__" ID="PreviewerHTML.__init__"></a>
400 <h4>PreviewerHTML (Constructor)</h4> 517 <h4>PreviewerHTML (Constructor)</h4>
401 <b>PreviewerHTML</b>(<i>parent=None</i>) 518 <b>PreviewerHTML</b>(<i>parent=None</i>)
519
402 <p> 520 <p>
403 Constructor 521 Constructor
404 </p><dl> 522 </p>
523 <dl>
524
405 <dt><i>parent</i></dt> 525 <dt><i>parent</i></dt>
406 <dd> 526 <dd>
407 reference to the parent widget (QWidget) 527 reference to the parent widget (QWidget)
408 </dd> 528 </dd>
409 </dl><a NAME="PreviewerHTML.__execJavaScript" ID="PreviewerHTML.__execJavaScript"></a> 529 </dl>
530 <a NAME="PreviewerHTML.__execJavaScript" ID="PreviewerHTML.__execJavaScript"></a>
410 <h4>PreviewerHTML.__execJavaScript</h4> 531 <h4>PreviewerHTML.__execJavaScript</h4>
411 <b>__execJavaScript</b>(<i>script</i>) 532 <b>__execJavaScript</b>(<i>script</i>)
533
412 <p> 534 <p>
413 Private function to execute a JavaScript function Synchroneously. 535 Private function to execute a JavaScript function Synchroneously.
414 </p><dl> 536 </p>
537 <dl>
538
415 <dt><i>script</i> (str)</dt> 539 <dt><i>script</i> (str)</dt>
416 <dd> 540 <dd>
417 JavaScript script source to be executed 541 JavaScript script source to be executed
418 </dd> 542 </dd>
419 </dl><dl> 543 </dl>
544 <dl>
420 <dt>Returns:</dt> 545 <dt>Returns:</dt>
421 <dd> 546 <dd>
422 result of the script 547 result of the script
423 </dd> 548 </dd>
424 </dl><dl> 549 </dl>
550 <dl>
425 <dt>Return Type:</dt> 551 <dt>Return Type:</dt>
426 <dd> 552 <dd>
427 depending upon script result 553 depending upon script result
428 </dd> 554 </dd>
429 </dl><a NAME="PreviewerHTML.__restoreScrollBarPositions" ID="PreviewerHTML.__restoreScrollBarPositions"></a> 555 </dl>
556 <a NAME="PreviewerHTML.__restoreScrollBarPositions" ID="PreviewerHTML.__restoreScrollBarPositions"></a>
430 <h4>PreviewerHTML.__restoreScrollBarPositions</h4> 557 <h4>PreviewerHTML.__restoreScrollBarPositions</h4>
431 <b>__restoreScrollBarPositions</b>(<i></i>) 558 <b>__restoreScrollBarPositions</b>(<i></i>)
559
432 <p> 560 <p>
433 Private method to restore scroll bar positions for a previewed editor. 561 Private method to restore scroll bar positions for a previewed editor.
434 </p><a NAME="PreviewerHTML.__saveScrollBarPositions" ID="PreviewerHTML.__saveScrollBarPositions"></a> 562 </p>
563 <a NAME="PreviewerHTML.__saveScrollBarPositions" ID="PreviewerHTML.__saveScrollBarPositions"></a>
435 <h4>PreviewerHTML.__saveScrollBarPositions</h4> 564 <h4>PreviewerHTML.__saveScrollBarPositions</h4>
436 <b>__saveScrollBarPositions</b>(<i></i>) 565 <b>__saveScrollBarPositions</b>(<i></i>)
566
437 <p> 567 <p>
438 Private method to save scroll bar positions for a previewed editor. 568 Private method to save scroll bar positions for a previewed editor.
439 </p><a NAME="PreviewerHTML.__setHtml" ID="PreviewerHTML.__setHtml"></a> 569 </p>
570 <a NAME="PreviewerHTML.__setHtml" ID="PreviewerHTML.__setHtml"></a>
440 <h4>PreviewerHTML.__setHtml</h4> 571 <h4>PreviewerHTML.__setHtml</h4>
441 <b>__setHtml</b>(<i>filePath, html, rootPath</i>) 572 <b>__setHtml</b>(<i>filePath, html, rootPath</i>)
573
442 <p> 574 <p>
443 Private method to set the HTML to the view and restore the scroll bars 575 Private method to set the HTML to the view and restore the scroll bars
444 positions. 576 positions.
445 </p><dl> 577 </p>
578 <dl>
579
446 <dt><i>filePath</i> (str)</dt> 580 <dt><i>filePath</i> (str)</dt>
447 <dd> 581 <dd>
448 file path of the previewed editor 582 file path of the previewed editor
449 </dd><dt><i>html</i> (str)</dt> 583 </dd>
584 <dt><i>html</i> (str)</dt>
450 <dd> 585 <dd>
451 processed HTML text ready to be shown 586 processed HTML text ready to be shown
452 </dd><dt><i>rootPath</i> (str)</dt> 587 </dd>
588 <dt><i>rootPath</i> (str)</dt>
453 <dd> 589 <dd>
454 path of the web site root 590 path of the web site root
455 </dd> 591 </dd>
456 </dl><a NAME="PreviewerHTML.__setJavaScriptEnabled" ID="PreviewerHTML.__setJavaScriptEnabled"></a> 592 </dl>
593 <a NAME="PreviewerHTML.__setJavaScriptEnabled" ID="PreviewerHTML.__setJavaScriptEnabled"></a>
457 <h4>PreviewerHTML.__setJavaScriptEnabled</h4> 594 <h4>PreviewerHTML.__setJavaScriptEnabled</h4>
458 <b>__setJavaScriptEnabled</b>(<i>enable</i>) 595 <b>__setJavaScriptEnabled</b>(<i>enable</i>)
596
459 <p> 597 <p>
460 Private method to enable/disable JavaScript. 598 Private method to enable/disable JavaScript.
461 </p><dl> 599 </p>
600 <dl>
601
462 <dt><i>enable</i></dt> 602 <dt><i>enable</i></dt>
463 <dd> 603 <dd>
464 flag indicating the enable state (boolean) 604 flag indicating the enable state (boolean)
465 </dd> 605 </dd>
466 </dl><a NAME="PreviewerHTML.__showLink" ID="PreviewerHTML.__showLink"></a> 606 </dl>
607 <a NAME="PreviewerHTML.__showLink" ID="PreviewerHTML.__showLink"></a>
467 <h4>PreviewerHTML.__showLink</h4> 608 <h4>PreviewerHTML.__showLink</h4>
468 <b>__showLink</b>(<i>urlStr</i>) 609 <b>__showLink</b>(<i>urlStr</i>)
610
469 <p> 611 <p>
470 Private slot to show the hovered link in a tooltip. 612 Private slot to show the hovered link in a tooltip.
471 </p><dl> 613 </p>
614 <dl>
615
472 <dt><i>urlStr</i> (str)</dt> 616 <dt><i>urlStr</i> (str)</dt>
473 <dd> 617 <dd>
474 hovered URL 618 hovered URL
475 </dd> 619 </dd>
476 </dl><a NAME="PreviewerHTML.on_jsCheckBox_clicked" ID="PreviewerHTML.on_jsCheckBox_clicked"></a> 620 </dl>
621 <a NAME="PreviewerHTML.on_jsCheckBox_clicked" ID="PreviewerHTML.on_jsCheckBox_clicked"></a>
477 <h4>PreviewerHTML.on_jsCheckBox_clicked</h4> 622 <h4>PreviewerHTML.on_jsCheckBox_clicked</h4>
478 <b>on_jsCheckBox_clicked</b>(<i>checked</i>) 623 <b>on_jsCheckBox_clicked</b>(<i>checked</i>)
624
479 <p> 625 <p>
480 Private slot to enable/disable JavaScript. 626 Private slot to enable/disable JavaScript.
481 </p><dl> 627 </p>
628 <dl>
629
482 <dt><i>checked</i></dt> 630 <dt><i>checked</i></dt>
483 <dd> 631 <dd>
484 state of the checkbox (boolean) 632 state of the checkbox (boolean)
485 </dd> 633 </dd>
486 </dl><a NAME="PreviewerHTML.on_previewView_titleChanged" ID="PreviewerHTML.on_previewView_titleChanged"></a> 634 </dl>
635 <a NAME="PreviewerHTML.on_previewView_titleChanged" ID="PreviewerHTML.on_previewView_titleChanged"></a>
487 <h4>PreviewerHTML.on_previewView_titleChanged</h4> 636 <h4>PreviewerHTML.on_previewView_titleChanged</h4>
488 <b>on_previewView_titleChanged</b>(<i>title</i>) 637 <b>on_previewView_titleChanged</b>(<i>title</i>)
638
489 <p> 639 <p>
490 Private slot to handle a change of the title. 640 Private slot to handle a change of the title.
491 </p><dl> 641 </p>
642 <dl>
643
492 <dt><i>title</i></dt> 644 <dt><i>title</i></dt>
493 <dd> 645 <dd>
494 new title (string) 646 new title (string)
495 </dd> 647 </dd>
496 </dl><a NAME="PreviewerHTML.on_ssiCheckBox_clicked" ID="PreviewerHTML.on_ssiCheckBox_clicked"></a> 648 </dl>
649 <a NAME="PreviewerHTML.on_ssiCheckBox_clicked" ID="PreviewerHTML.on_ssiCheckBox_clicked"></a>
497 <h4>PreviewerHTML.on_ssiCheckBox_clicked</h4> 650 <h4>PreviewerHTML.on_ssiCheckBox_clicked</h4>
498 <b>on_ssiCheckBox_clicked</b>(<i>checked</i>) 651 <b>on_ssiCheckBox_clicked</b>(<i>checked</i>)
652
499 <p> 653 <p>
500 Private slot to enable/disable SSI. 654 Private slot to enable/disable SSI.
501 </p><dl> 655 </p>
656 <dl>
657
502 <dt><i>checked</i></dt> 658 <dt><i>checked</i></dt>
503 <dd> 659 <dd>
504 state of the checkbox (boolean) 660 state of the checkbox (boolean)
505 </dd> 661 </dd>
506 </dl><a NAME="PreviewerHTML.processEditor" ID="PreviewerHTML.processEditor"></a> 662 </dl>
663 <a NAME="PreviewerHTML.processEditor" ID="PreviewerHTML.processEditor"></a>
507 <h4>PreviewerHTML.processEditor</h4> 664 <h4>PreviewerHTML.processEditor</h4>
508 <b>processEditor</b>(<i>editor=None</i>) 665 <b>processEditor</b>(<i>editor=None</i>)
666
509 <p> 667 <p>
510 Public slot to process an editor's text. 668 Public slot to process an editor's text.
511 </p><dl> 669 </p>
670 <dl>
671
512 <dt><i>editor</i></dt> 672 <dt><i>editor</i></dt>
513 <dd> 673 <dd>
514 editor to be processed (Editor) 674 editor to be processed (Editor)
515 </dd> 675 </dd>
516 </dl><a NAME="PreviewerHTML.resultCallback" ID="PreviewerHTML.resultCallback"></a> 676 </dl>
677 <a NAME="PreviewerHTML.resultCallback" ID="PreviewerHTML.resultCallback"></a>
517 <h4>PreviewerHTML.resultCallback</h4> 678 <h4>PreviewerHTML.resultCallback</h4>
518 <b>resultCallback</b>(<i>resDict=resultDict</i>) 679 <b>resultCallback</b>(<i>resDict=resultDict</i>)
680
519 <a NAME="PreviewerHTML.shutdown" ID="PreviewerHTML.shutdown"></a> 681 <a NAME="PreviewerHTML.shutdown" ID="PreviewerHTML.shutdown"></a>
520 <h4>PreviewerHTML.shutdown</h4> 682 <h4>PreviewerHTML.shutdown</h4>
521 <b>shutdown</b>(<i></i>) 683 <b>shutdown</b>(<i></i>)
684
522 <p> 685 <p>
523 Public method to perform shutdown actions. 686 Public method to perform shutdown actions.
524 </p> 687 </p>
525 <div align="right"><a href="#top">Up</a></div> 688 <div align="right"><a href="#top">Up</a></div>
526 <hr /><hr /> 689 <hr />
690 <hr />
527 <a NAME="_StrikeThroughExtension" ID="_StrikeThroughExtension"></a> 691 <a NAME="_StrikeThroughExtension" ID="_StrikeThroughExtension"></a>
528 <h2>_StrikeThroughExtension</h2> 692 <h2>_StrikeThroughExtension</h2>
693
529 <p> 694 <p>
530 Class is placed here, because it depends on imported markdown, 695 Class is placed here, because it depends on imported markdown,
531 and markdown import is lazy. 696 and markdown import is lazy.
532 </p><p> 697 </p>
698 <p>
533 (see https://pythonhosted.org/Markdown/extensions/api.html 699 (see https://pythonhosted.org/Markdown/extensions/api.html
534 this page for details) 700 this page for details)
535 </p> 701 </p>
536 <h3>Derived from</h3> 702 <h3>Derived from</h3>
537 markdown.Extension 703 markdown.Extension
538 <h3>Class Attributes</h3> 704 <h3>Class Attributes</h3>
705
539 <table> 706 <table>
540 <tr><td>DEL_RE</td></tr> 707 <tr><td>DEL_RE</td></tr>
541 </table> 708 </table>
542 <h3>Class Methods</h3> 709 <h3>Class Methods</h3>
710
543 <table> 711 <table>
544 <tr><td>None</td></tr> 712 <tr><td>None</td></tr>
545 </table> 713 </table>
546 <h3>Methods</h3> 714 <h3>Methods</h3>
547 <table> 715
716 <table>
717
548 <tr> 718 <tr>
549 <td><a href="#_StrikeThroughExtension.extendMarkdown">extendMarkdown</a></td> 719 <td><a href="#_StrikeThroughExtension.extendMarkdown">extendMarkdown</a></td>
550 <td></td> 720 <td></td>
551 </tr> 721 </tr>
552 </table> 722 </table>
553 <h3>Static Methods</h3> 723 <h3>Static Methods</h3>
554 <table> 724
555 <tr><td>None</td></tr> 725 <table>
556 </table> 726 <tr><td>None</td></tr>
727 </table>
728
557 <a NAME="_StrikeThroughExtension.extendMarkdown" ID="_StrikeThroughExtension.extendMarkdown"></a> 729 <a NAME="_StrikeThroughExtension.extendMarkdown" ID="_StrikeThroughExtension.extendMarkdown"></a>
558 <h4>_StrikeThroughExtension.extendMarkdown</h4> 730 <h4>_StrikeThroughExtension.extendMarkdown</h4>
559 <b>extendMarkdown</b>(<i>md, md_globals</i>) 731 <b>extendMarkdown</b>(<i>md, md_globals</i>)
560 732
561 <div align="right"><a href="#top">Up</a></div> 733 <div align="right"><a href="#top">Up</a></div>

eric ide

mercurial