|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.QScintilla.MiniEditor</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.QScintilla.MiniEditor</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing an editor for simple editing tasks. |
|
13 </p> |
|
14 <h3>Global Attributes</h3> |
|
15 |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 |
|
21 <table> |
|
22 |
|
23 <tr> |
|
24 <td><a href="#MiniEditor">MiniEditor</a></td> |
|
25 <td>Class implementing an editor for simple editing tasks.</td> |
|
26 </tr> |
|
27 <tr> |
|
28 <td><a href="#MiniScintilla">MiniScintilla</a></td> |
|
29 <td>Class implementing a QsciScintillaCompat subclass for handling focus events.</td> |
|
30 </tr> |
|
31 </table> |
|
32 <h3>Functions</h3> |
|
33 |
|
34 <table> |
|
35 <tr><td>None</td></tr> |
|
36 </table> |
|
37 <hr /> |
|
38 <hr /> |
|
39 <a NAME="MiniEditor" ID="MiniEditor"></a> |
|
40 <h2>MiniEditor</h2> |
|
41 |
|
42 <p> |
|
43 Class implementing an editor for simple editing tasks. |
|
44 </p> |
|
45 <h3>Signals</h3> |
|
46 <dl> |
|
47 |
|
48 <dt>cursorLineChanged(int)</dt> |
|
49 <dd> |
|
50 emitted when the cursor line was changed |
|
51 </dd> |
|
52 <dt>editorRenamed(str)</dt> |
|
53 <dd> |
|
54 emitted after the editor got a new name |
|
55 (i.e. after a 'Save As') |
|
56 </dd> |
|
57 <dt>editorSaved()</dt> |
|
58 <dd> |
|
59 emitted after the file has been saved |
|
60 </dd> |
|
61 <dt>languageChanged(str)</dt> |
|
62 <dd> |
|
63 emitted when the editors language was set. The |
|
64 language is passed as a parameter. |
|
65 </dd> |
|
66 <dt>refreshed()</dt> |
|
67 <dd> |
|
68 dummy signal to emulate the Editor interface |
|
69 </dd> |
|
70 </dl> |
|
71 <h3>Derived from</h3> |
|
72 EricMainWindow |
|
73 <h3>Class Attributes</h3> |
|
74 |
|
75 <table> |
|
76 <tr><td>None</td></tr> |
|
77 </table> |
|
78 <h3>Class Methods</h3> |
|
79 |
|
80 <table> |
|
81 <tr><td>None</td></tr> |
|
82 </table> |
|
83 <h3>Methods</h3> |
|
84 |
|
85 <table> |
|
86 |
|
87 <tr> |
|
88 <td><a href="#MiniEditor.__init__">MiniEditor</a></td> |
|
89 <td>Constructor</td> |
|
90 </tr> |
|
91 <tr> |
|
92 <td><a href="#MiniEditor.__about">__about</a></td> |
|
93 <td>Private slot to show a little About message.</td> |
|
94 </tr> |
|
95 <tr> |
|
96 <td><a href="#MiniEditor.__aboutQt">__aboutQt</a></td> |
|
97 <td>Private slot to handle the About Qt dialog.</td> |
|
98 </tr> |
|
99 <tr> |
|
100 <td><a href="#MiniEditor.__bindLexer">__bindLexer</a></td> |
|
101 <td>Private slot to set the correct lexer depending on language.</td> |
|
102 </tr> |
|
103 <tr> |
|
104 <td><a href="#MiniEditor.__bindName">__bindName</a></td> |
|
105 <td>Private method to generate a dummy filename for binding a lexer.</td> |
|
106 </tr> |
|
107 <tr> |
|
108 <td><a href="#MiniEditor.__checkActions">__checkActions</a></td> |
|
109 <td>Private slot to check some actions for their enable/disable status and set the statusbar info.</td> |
|
110 </tr> |
|
111 <tr> |
|
112 <td><a href="#MiniEditor.__checkLanguage">__checkLanguage</a></td> |
|
113 <td>Private method to check the selected language of the language submenu.</td> |
|
114 </tr> |
|
115 <tr> |
|
116 <td><a href="#MiniEditor.__contextMenuRequested">__contextMenuRequested</a></td> |
|
117 <td>Private slot to show the context menu.</td> |
|
118 </tr> |
|
119 <tr> |
|
120 <td><a href="#MiniEditor.__convertTabs">__convertTabs</a></td> |
|
121 <td>Private slot to convert tabulators to spaces.</td> |
|
122 </tr> |
|
123 <tr> |
|
124 <td><a href="#MiniEditor.__createActions">__createActions</a></td> |
|
125 <td>Private method to create the actions.</td> |
|
126 </tr> |
|
127 <tr> |
|
128 <td><a href="#MiniEditor.__createConfigActions">__createConfigActions</a></td> |
|
129 <td>Private method to create the Settings actions.</td> |
|
130 </tr> |
|
131 <tr> |
|
132 <td><a href="#MiniEditor.__createEditActions">__createEditActions</a></td> |
|
133 <td>Private method to create the Edit actions.</td> |
|
134 </tr> |
|
135 <tr> |
|
136 <td><a href="#MiniEditor.__createFileActions">__createFileActions</a></td> |
|
137 <td>Private method to create the File actions.</td> |
|
138 </tr> |
|
139 <tr> |
|
140 <td><a href="#MiniEditor.__createHelpActions">__createHelpActions</a></td> |
|
141 <td>Private method to create the Help actions.</td> |
|
142 </tr> |
|
143 <tr> |
|
144 <td><a href="#MiniEditor.__createMenus">__createMenus</a></td> |
|
145 <td>Private method to create the menus of the menu bar.</td> |
|
146 </tr> |
|
147 <tr> |
|
148 <td><a href="#MiniEditor.__createSearchActions">__createSearchActions</a></td> |
|
149 <td>Private method defining the user interface actions for the search commands.</td> |
|
150 </tr> |
|
151 <tr> |
|
152 <td><a href="#MiniEditor.__createStatusBar">__createStatusBar</a></td> |
|
153 <td>Private method to initialize the status bar.</td> |
|
154 </tr> |
|
155 <tr> |
|
156 <td><a href="#MiniEditor.__createToolBars">__createToolBars</a></td> |
|
157 <td>Private method to create the various toolbars.</td> |
|
158 </tr> |
|
159 <tr> |
|
160 <td><a href="#MiniEditor.__createViewActions">__createViewActions</a></td> |
|
161 <td>Private method to create the View actions.</td> |
|
162 </tr> |
|
163 <tr> |
|
164 <td><a href="#MiniEditor.__cursorPositionChanged">__cursorPositionChanged</a></td> |
|
165 <td>Private slot to handle the cursorPositionChanged signal.</td> |
|
166 </tr> |
|
167 <tr> |
|
168 <td><a href="#MiniEditor.__deselectAll">__deselectAll</a></td> |
|
169 <td>Private slot handling the deselect all context menu action.</td> |
|
170 </tr> |
|
171 <tr> |
|
172 <td><a href="#MiniEditor.__documentWasModified">__documentWasModified</a></td> |
|
173 <td>Private slot to handle a change in the documents modification status.</td> |
|
174 </tr> |
|
175 <tr> |
|
176 <td><a href="#MiniEditor.__editorChanged">__editorChanged</a></td> |
|
177 <td>Private slot handling changes of the editor language or file name.</td> |
|
178 </tr> |
|
179 <tr> |
|
180 <td><a href="#MiniEditor.__getCurrentWord">__getCurrentWord</a></td> |
|
181 <td>Private method to get the word at the current position.</td> |
|
182 </tr> |
|
183 <tr> |
|
184 <td><a href="#MiniEditor.__getEditorConfig">__getEditorConfig</a></td> |
|
185 <td>Private method to get the requested option via EditorConfig.</td> |
|
186 </tr> |
|
187 <tr> |
|
188 <td><a href="#MiniEditor.__getOverrideValue">__getOverrideValue</a></td> |
|
189 <td>Private method to get an override value for the current file type.</td> |
|
190 </tr> |
|
191 <tr> |
|
192 <td><a href="#MiniEditor.__getWord">__getWord</a></td> |
|
193 <td>Private method to get the word at a position.</td> |
|
194 </tr> |
|
195 <tr> |
|
196 <td><a href="#MiniEditor.__initContextMenu">__initContextMenu</a></td> |
|
197 <td>Private method used to setup the context menu.</td> |
|
198 </tr> |
|
199 <tr> |
|
200 <td><a href="#MiniEditor.__initContextMenuLanguages">__initContextMenuLanguages</a></td> |
|
201 <td>Private method used to setup the Languages context sub menu.</td> |
|
202 </tr> |
|
203 <tr> |
|
204 <td><a href="#MiniEditor.__languageMenuTriggered">__languageMenuTriggered</a></td> |
|
205 <td>Private method to handle the selection of a lexer language.</td> |
|
206 </tr> |
|
207 <tr> |
|
208 <td><a href="#MiniEditor.__loadConfiguration">__loadConfiguration</a></td> |
|
209 <td>Private slot to load the configuration.</td> |
|
210 </tr> |
|
211 <tr> |
|
212 <td><a href="#MiniEditor.__loadEditorConfig">__loadEditorConfig</a></td> |
|
213 <td>Private method to load the EditorConfig properties.</td> |
|
214 </tr> |
|
215 <tr> |
|
216 <td><a href="#MiniEditor.__loadEditorConfigObject">__loadEditorConfigObject</a></td> |
|
217 <td>Private method to load the EditorConfig properties for the given file name.</td> |
|
218 </tr> |
|
219 <tr> |
|
220 <td><a href="#MiniEditor.__loadFile">__loadFile</a></td> |
|
221 <td>Private method to load the given file.</td> |
|
222 </tr> |
|
223 <tr> |
|
224 <td><a href="#MiniEditor.__markOccurrences">__markOccurrences</a></td> |
|
225 <td>Private method to mark all occurrences of the current word.</td> |
|
226 </tr> |
|
227 <tr> |
|
228 <td><a href="#MiniEditor.__maybeSave">__maybeSave</a></td> |
|
229 <td>Private method to ask the user to save the file, if it was modified.</td> |
|
230 </tr> |
|
231 <tr> |
|
232 <td><a href="#MiniEditor.__modificationChanged">__modificationChanged</a></td> |
|
233 <td>Private slot to handle the modificationChanged signal.</td> |
|
234 </tr> |
|
235 <tr> |
|
236 <td><a href="#MiniEditor.__newFile">__newFile</a></td> |
|
237 <td>Private slot to create a new file.</td> |
|
238 </tr> |
|
239 <tr> |
|
240 <td><a href="#MiniEditor.__open">__open</a></td> |
|
241 <td>Private slot to open a file.</td> |
|
242 </tr> |
|
243 <tr> |
|
244 <td><a href="#MiniEditor.__preferencesChanged">__preferencesChanged</a></td> |
|
245 <td>Private slot to handle a configuration change.</td> |
|
246 </tr> |
|
247 <tr> |
|
248 <td><a href="#MiniEditor.__printFile">__printFile</a></td> |
|
249 <td>Private slot to print the text.</td> |
|
250 </tr> |
|
251 <tr> |
|
252 <td><a href="#MiniEditor.__printPreview">__printPreview</a></td> |
|
253 <td>Private slot to generate a print preview.</td> |
|
254 </tr> |
|
255 <tr> |
|
256 <td><a href="#MiniEditor.__printPreviewFile">__printPreviewFile</a></td> |
|
257 <td>Private slot to show a print preview of the text.</td> |
|
258 </tr> |
|
259 <tr> |
|
260 <td><a href="#MiniEditor.__readSettings">__readSettings</a></td> |
|
261 <td>Private method to read the settings remembered last time.</td> |
|
262 </tr> |
|
263 <tr> |
|
264 <td><a href="#MiniEditor.__readShortcut">__readShortcut</a></td> |
|
265 <td>Private function to read a single keyboard shortcut from the settings.</td> |
|
266 </tr> |
|
267 <tr> |
|
268 <td><a href="#MiniEditor.__redo">__redo</a></td> |
|
269 <td>Private method to redo the last recorded change.</td> |
|
270 </tr> |
|
271 <tr> |
|
272 <td><a href="#MiniEditor.__resetChangeTimer">__resetChangeTimer</a></td> |
|
273 <td>Private slot to reset the parse timer.</td> |
|
274 </tr> |
|
275 <tr> |
|
276 <td><a href="#MiniEditor.__resetLanguage">__resetLanguage</a></td> |
|
277 <td>Private method used to reset the language selection.</td> |
|
278 </tr> |
|
279 <tr> |
|
280 <td><a href="#MiniEditor.__resizeLinenoMargin">__resizeLinenoMargin</a></td> |
|
281 <td>Private slot to resize the line numbers margin.</td> |
|
282 </tr> |
|
283 <tr> |
|
284 <td><a href="#MiniEditor.__save">__save</a></td> |
|
285 <td>Private slot to save a file.</td> |
|
286 </tr> |
|
287 <tr> |
|
288 <td><a href="#MiniEditor.__saveAs">__saveAs</a></td> |
|
289 <td>Private slot to save a file with a new name.</td> |
|
290 </tr> |
|
291 <tr> |
|
292 <td><a href="#MiniEditor.__saveCopy">__saveCopy</a></td> |
|
293 <td>Private slot to save a copy of the file with a new name.</td> |
|
294 </tr> |
|
295 <tr> |
|
296 <td><a href="#MiniEditor.__saveFile">__saveFile</a></td> |
|
297 <td>Private method to save to the given file.</td> |
|
298 </tr> |
|
299 <tr> |
|
300 <td><a href="#MiniEditor.__searchClearMarkers">__searchClearMarkers</a></td> |
|
301 <td>Private method to clear the search markers of the active window.</td> |
|
302 </tr> |
|
303 <tr> |
|
304 <td><a href="#MiniEditor.__searchNext">__searchNext</a></td> |
|
305 <td>Private slot to handle the search next action.</td> |
|
306 </tr> |
|
307 <tr> |
|
308 <td><a href="#MiniEditor.__searchPrev">__searchPrev</a></td> |
|
309 <td>Private slot to handle the search previous action.</td> |
|
310 </tr> |
|
311 <tr> |
|
312 <td><a href="#MiniEditor.__selectAll">__selectAll</a></td> |
|
313 <td>Private slot handling the select all context menu action.</td> |
|
314 </tr> |
|
315 <tr> |
|
316 <td><a href="#MiniEditor.__selectPygmentsLexer">__selectPygmentsLexer</a></td> |
|
317 <td>Private method to select a specific pygments lexer.</td> |
|
318 </tr> |
|
319 <tr> |
|
320 <td><a href="#MiniEditor.__setCurrentFile">__setCurrentFile</a></td> |
|
321 <td>Private method to register the file name of the current file.</td> |
|
322 </tr> |
|
323 <tr> |
|
324 <td><a href="#MiniEditor.__setEolMode">__setEolMode</a></td> |
|
325 <td>Private method to configure the eol mode of the editor.</td> |
|
326 </tr> |
|
327 <tr> |
|
328 <td><a href="#MiniEditor.__setMargins">__setMargins</a></td> |
|
329 <td>Private method to configure the margins.</td> |
|
330 </tr> |
|
331 <tr> |
|
332 <td><a href="#MiniEditor.__setMonospaced">__setMonospaced</a></td> |
|
333 <td>Private method to set/reset a monospaced font.</td> |
|
334 </tr> |
|
335 <tr> |
|
336 <td><a href="#MiniEditor.__setSbFile">__setSbFile</a></td> |
|
337 <td>Private method to set the file info in the status bar.</td> |
|
338 </tr> |
|
339 <tr> |
|
340 <td><a href="#MiniEditor.__setTabAndIndent">__setTabAndIndent</a></td> |
|
341 <td>Private method to set indentation size and style and tab width.</td> |
|
342 </tr> |
|
343 <tr> |
|
344 <td><a href="#MiniEditor.__setTextDisplay">__setTextDisplay</a></td> |
|
345 <td>Private method to configure the text display.</td> |
|
346 </tr> |
|
347 <tr> |
|
348 <td><a href="#MiniEditor.__showContextMenuLanguages">__showContextMenuLanguages</a></td> |
|
349 <td>Private slot handling the aboutToShow signal of the languages context menu.</td> |
|
350 </tr> |
|
351 <tr> |
|
352 <td><a href="#MiniEditor.__showLanguagesMenu">__showLanguagesMenu</a></td> |
|
353 <td>Private slot to show the Languages menu of the status bar.</td> |
|
354 </tr> |
|
355 <tr> |
|
356 <td><a href="#MiniEditor.__showPreferences">__showPreferences</a></td> |
|
357 <td>Private slot to set the preferences.</td> |
|
358 </tr> |
|
359 <tr> |
|
360 <td><a href="#MiniEditor.__strippedName">__strippedName</a></td> |
|
361 <td>Private method to return the filename part of the given path.</td> |
|
362 </tr> |
|
363 <tr> |
|
364 <td><a href="#MiniEditor.__styleNeeded">__styleNeeded</a></td> |
|
365 <td>Private slot to handle the need for more styling.</td> |
|
366 </tr> |
|
367 <tr> |
|
368 <td><a href="#MiniEditor.__undo">__undo</a></td> |
|
369 <td>Private method to undo the last recorded change.</td> |
|
370 </tr> |
|
371 <tr> |
|
372 <td><a href="#MiniEditor.__whatsThis">__whatsThis</a></td> |
|
373 <td>Private slot called in to enter Whats This mode.</td> |
|
374 </tr> |
|
375 <tr> |
|
376 <td><a href="#MiniEditor.__writeFile">__writeFile</a></td> |
|
377 <td>Private method to write the current editor text to a file.</td> |
|
378 </tr> |
|
379 <tr> |
|
380 <td><a href="#MiniEditor.__writeSettings">__writeSettings</a></td> |
|
381 <td>Private method to write the settings for reuse.</td> |
|
382 </tr> |
|
383 <tr> |
|
384 <td><a href="#MiniEditor.__zoom">__zoom</a></td> |
|
385 <td>Private method to handle the zoom action.</td> |
|
386 </tr> |
|
387 <tr> |
|
388 <td><a href="#MiniEditor.__zoomIn">__zoomIn</a></td> |
|
389 <td>Private method to handle the zoom in action.</td> |
|
390 </tr> |
|
391 <tr> |
|
392 <td><a href="#MiniEditor.__zoomOut">__zoomOut</a></td> |
|
393 <td>Private method to handle the zoom out action.</td> |
|
394 </tr> |
|
395 <tr> |
|
396 <td><a href="#MiniEditor.__zoomReset">__zoomReset</a></td> |
|
397 <td>Private method to reset the zoom factor.</td> |
|
398 </tr> |
|
399 <tr> |
|
400 <td><a href="#MiniEditor.__zoomTo">__zoomTo</a></td> |
|
401 <td>Private slot to zoom to a given value.</td> |
|
402 </tr> |
|
403 <tr> |
|
404 <td><a href="#MiniEditor.activeWindow">activeWindow</a></td> |
|
405 <td>Public method to fulfill the ViewManager interface.</td> |
|
406 </tr> |
|
407 <tr> |
|
408 <td><a href="#MiniEditor.clearSearchIndicators">clearSearchIndicators</a></td> |
|
409 <td>Public method to clear all search indicators.</td> |
|
410 </tr> |
|
411 <tr> |
|
412 <td><a href="#MiniEditor.closeEvent">closeEvent</a></td> |
|
413 <td>Protected method to handle the close event.</td> |
|
414 </tr> |
|
415 <tr> |
|
416 <td><a href="#MiniEditor.getFileName">getFileName</a></td> |
|
417 <td>Public method to return the name of the file being displayed.</td> |
|
418 </tr> |
|
419 <tr> |
|
420 <td><a href="#MiniEditor.getLanguage">getLanguage</a></td> |
|
421 <td>Public method to retrieve the language of the editor.</td> |
|
422 </tr> |
|
423 <tr> |
|
424 <td><a href="#MiniEditor.getSRHistory">getSRHistory</a></td> |
|
425 <td>Public method to get the search or replace history list.</td> |
|
426 </tr> |
|
427 <tr> |
|
428 <td><a href="#MiniEditor.gotoLine">gotoLine</a></td> |
|
429 <td>Public slot to jump to the beginning of a line.</td> |
|
430 </tr> |
|
431 <tr> |
|
432 <td><a href="#MiniEditor.setLanguage">setLanguage</a></td> |
|
433 <td>Public method to set a lexer language.</td> |
|
434 </tr> |
|
435 <tr> |
|
436 <td><a href="#MiniEditor.setSearchIndicator">setSearchIndicator</a></td> |
|
437 <td>Public method to set a search indicator for the given range.</td> |
|
438 </tr> |
|
439 <tr> |
|
440 <td><a href="#MiniEditor.setText">setText</a></td> |
|
441 <td>Public method to set the text programatically.</td> |
|
442 </tr> |
|
443 <tr> |
|
444 <td><a href="#MiniEditor.setWindowModified">setWindowModified</a></td> |
|
445 <td>Public method to set the window modification status.</td> |
|
446 </tr> |
|
447 <tr> |
|
448 <td><a href="#MiniEditor.showReplaceWidget">showReplaceWidget</a></td> |
|
449 <td>Public method to show the replace widget.</td> |
|
450 </tr> |
|
451 <tr> |
|
452 <td><a href="#MiniEditor.showSearchWidget">showSearchWidget</a></td> |
|
453 <td>Public method to show the search widget.</td> |
|
454 </tr> |
|
455 <tr> |
|
456 <td><a href="#MiniEditor.textForFind">textForFind</a></td> |
|
457 <td>Public method to determine the selection or the current word for the next find operation.</td> |
|
458 </tr> |
|
459 </table> |
|
460 <h3>Static Methods</h3> |
|
461 |
|
462 <table> |
|
463 <tr><td>None</td></tr> |
|
464 </table> |
|
465 |
|
466 <a NAME="MiniEditor.__init__" ID="MiniEditor.__init__"></a> |
|
467 <h4>MiniEditor (Constructor)</h4> |
|
468 <b>MiniEditor</b>(<i>filename="", filetype="", parent=None, name=None</i>) |
|
469 |
|
470 <p> |
|
471 Constructor |
|
472 </p> |
|
473 <dl> |
|
474 |
|
475 <dt><i>filename</i></dt> |
|
476 <dd> |
|
477 name of the file to open (string) |
|
478 </dd> |
|
479 <dt><i>filetype</i></dt> |
|
480 <dd> |
|
481 type of the source file (string) |
|
482 </dd> |
|
483 <dt><i>parent</i></dt> |
|
484 <dd> |
|
485 reference to the parent widget (QWidget) |
|
486 </dd> |
|
487 <dt><i>name</i></dt> |
|
488 <dd> |
|
489 object name of the window (string) |
|
490 </dd> |
|
491 </dl> |
|
492 <a NAME="MiniEditor.__about" ID="MiniEditor.__about"></a> |
|
493 <h4>MiniEditor.__about</h4> |
|
494 <b>__about</b>(<i></i>) |
|
495 |
|
496 <p> |
|
497 Private slot to show a little About message. |
|
498 </p> |
|
499 <a NAME="MiniEditor.__aboutQt" ID="MiniEditor.__aboutQt"></a> |
|
500 <h4>MiniEditor.__aboutQt</h4> |
|
501 <b>__aboutQt</b>(<i></i>) |
|
502 |
|
503 <p> |
|
504 Private slot to handle the About Qt dialog. |
|
505 </p> |
|
506 <a NAME="MiniEditor.__bindLexer" ID="MiniEditor.__bindLexer"></a> |
|
507 <h4>MiniEditor.__bindLexer</h4> |
|
508 <b>__bindLexer</b>(<i>filename, pyname=""</i>) |
|
509 |
|
510 <p> |
|
511 Private slot to set the correct lexer depending on language. |
|
512 </p> |
|
513 <dl> |
|
514 |
|
515 <dt><i>filename</i></dt> |
|
516 <dd> |
|
517 filename used to determine the associated lexer |
|
518 language (string) |
|
519 </dd> |
|
520 <dt><i>pyname</i></dt> |
|
521 <dd> |
|
522 name of the pygments lexer to use (string) |
|
523 </dd> |
|
524 </dl> |
|
525 <a NAME="MiniEditor.__bindName" ID="MiniEditor.__bindName"></a> |
|
526 <h4>MiniEditor.__bindName</h4> |
|
527 <b>__bindName</b>(<i>line0</i>) |
|
528 |
|
529 <p> |
|
530 Private method to generate a dummy filename for binding a lexer. |
|
531 </p> |
|
532 <dl> |
|
533 |
|
534 <dt><i>line0</i></dt> |
|
535 <dd> |
|
536 first line of text to use in the generation process |
|
537 (string) |
|
538 </dd> |
|
539 </dl> |
|
540 <dl> |
|
541 <dt>Return:</dt> |
|
542 <dd> |
|
543 dummy file name to be used for binding a lexer (string) |
|
544 </dd> |
|
545 </dl> |
|
546 <a NAME="MiniEditor.__checkActions" ID="MiniEditor.__checkActions"></a> |
|
547 <h4>MiniEditor.__checkActions</h4> |
|
548 <b>__checkActions</b>(<i>setSb=True</i>) |
|
549 |
|
550 <p> |
|
551 Private slot to check some actions for their enable/disable status |
|
552 and set the statusbar info. |
|
553 </p> |
|
554 <dl> |
|
555 |
|
556 <dt><i>setSb</i></dt> |
|
557 <dd> |
|
558 flag indicating an update of the status bar is wanted |
|
559 (boolean) |
|
560 </dd> |
|
561 </dl> |
|
562 <a NAME="MiniEditor.__checkLanguage" ID="MiniEditor.__checkLanguage"></a> |
|
563 <h4>MiniEditor.__checkLanguage</h4> |
|
564 <b>__checkLanguage</b>(<i></i>) |
|
565 |
|
566 <p> |
|
567 Private method to check the selected language of the language submenu. |
|
568 </p> |
|
569 <a NAME="MiniEditor.__contextMenuRequested" ID="MiniEditor.__contextMenuRequested"></a> |
|
570 <h4>MiniEditor.__contextMenuRequested</h4> |
|
571 <b>__contextMenuRequested</b>(<i>coord</i>) |
|
572 |
|
573 <p> |
|
574 Private slot to show the context menu. |
|
575 </p> |
|
576 <dl> |
|
577 |
|
578 <dt><i>coord</i></dt> |
|
579 <dd> |
|
580 the position of the mouse pointer (QPoint) |
|
581 </dd> |
|
582 </dl> |
|
583 <a NAME="MiniEditor.__convertTabs" ID="MiniEditor.__convertTabs"></a> |
|
584 <h4>MiniEditor.__convertTabs</h4> |
|
585 <b>__convertTabs</b>(<i></i>) |
|
586 |
|
587 <p> |
|
588 Private slot to convert tabulators to spaces. |
|
589 </p> |
|
590 <a NAME="MiniEditor.__createActions" ID="MiniEditor.__createActions"></a> |
|
591 <h4>MiniEditor.__createActions</h4> |
|
592 <b>__createActions</b>(<i></i>) |
|
593 |
|
594 <p> |
|
595 Private method to create the actions. |
|
596 </p> |
|
597 <a NAME="MiniEditor.__createConfigActions" ID="MiniEditor.__createConfigActions"></a> |
|
598 <h4>MiniEditor.__createConfigActions</h4> |
|
599 <b>__createConfigActions</b>(<i></i>) |
|
600 |
|
601 <p> |
|
602 Private method to create the Settings actions. |
|
603 </p> |
|
604 <a NAME="MiniEditor.__createEditActions" ID="MiniEditor.__createEditActions"></a> |
|
605 <h4>MiniEditor.__createEditActions</h4> |
|
606 <b>__createEditActions</b>(<i></i>) |
|
607 |
|
608 <p> |
|
609 Private method to create the Edit actions. |
|
610 </p> |
|
611 <a NAME="MiniEditor.__createFileActions" ID="MiniEditor.__createFileActions"></a> |
|
612 <h4>MiniEditor.__createFileActions</h4> |
|
613 <b>__createFileActions</b>(<i></i>) |
|
614 |
|
615 <p> |
|
616 Private method to create the File actions. |
|
617 </p> |
|
618 <a NAME="MiniEditor.__createHelpActions" ID="MiniEditor.__createHelpActions"></a> |
|
619 <h4>MiniEditor.__createHelpActions</h4> |
|
620 <b>__createHelpActions</b>(<i></i>) |
|
621 |
|
622 <p> |
|
623 Private method to create the Help actions. |
|
624 </p> |
|
625 <a NAME="MiniEditor.__createMenus" ID="MiniEditor.__createMenus"></a> |
|
626 <h4>MiniEditor.__createMenus</h4> |
|
627 <b>__createMenus</b>(<i></i>) |
|
628 |
|
629 <p> |
|
630 Private method to create the menus of the menu bar. |
|
631 </p> |
|
632 <a NAME="MiniEditor.__createSearchActions" ID="MiniEditor.__createSearchActions"></a> |
|
633 <h4>MiniEditor.__createSearchActions</h4> |
|
634 <b>__createSearchActions</b>(<i></i>) |
|
635 |
|
636 <p> |
|
637 Private method defining the user interface actions for the search |
|
638 commands. |
|
639 </p> |
|
640 <a NAME="MiniEditor.__createStatusBar" ID="MiniEditor.__createStatusBar"></a> |
|
641 <h4>MiniEditor.__createStatusBar</h4> |
|
642 <b>__createStatusBar</b>(<i></i>) |
|
643 |
|
644 <p> |
|
645 Private method to initialize the status bar. |
|
646 </p> |
|
647 <a NAME="MiniEditor.__createToolBars" ID="MiniEditor.__createToolBars"></a> |
|
648 <h4>MiniEditor.__createToolBars</h4> |
|
649 <b>__createToolBars</b>(<i></i>) |
|
650 |
|
651 <p> |
|
652 Private method to create the various toolbars. |
|
653 </p> |
|
654 <a NAME="MiniEditor.__createViewActions" ID="MiniEditor.__createViewActions"></a> |
|
655 <h4>MiniEditor.__createViewActions</h4> |
|
656 <b>__createViewActions</b>(<i></i>) |
|
657 |
|
658 <p> |
|
659 Private method to create the View actions. |
|
660 </p> |
|
661 <a NAME="MiniEditor.__cursorPositionChanged" ID="MiniEditor.__cursorPositionChanged"></a> |
|
662 <h4>MiniEditor.__cursorPositionChanged</h4> |
|
663 <b>__cursorPositionChanged</b>(<i>line, pos</i>) |
|
664 |
|
665 <p> |
|
666 Private slot to handle the cursorPositionChanged signal. |
|
667 </p> |
|
668 <dl> |
|
669 |
|
670 <dt><i>line</i></dt> |
|
671 <dd> |
|
672 line number of the cursor |
|
673 </dd> |
|
674 <dt><i>pos</i></dt> |
|
675 <dd> |
|
676 position in line of the cursor |
|
677 </dd> |
|
678 </dl> |
|
679 <a NAME="MiniEditor.__deselectAll" ID="MiniEditor.__deselectAll"></a> |
|
680 <h4>MiniEditor.__deselectAll</h4> |
|
681 <b>__deselectAll</b>(<i></i>) |
|
682 |
|
683 <p> |
|
684 Private slot handling the deselect all context menu action. |
|
685 </p> |
|
686 <a NAME="MiniEditor.__documentWasModified" ID="MiniEditor.__documentWasModified"></a> |
|
687 <h4>MiniEditor.__documentWasModified</h4> |
|
688 <b>__documentWasModified</b>(<i></i>) |
|
689 |
|
690 <p> |
|
691 Private slot to handle a change in the documents modification status. |
|
692 </p> |
|
693 <a NAME="MiniEditor.__editorChanged" ID="MiniEditor.__editorChanged"></a> |
|
694 <h4>MiniEditor.__editorChanged</h4> |
|
695 <b>__editorChanged</b>(<i></i>) |
|
696 |
|
697 <p> |
|
698 Private slot handling changes of the editor language or file name. |
|
699 </p> |
|
700 <a NAME="MiniEditor.__getCurrentWord" ID="MiniEditor.__getCurrentWord"></a> |
|
701 <h4>MiniEditor.__getCurrentWord</h4> |
|
702 <b>__getCurrentWord</b>(<i></i>) |
|
703 |
|
704 <p> |
|
705 Private method to get the word at the current position. |
|
706 </p> |
|
707 <dl> |
|
708 <dt>Return:</dt> |
|
709 <dd> |
|
710 the word at that current position |
|
711 </dd> |
|
712 </dl> |
|
713 <a NAME="MiniEditor.__getEditorConfig" ID="MiniEditor.__getEditorConfig"></a> |
|
714 <h4>MiniEditor.__getEditorConfig</h4> |
|
715 <b>__getEditorConfig</b>(<i>option, nodefault=False, config=None</i>) |
|
716 |
|
717 <p> |
|
718 Private method to get the requested option via EditorConfig. |
|
719 </p> |
|
720 <p> |
|
721 If there is no EditorConfig defined, the equivalent built-in option |
|
722 will be used (Preferences.getEditor(). The option must be given as the |
|
723 Preferences option key. The mapping to the EditorConfig option name |
|
724 will be done within this method. |
|
725 </p> |
|
726 <dl> |
|
727 |
|
728 <dt><i>option</i> (str)</dt> |
|
729 <dd> |
|
730 Preferences option key |
|
731 </dd> |
|
732 <dt><i>nodefault</i> (bool)</dt> |
|
733 <dd> |
|
734 flag indicating to not get the default value from |
|
735 Preferences but return None instead |
|
736 </dd> |
|
737 <dt><i>config</i> (dict)</dt> |
|
738 <dd> |
|
739 reference to an EditorConfig object or None |
|
740 </dd> |
|
741 </dl> |
|
742 <dl> |
|
743 <dt>Return:</dt> |
|
744 <dd> |
|
745 value of requested setting or None if nothing was found and |
|
746 nodefault parameter was True |
|
747 </dd> |
|
748 </dl> |
|
749 <dl> |
|
750 <dt>Return Type:</dt> |
|
751 <dd> |
|
752 any |
|
753 </dd> |
|
754 </dl> |
|
755 <a NAME="MiniEditor.__getOverrideValue" ID="MiniEditor.__getOverrideValue"></a> |
|
756 <h4>MiniEditor.__getOverrideValue</h4> |
|
757 <b>__getOverrideValue</b>(<i>option</i>) |
|
758 |
|
759 <p> |
|
760 Private method to get an override value for the current file type. |
|
761 </p> |
|
762 <dl> |
|
763 |
|
764 <dt><i>option</i> (str)</dt> |
|
765 <dd> |
|
766 Preferences option key |
|
767 </dd> |
|
768 </dl> |
|
769 <dl> |
|
770 <dt>Return:</dt> |
|
771 <dd> |
|
772 override value; None in case nothing is defined |
|
773 </dd> |
|
774 </dl> |
|
775 <dl> |
|
776 <dt>Return Type:</dt> |
|
777 <dd> |
|
778 any |
|
779 </dd> |
|
780 </dl> |
|
781 <a NAME="MiniEditor.__getWord" ID="MiniEditor.__getWord"></a> |
|
782 <h4>MiniEditor.__getWord</h4> |
|
783 <b>__getWord</b>(<i>line, index</i>) |
|
784 |
|
785 <p> |
|
786 Private method to get the word at a position. |
|
787 </p> |
|
788 <dl> |
|
789 |
|
790 <dt><i>line</i> (int)</dt> |
|
791 <dd> |
|
792 number of line to look at |
|
793 </dd> |
|
794 <dt><i>index</i> (int)</dt> |
|
795 <dd> |
|
796 position to look at |
|
797 </dd> |
|
798 </dl> |
|
799 <dl> |
|
800 <dt>Return:</dt> |
|
801 <dd> |
|
802 the word at that position |
|
803 </dd> |
|
804 </dl> |
|
805 <dl> |
|
806 <dt>Return Type:</dt> |
|
807 <dd> |
|
808 str |
|
809 </dd> |
|
810 </dl> |
|
811 <a NAME="MiniEditor.__initContextMenu" ID="MiniEditor.__initContextMenu"></a> |
|
812 <h4>MiniEditor.__initContextMenu</h4> |
|
813 <b>__initContextMenu</b>(<i></i>) |
|
814 |
|
815 <p> |
|
816 Private method used to setup the context menu. |
|
817 </p> |
|
818 <a NAME="MiniEditor.__initContextMenuLanguages" ID="MiniEditor.__initContextMenuLanguages"></a> |
|
819 <h4>MiniEditor.__initContextMenuLanguages</h4> |
|
820 <b>__initContextMenuLanguages</b>(<i></i>) |
|
821 |
|
822 <p> |
|
823 Private method used to setup the Languages context sub menu. |
|
824 </p> |
|
825 <dl> |
|
826 <dt>Return:</dt> |
|
827 <dd> |
|
828 reference to the generated menu (QMenu) |
|
829 </dd> |
|
830 </dl> |
|
831 <a NAME="MiniEditor.__languageMenuTriggered" ID="MiniEditor.__languageMenuTriggered"></a> |
|
832 <h4>MiniEditor.__languageMenuTriggered</h4> |
|
833 <b>__languageMenuTriggered</b>(<i>act</i>) |
|
834 |
|
835 <p> |
|
836 Private method to handle the selection of a lexer language. |
|
837 </p> |
|
838 <dl> |
|
839 |
|
840 <dt><i>act</i></dt> |
|
841 <dd> |
|
842 reference to the action that was triggered (QAction) |
|
843 </dd> |
|
844 </dl> |
|
845 <a NAME="MiniEditor.__loadConfiguration" ID="MiniEditor.__loadConfiguration"></a> |
|
846 <h4>MiniEditor.__loadConfiguration</h4> |
|
847 <b>__loadConfiguration</b>(<i></i>) |
|
848 |
|
849 <p> |
|
850 Private slot to load the configuration. |
|
851 </p> |
|
852 <a NAME="MiniEditor.__loadEditorConfig" ID="MiniEditor.__loadEditorConfig"></a> |
|
853 <h4>MiniEditor.__loadEditorConfig</h4> |
|
854 <b>__loadEditorConfig</b>(<i>fileName=""</i>) |
|
855 |
|
856 <p> |
|
857 Private method to load the EditorConfig properties. |
|
858 </p> |
|
859 <dl> |
|
860 |
|
861 <dt><i>fileName</i> (str)</dt> |
|
862 <dd> |
|
863 name of the file |
|
864 </dd> |
|
865 </dl> |
|
866 <a NAME="MiniEditor.__loadEditorConfigObject" ID="MiniEditor.__loadEditorConfigObject"></a> |
|
867 <h4>MiniEditor.__loadEditorConfigObject</h4> |
|
868 <b>__loadEditorConfigObject</b>(<i>fileName</i>) |
|
869 |
|
870 <p> |
|
871 Private method to load the EditorConfig properties for the given |
|
872 file name. |
|
873 </p> |
|
874 <dl> |
|
875 |
|
876 <dt><i>fileName</i> (str)</dt> |
|
877 <dd> |
|
878 name of the file |
|
879 </dd> |
|
880 </dl> |
|
881 <dl> |
|
882 <dt>Return:</dt> |
|
883 <dd> |
|
884 EditorConfig dictionary |
|
885 </dd> |
|
886 </dl> |
|
887 <dl> |
|
888 <dt>Return Type:</dt> |
|
889 <dd> |
|
890 dict |
|
891 </dd> |
|
892 </dl> |
|
893 <a NAME="MiniEditor.__loadFile" ID="MiniEditor.__loadFile"></a> |
|
894 <h4>MiniEditor.__loadFile</h4> |
|
895 <b>__loadFile</b>(<i>fileName, filetype=None</i>) |
|
896 |
|
897 <p> |
|
898 Private method to load the given file. |
|
899 </p> |
|
900 <dl> |
|
901 |
|
902 <dt><i>fileName</i></dt> |
|
903 <dd> |
|
904 name of the file to load (string) |
|
905 </dd> |
|
906 <dt><i>filetype</i></dt> |
|
907 <dd> |
|
908 type of the source file (string) |
|
909 </dd> |
|
910 </dl> |
|
911 <a NAME="MiniEditor.__markOccurrences" ID="MiniEditor.__markOccurrences"></a> |
|
912 <h4>MiniEditor.__markOccurrences</h4> |
|
913 <b>__markOccurrences</b>(<i></i>) |
|
914 |
|
915 <p> |
|
916 Private method to mark all occurrences of the current word. |
|
917 </p> |
|
918 <a NAME="MiniEditor.__maybeSave" ID="MiniEditor.__maybeSave"></a> |
|
919 <h4>MiniEditor.__maybeSave</h4> |
|
920 <b>__maybeSave</b>(<i></i>) |
|
921 |
|
922 <p> |
|
923 Private method to ask the user to save the file, if it was modified. |
|
924 </p> |
|
925 <dl> |
|
926 <dt>Return:</dt> |
|
927 <dd> |
|
928 flag indicating, if it is ok to continue (boolean) |
|
929 </dd> |
|
930 </dl> |
|
931 <a NAME="MiniEditor.__modificationChanged" ID="MiniEditor.__modificationChanged"></a> |
|
932 <h4>MiniEditor.__modificationChanged</h4> |
|
933 <b>__modificationChanged</b>(<i>m</i>) |
|
934 |
|
935 <p> |
|
936 Private slot to handle the modificationChanged signal. |
|
937 </p> |
|
938 <dl> |
|
939 |
|
940 <dt><i>m</i></dt> |
|
941 <dd> |
|
942 modification status |
|
943 </dd> |
|
944 </dl> |
|
945 <a NAME="MiniEditor.__newFile" ID="MiniEditor.__newFile"></a> |
|
946 <h4>MiniEditor.__newFile</h4> |
|
947 <b>__newFile</b>(<i></i>) |
|
948 |
|
949 <p> |
|
950 Private slot to create a new file. |
|
951 </p> |
|
952 <a NAME="MiniEditor.__open" ID="MiniEditor.__open"></a> |
|
953 <h4>MiniEditor.__open</h4> |
|
954 <b>__open</b>(<i></i>) |
|
955 |
|
956 <p> |
|
957 Private slot to open a file. |
|
958 </p> |
|
959 <a NAME="MiniEditor.__preferencesChanged" ID="MiniEditor.__preferencesChanged"></a> |
|
960 <h4>MiniEditor.__preferencesChanged</h4> |
|
961 <b>__preferencesChanged</b>(<i></i>) |
|
962 |
|
963 <p> |
|
964 Private slot to handle a configuration change. |
|
965 </p> |
|
966 <a NAME="MiniEditor.__printFile" ID="MiniEditor.__printFile"></a> |
|
967 <h4>MiniEditor.__printFile</h4> |
|
968 <b>__printFile</b>(<i></i>) |
|
969 |
|
970 <p> |
|
971 Private slot to print the text. |
|
972 </p> |
|
973 <a NAME="MiniEditor.__printPreview" ID="MiniEditor.__printPreview"></a> |
|
974 <h4>MiniEditor.__printPreview</h4> |
|
975 <b>__printPreview</b>(<i>printer</i>) |
|
976 |
|
977 <p> |
|
978 Private slot to generate a print preview. |
|
979 </p> |
|
980 <dl> |
|
981 |
|
982 <dt><i>printer</i></dt> |
|
983 <dd> |
|
984 reference to the printer object |
|
985 (QScintilla.Printer.Printer) |
|
986 </dd> |
|
987 </dl> |
|
988 <a NAME="MiniEditor.__printPreviewFile" ID="MiniEditor.__printPreviewFile"></a> |
|
989 <h4>MiniEditor.__printPreviewFile</h4> |
|
990 <b>__printPreviewFile</b>(<i></i>) |
|
991 |
|
992 <p> |
|
993 Private slot to show a print preview of the text. |
|
994 </p> |
|
995 <a NAME="MiniEditor.__readSettings" ID="MiniEditor.__readSettings"></a> |
|
996 <h4>MiniEditor.__readSettings</h4> |
|
997 <b>__readSettings</b>(<i></i>) |
|
998 |
|
999 <p> |
|
1000 Private method to read the settings remembered last time. |
|
1001 </p> |
|
1002 <a NAME="MiniEditor.__readShortcut" ID="MiniEditor.__readShortcut"></a> |
|
1003 <h4>MiniEditor.__readShortcut</h4> |
|
1004 <b>__readShortcut</b>(<i>act, category</i>) |
|
1005 |
|
1006 <p> |
|
1007 Private function to read a single keyboard shortcut from the settings. |
|
1008 </p> |
|
1009 <dl> |
|
1010 |
|
1011 <dt><i>act</i></dt> |
|
1012 <dd> |
|
1013 reference to the action object (EricAction) |
|
1014 </dd> |
|
1015 <dt><i>category</i></dt> |
|
1016 <dd> |
|
1017 category the action belongs to (string) |
|
1018 </dd> |
|
1019 </dl> |
|
1020 <a NAME="MiniEditor.__redo" ID="MiniEditor.__redo"></a> |
|
1021 <h4>MiniEditor.__redo</h4> |
|
1022 <b>__redo</b>(<i></i>) |
|
1023 |
|
1024 <p> |
|
1025 Private method to redo the last recorded change. |
|
1026 </p> |
|
1027 <a NAME="MiniEditor.__resetChangeTimer" ID="MiniEditor.__resetChangeTimer"></a> |
|
1028 <h4>MiniEditor.__resetChangeTimer</h4> |
|
1029 <b>__resetChangeTimer</b>(<i></i>) |
|
1030 |
|
1031 <p> |
|
1032 Private slot to reset the parse timer. |
|
1033 </p> |
|
1034 <a NAME="MiniEditor.__resetLanguage" ID="MiniEditor.__resetLanguage"></a> |
|
1035 <h4>MiniEditor.__resetLanguage</h4> |
|
1036 <b>__resetLanguage</b>(<i></i>) |
|
1037 |
|
1038 <p> |
|
1039 Private method used to reset the language selection. |
|
1040 </p> |
|
1041 <a NAME="MiniEditor.__resizeLinenoMargin" ID="MiniEditor.__resizeLinenoMargin"></a> |
|
1042 <h4>MiniEditor.__resizeLinenoMargin</h4> |
|
1043 <b>__resizeLinenoMargin</b>(<i></i>) |
|
1044 |
|
1045 <p> |
|
1046 Private slot to resize the line numbers margin. |
|
1047 </p> |
|
1048 <a NAME="MiniEditor.__save" ID="MiniEditor.__save"></a> |
|
1049 <h4>MiniEditor.__save</h4> |
|
1050 <b>__save</b>(<i></i>) |
|
1051 |
|
1052 <p> |
|
1053 Private slot to save a file. |
|
1054 </p> |
|
1055 <dl> |
|
1056 <dt>Return:</dt> |
|
1057 <dd> |
|
1058 flag indicating success (boolean) |
|
1059 </dd> |
|
1060 </dl> |
|
1061 <a NAME="MiniEditor.__saveAs" ID="MiniEditor.__saveAs"></a> |
|
1062 <h4>MiniEditor.__saveAs</h4> |
|
1063 <b>__saveAs</b>(<i></i>) |
|
1064 |
|
1065 <p> |
|
1066 Private slot to save a file with a new name. |
|
1067 </p> |
|
1068 <dl> |
|
1069 <dt>Return:</dt> |
|
1070 <dd> |
|
1071 flag indicating success (boolean) |
|
1072 </dd> |
|
1073 </dl> |
|
1074 <a NAME="MiniEditor.__saveCopy" ID="MiniEditor.__saveCopy"></a> |
|
1075 <h4>MiniEditor.__saveCopy</h4> |
|
1076 <b>__saveCopy</b>(<i></i>) |
|
1077 |
|
1078 <p> |
|
1079 Private slot to save a copy of the file with a new name. |
|
1080 </p> |
|
1081 <a NAME="MiniEditor.__saveFile" ID="MiniEditor.__saveFile"></a> |
|
1082 <h4>MiniEditor.__saveFile</h4> |
|
1083 <b>__saveFile</b>(<i>fileName</i>) |
|
1084 |
|
1085 <p> |
|
1086 Private method to save to the given file. |
|
1087 </p> |
|
1088 <dl> |
|
1089 |
|
1090 <dt><i>fileName</i> (str)</dt> |
|
1091 <dd> |
|
1092 name of the file to save to |
|
1093 </dd> |
|
1094 </dl> |
|
1095 <dl> |
|
1096 <dt>Return:</dt> |
|
1097 <dd> |
|
1098 flag indicating success |
|
1099 </dd> |
|
1100 </dl> |
|
1101 <dl> |
|
1102 <dt>Return Type:</dt> |
|
1103 <dd> |
|
1104 bool |
|
1105 </dd> |
|
1106 </dl> |
|
1107 <a NAME="MiniEditor.__searchClearMarkers" ID="MiniEditor.__searchClearMarkers"></a> |
|
1108 <h4>MiniEditor.__searchClearMarkers</h4> |
|
1109 <b>__searchClearMarkers</b>(<i></i>) |
|
1110 |
|
1111 <p> |
|
1112 Private method to clear the search markers of the active window. |
|
1113 </p> |
|
1114 <a NAME="MiniEditor.__searchNext" ID="MiniEditor.__searchNext"></a> |
|
1115 <h4>MiniEditor.__searchNext</h4> |
|
1116 <b>__searchNext</b>(<i></i>) |
|
1117 |
|
1118 <p> |
|
1119 Private slot to handle the search next action. |
|
1120 </p> |
|
1121 <a NAME="MiniEditor.__searchPrev" ID="MiniEditor.__searchPrev"></a> |
|
1122 <h4>MiniEditor.__searchPrev</h4> |
|
1123 <b>__searchPrev</b>(<i></i>) |
|
1124 |
|
1125 <p> |
|
1126 Private slot to handle the search previous action. |
|
1127 </p> |
|
1128 <a NAME="MiniEditor.__selectAll" ID="MiniEditor.__selectAll"></a> |
|
1129 <h4>MiniEditor.__selectAll</h4> |
|
1130 <b>__selectAll</b>(<i></i>) |
|
1131 |
|
1132 <p> |
|
1133 Private slot handling the select all context menu action. |
|
1134 </p> |
|
1135 <a NAME="MiniEditor.__selectPygmentsLexer" ID="MiniEditor.__selectPygmentsLexer"></a> |
|
1136 <h4>MiniEditor.__selectPygmentsLexer</h4> |
|
1137 <b>__selectPygmentsLexer</b>(<i></i>) |
|
1138 |
|
1139 <p> |
|
1140 Private method to select a specific pygments lexer. |
|
1141 </p> |
|
1142 <dl> |
|
1143 <dt>Return:</dt> |
|
1144 <dd> |
|
1145 name of the selected pygments lexer |
|
1146 </dd> |
|
1147 </dl> |
|
1148 <dl> |
|
1149 <dt>Return Type:</dt> |
|
1150 <dd> |
|
1151 str |
|
1152 </dd> |
|
1153 </dl> |
|
1154 <a NAME="MiniEditor.__setCurrentFile" ID="MiniEditor.__setCurrentFile"></a> |
|
1155 <h4>MiniEditor.__setCurrentFile</h4> |
|
1156 <b>__setCurrentFile</b>(<i>fileName</i>) |
|
1157 |
|
1158 <p> |
|
1159 Private method to register the file name of the current file. |
|
1160 </p> |
|
1161 <dl> |
|
1162 |
|
1163 <dt><i>fileName</i></dt> |
|
1164 <dd> |
|
1165 name of the file to register (string) |
|
1166 </dd> |
|
1167 </dl> |
|
1168 <a NAME="MiniEditor.__setEolMode" ID="MiniEditor.__setEolMode"></a> |
|
1169 <h4>MiniEditor.__setEolMode</h4> |
|
1170 <b>__setEolMode</b>(<i></i>) |
|
1171 |
|
1172 <p> |
|
1173 Private method to configure the eol mode of the editor. |
|
1174 </p> |
|
1175 <a NAME="MiniEditor.__setMargins" ID="MiniEditor.__setMargins"></a> |
|
1176 <h4>MiniEditor.__setMargins</h4> |
|
1177 <b>__setMargins</b>(<i></i>) |
|
1178 |
|
1179 <p> |
|
1180 Private method to configure the margins. |
|
1181 </p> |
|
1182 <a NAME="MiniEditor.__setMonospaced" ID="MiniEditor.__setMonospaced"></a> |
|
1183 <h4>MiniEditor.__setMonospaced</h4> |
|
1184 <b>__setMonospaced</b>(<i>on</i>) |
|
1185 |
|
1186 <p> |
|
1187 Private method to set/reset a monospaced font. |
|
1188 </p> |
|
1189 <dl> |
|
1190 |
|
1191 <dt><i>on</i></dt> |
|
1192 <dd> |
|
1193 flag to indicate usage of a monospace font (boolean) |
|
1194 </dd> |
|
1195 </dl> |
|
1196 <a NAME="MiniEditor.__setSbFile" ID="MiniEditor.__setSbFile"></a> |
|
1197 <h4>MiniEditor.__setSbFile</h4> |
|
1198 <b>__setSbFile</b>(<i>line=None, pos=None, language=None, zoom=None</i>) |
|
1199 |
|
1200 <p> |
|
1201 Private method to set the file info in the status bar. |
|
1202 </p> |
|
1203 <dl> |
|
1204 |
|
1205 <dt><i>line</i> (int)</dt> |
|
1206 <dd> |
|
1207 line number to display |
|
1208 </dd> |
|
1209 <dt><i>pos</i> (int)</dt> |
|
1210 <dd> |
|
1211 character position to display |
|
1212 </dd> |
|
1213 <dt><i>language</i> (str)</dt> |
|
1214 <dd> |
|
1215 language to display |
|
1216 </dd> |
|
1217 <dt><i>zoom</i> (int)</dt> |
|
1218 <dd> |
|
1219 zoom value |
|
1220 </dd> |
|
1221 </dl> |
|
1222 <a NAME="MiniEditor.__setTabAndIndent" ID="MiniEditor.__setTabAndIndent"></a> |
|
1223 <h4>MiniEditor.__setTabAndIndent</h4> |
|
1224 <b>__setTabAndIndent</b>(<i></i>) |
|
1225 |
|
1226 <p> |
|
1227 Private method to set indentation size and style and tab width. |
|
1228 </p> |
|
1229 <a NAME="MiniEditor.__setTextDisplay" ID="MiniEditor.__setTextDisplay"></a> |
|
1230 <h4>MiniEditor.__setTextDisplay</h4> |
|
1231 <b>__setTextDisplay</b>(<i></i>) |
|
1232 |
|
1233 <p> |
|
1234 Private method to configure the text display. |
|
1235 </p> |
|
1236 <a NAME="MiniEditor.__showContextMenuLanguages" ID="MiniEditor.__showContextMenuLanguages"></a> |
|
1237 <h4>MiniEditor.__showContextMenuLanguages</h4> |
|
1238 <b>__showContextMenuLanguages</b>(<i></i>) |
|
1239 |
|
1240 <p> |
|
1241 Private slot handling the aboutToShow signal of the languages context |
|
1242 menu. |
|
1243 </p> |
|
1244 <a NAME="MiniEditor.__showLanguagesMenu" ID="MiniEditor.__showLanguagesMenu"></a> |
|
1245 <h4>MiniEditor.__showLanguagesMenu</h4> |
|
1246 <b>__showLanguagesMenu</b>(<i>pos</i>) |
|
1247 |
|
1248 <p> |
|
1249 Private slot to show the Languages menu of the status bar. |
|
1250 </p> |
|
1251 <dl> |
|
1252 |
|
1253 <dt><i>pos</i></dt> |
|
1254 <dd> |
|
1255 position the menu should be shown at (QPoint) |
|
1256 </dd> |
|
1257 </dl> |
|
1258 <a NAME="MiniEditor.__showPreferences" ID="MiniEditor.__showPreferences"></a> |
|
1259 <h4>MiniEditor.__showPreferences</h4> |
|
1260 <b>__showPreferences</b>(<i></i>) |
|
1261 |
|
1262 <p> |
|
1263 Private slot to set the preferences. |
|
1264 </p> |
|
1265 <a NAME="MiniEditor.__strippedName" ID="MiniEditor.__strippedName"></a> |
|
1266 <h4>MiniEditor.__strippedName</h4> |
|
1267 <b>__strippedName</b>(<i>fullFileName</i>) |
|
1268 |
|
1269 <p> |
|
1270 Private method to return the filename part of the given path. |
|
1271 </p> |
|
1272 <dl> |
|
1273 |
|
1274 <dt><i>fullFileName</i></dt> |
|
1275 <dd> |
|
1276 full pathname of the given file (string) |
|
1277 </dd> |
|
1278 </dl> |
|
1279 <dl> |
|
1280 <dt>Return:</dt> |
|
1281 <dd> |
|
1282 filename part (string) |
|
1283 </dd> |
|
1284 </dl> |
|
1285 <a NAME="MiniEditor.__styleNeeded" ID="MiniEditor.__styleNeeded"></a> |
|
1286 <h4>MiniEditor.__styleNeeded</h4> |
|
1287 <b>__styleNeeded</b>(<i>position</i>) |
|
1288 |
|
1289 <p> |
|
1290 Private slot to handle the need for more styling. |
|
1291 </p> |
|
1292 <dl> |
|
1293 |
|
1294 <dt><i>position</i></dt> |
|
1295 <dd> |
|
1296 end position, that needs styling (integer) |
|
1297 </dd> |
|
1298 </dl> |
|
1299 <a NAME="MiniEditor.__undo" ID="MiniEditor.__undo"></a> |
|
1300 <h4>MiniEditor.__undo</h4> |
|
1301 <b>__undo</b>(<i></i>) |
|
1302 |
|
1303 <p> |
|
1304 Private method to undo the last recorded change. |
|
1305 </p> |
|
1306 <a NAME="MiniEditor.__whatsThis" ID="MiniEditor.__whatsThis"></a> |
|
1307 <h4>MiniEditor.__whatsThis</h4> |
|
1308 <b>__whatsThis</b>(<i></i>) |
|
1309 |
|
1310 <p> |
|
1311 Private slot called in to enter Whats This mode. |
|
1312 </p> |
|
1313 <a NAME="MiniEditor.__writeFile" ID="MiniEditor.__writeFile"></a> |
|
1314 <h4>MiniEditor.__writeFile</h4> |
|
1315 <b>__writeFile</b>(<i>fileName</i>) |
|
1316 |
|
1317 <p> |
|
1318 Private method to write the current editor text to a file. |
|
1319 </p> |
|
1320 <dl> |
|
1321 |
|
1322 <dt><i>fileName</i> (str)</dt> |
|
1323 <dd> |
|
1324 name of the file to be written to |
|
1325 </dd> |
|
1326 </dl> |
|
1327 <dl> |
|
1328 <dt>Return:</dt> |
|
1329 <dd> |
|
1330 flag indicating success |
|
1331 </dd> |
|
1332 </dl> |
|
1333 <dl> |
|
1334 <dt>Return Type:</dt> |
|
1335 <dd> |
|
1336 bool |
|
1337 </dd> |
|
1338 </dl> |
|
1339 <a NAME="MiniEditor.__writeSettings" ID="MiniEditor.__writeSettings"></a> |
|
1340 <h4>MiniEditor.__writeSettings</h4> |
|
1341 <b>__writeSettings</b>(<i></i>) |
|
1342 |
|
1343 <p> |
|
1344 Private method to write the settings for reuse. |
|
1345 </p> |
|
1346 <a NAME="MiniEditor.__zoom" ID="MiniEditor.__zoom"></a> |
|
1347 <h4>MiniEditor.__zoom</h4> |
|
1348 <b>__zoom</b>(<i></i>) |
|
1349 |
|
1350 <p> |
|
1351 Private method to handle the zoom action. |
|
1352 </p> |
|
1353 <a NAME="MiniEditor.__zoomIn" ID="MiniEditor.__zoomIn"></a> |
|
1354 <h4>MiniEditor.__zoomIn</h4> |
|
1355 <b>__zoomIn</b>(<i></i>) |
|
1356 |
|
1357 <p> |
|
1358 Private method to handle the zoom in action. |
|
1359 </p> |
|
1360 <a NAME="MiniEditor.__zoomOut" ID="MiniEditor.__zoomOut"></a> |
|
1361 <h4>MiniEditor.__zoomOut</h4> |
|
1362 <b>__zoomOut</b>(<i></i>) |
|
1363 |
|
1364 <p> |
|
1365 Private method to handle the zoom out action. |
|
1366 </p> |
|
1367 <a NAME="MiniEditor.__zoomReset" ID="MiniEditor.__zoomReset"></a> |
|
1368 <h4>MiniEditor.__zoomReset</h4> |
|
1369 <b>__zoomReset</b>(<i></i>) |
|
1370 |
|
1371 <p> |
|
1372 Private method to reset the zoom factor. |
|
1373 </p> |
|
1374 <a NAME="MiniEditor.__zoomTo" ID="MiniEditor.__zoomTo"></a> |
|
1375 <h4>MiniEditor.__zoomTo</h4> |
|
1376 <b>__zoomTo</b>(<i>value</i>) |
|
1377 |
|
1378 <p> |
|
1379 Private slot to zoom to a given value. |
|
1380 </p> |
|
1381 <dl> |
|
1382 |
|
1383 <dt><i>value</i></dt> |
|
1384 <dd> |
|
1385 zoom value to be set (integer) |
|
1386 </dd> |
|
1387 </dl> |
|
1388 <a NAME="MiniEditor.activeWindow" ID="MiniEditor.activeWindow"></a> |
|
1389 <h4>MiniEditor.activeWindow</h4> |
|
1390 <b>activeWindow</b>(<i></i>) |
|
1391 |
|
1392 <p> |
|
1393 Public method to fulfill the ViewManager interface. |
|
1394 </p> |
|
1395 <dl> |
|
1396 <dt>Return:</dt> |
|
1397 <dd> |
|
1398 reference to the text edit component (QsciScintillaCompat) |
|
1399 </dd> |
|
1400 </dl> |
|
1401 <a NAME="MiniEditor.clearSearchIndicators" ID="MiniEditor.clearSearchIndicators"></a> |
|
1402 <h4>MiniEditor.clearSearchIndicators</h4> |
|
1403 <b>clearSearchIndicators</b>(<i></i>) |
|
1404 |
|
1405 <p> |
|
1406 Public method to clear all search indicators. |
|
1407 </p> |
|
1408 <a NAME="MiniEditor.closeEvent" ID="MiniEditor.closeEvent"></a> |
|
1409 <h4>MiniEditor.closeEvent</h4> |
|
1410 <b>closeEvent</b>(<i>event</i>) |
|
1411 |
|
1412 <p> |
|
1413 Protected method to handle the close event. |
|
1414 </p> |
|
1415 <dl> |
|
1416 |
|
1417 <dt><i>event</i></dt> |
|
1418 <dd> |
|
1419 close event (QCloseEvent) |
|
1420 </dd> |
|
1421 </dl> |
|
1422 <a NAME="MiniEditor.getFileName" ID="MiniEditor.getFileName"></a> |
|
1423 <h4>MiniEditor.getFileName</h4> |
|
1424 <b>getFileName</b>(<i></i>) |
|
1425 |
|
1426 <p> |
|
1427 Public method to return the name of the file being displayed. |
|
1428 </p> |
|
1429 <dl> |
|
1430 <dt>Return:</dt> |
|
1431 <dd> |
|
1432 filename of the displayed file (string) |
|
1433 </dd> |
|
1434 </dl> |
|
1435 <a NAME="MiniEditor.getLanguage" ID="MiniEditor.getLanguage"></a> |
|
1436 <h4>MiniEditor.getLanguage</h4> |
|
1437 <b>getLanguage</b>(<i>normalized=True, forPygments=False</i>) |
|
1438 |
|
1439 <p> |
|
1440 Public method to retrieve the language of the editor. |
|
1441 </p> |
|
1442 <dl> |
|
1443 |
|
1444 <dt><i>normalized</i> (bool)</dt> |
|
1445 <dd> |
|
1446 flag indicating to normalize some Pygments |
|
1447 lexer names |
|
1448 </dd> |
|
1449 <dt><i>forPygments</i> (bool)</dt> |
|
1450 <dd> |
|
1451 flag indicating to normalize some lexer |
|
1452 names for Pygments |
|
1453 </dd> |
|
1454 </dl> |
|
1455 <dl> |
|
1456 <dt>Return:</dt> |
|
1457 <dd> |
|
1458 language of the editor |
|
1459 </dd> |
|
1460 </dl> |
|
1461 <dl> |
|
1462 <dt>Return Type:</dt> |
|
1463 <dd> |
|
1464 str |
|
1465 </dd> |
|
1466 </dl> |
|
1467 <a NAME="MiniEditor.getSRHistory" ID="MiniEditor.getSRHistory"></a> |
|
1468 <h4>MiniEditor.getSRHistory</h4> |
|
1469 <b>getSRHistory</b>(<i>key</i>) |
|
1470 |
|
1471 <p> |
|
1472 Public method to get the search or replace history list. |
|
1473 </p> |
|
1474 <dl> |
|
1475 |
|
1476 <dt><i>key</i></dt> |
|
1477 <dd> |
|
1478 list to return (must be 'search' or 'replace') |
|
1479 </dd> |
|
1480 </dl> |
|
1481 <dl> |
|
1482 <dt>Return:</dt> |
|
1483 <dd> |
|
1484 the requested history list (list of strings) |
|
1485 </dd> |
|
1486 </dl> |
|
1487 <a NAME="MiniEditor.gotoLine" ID="MiniEditor.gotoLine"></a> |
|
1488 <h4>MiniEditor.gotoLine</h4> |
|
1489 <b>gotoLine</b>(<i>line, pos=1</i>) |
|
1490 |
|
1491 <p> |
|
1492 Public slot to jump to the beginning of a line. |
|
1493 </p> |
|
1494 <dl> |
|
1495 |
|
1496 <dt><i>line</i> (int)</dt> |
|
1497 <dd> |
|
1498 line number to go to |
|
1499 </dd> |
|
1500 <dt><i>pos</i> (int)</dt> |
|
1501 <dd> |
|
1502 position in line to go to |
|
1503 </dd> |
|
1504 </dl> |
|
1505 <a NAME="MiniEditor.setLanguage" ID="MiniEditor.setLanguage"></a> |
|
1506 <h4>MiniEditor.setLanguage</h4> |
|
1507 <b>setLanguage</b>(<i>filename, initTextDisplay=True, pyname=""</i>) |
|
1508 |
|
1509 <p> |
|
1510 Public method to set a lexer language. |
|
1511 </p> |
|
1512 <dl> |
|
1513 |
|
1514 <dt><i>filename</i></dt> |
|
1515 <dd> |
|
1516 filename used to determine the associated lexer |
|
1517 language (string) |
|
1518 </dd> |
|
1519 <dt><i>initTextDisplay</i></dt> |
|
1520 <dd> |
|
1521 flag indicating an initialization of the text |
|
1522 display is required as well (boolean) |
|
1523 </dd> |
|
1524 <dt><i>pyname</i></dt> |
|
1525 <dd> |
|
1526 name of the pygments lexer to use (string) |
|
1527 </dd> |
|
1528 </dl> |
|
1529 <a NAME="MiniEditor.setSearchIndicator" ID="MiniEditor.setSearchIndicator"></a> |
|
1530 <h4>MiniEditor.setSearchIndicator</h4> |
|
1531 <b>setSearchIndicator</b>(<i>startPos, indicLength</i>) |
|
1532 |
|
1533 <p> |
|
1534 Public method to set a search indicator for the given range. |
|
1535 </p> |
|
1536 <dl> |
|
1537 |
|
1538 <dt><i>startPos</i></dt> |
|
1539 <dd> |
|
1540 start position of the indicator (integer) |
|
1541 </dd> |
|
1542 <dt><i>indicLength</i></dt> |
|
1543 <dd> |
|
1544 length of the indicator (integer) |
|
1545 </dd> |
|
1546 </dl> |
|
1547 <a NAME="MiniEditor.setText" ID="MiniEditor.setText"></a> |
|
1548 <h4>MiniEditor.setText</h4> |
|
1549 <b>setText</b>(<i>txt, filetype=None</i>) |
|
1550 |
|
1551 <p> |
|
1552 Public method to set the text programatically. |
|
1553 </p> |
|
1554 <dl> |
|
1555 |
|
1556 <dt><i>txt</i></dt> |
|
1557 <dd> |
|
1558 text to be set (string) |
|
1559 </dd> |
|
1560 <dt><i>filetype</i></dt> |
|
1561 <dd> |
|
1562 type of the source file (string) |
|
1563 </dd> |
|
1564 </dl> |
|
1565 <a NAME="MiniEditor.setWindowModified" ID="MiniEditor.setWindowModified"></a> |
|
1566 <h4>MiniEditor.setWindowModified</h4> |
|
1567 <b>setWindowModified</b>(<i>modified</i>) |
|
1568 |
|
1569 <p> |
|
1570 Public method to set the window modification status. |
|
1571 </p> |
|
1572 <dl> |
|
1573 |
|
1574 <dt><i>modified</i> (bool)</dt> |
|
1575 <dd> |
|
1576 flag indicating the modification status |
|
1577 </dd> |
|
1578 </dl> |
|
1579 <a NAME="MiniEditor.showReplaceWidget" ID="MiniEditor.showReplaceWidget"></a> |
|
1580 <h4>MiniEditor.showReplaceWidget</h4> |
|
1581 <b>showReplaceWidget</b>(<i></i>) |
|
1582 |
|
1583 <p> |
|
1584 Public method to show the replace widget. |
|
1585 </p> |
|
1586 <a NAME="MiniEditor.showSearchWidget" ID="MiniEditor.showSearchWidget"></a> |
|
1587 <h4>MiniEditor.showSearchWidget</h4> |
|
1588 <b>showSearchWidget</b>(<i></i>) |
|
1589 |
|
1590 <p> |
|
1591 Public method to show the search widget. |
|
1592 </p> |
|
1593 <a NAME="MiniEditor.textForFind" ID="MiniEditor.textForFind"></a> |
|
1594 <h4>MiniEditor.textForFind</h4> |
|
1595 <b>textForFind</b>(<i></i>) |
|
1596 |
|
1597 <p> |
|
1598 Public method to determine the selection or the current word for the |
|
1599 next find operation. |
|
1600 </p> |
|
1601 <dl> |
|
1602 <dt>Return:</dt> |
|
1603 <dd> |
|
1604 selection or current word (string) |
|
1605 </dd> |
|
1606 </dl> |
|
1607 <div align="right"><a href="#top">Up</a></div> |
|
1608 <hr /> |
|
1609 <hr /> |
|
1610 <a NAME="MiniScintilla" ID="MiniScintilla"></a> |
|
1611 <h2>MiniScintilla</h2> |
|
1612 |
|
1613 <p> |
|
1614 Class implementing a QsciScintillaCompat subclass for handling focus |
|
1615 events. |
|
1616 </p> |
|
1617 <h3>Derived from</h3> |
|
1618 QsciScintillaCompat |
|
1619 <h3>Class Attributes</h3> |
|
1620 |
|
1621 <table> |
|
1622 <tr><td>EncloseChars</td></tr> |
|
1623 </table> |
|
1624 <h3>Class Methods</h3> |
|
1625 |
|
1626 <table> |
|
1627 <tr><td>None</td></tr> |
|
1628 </table> |
|
1629 <h3>Methods</h3> |
|
1630 |
|
1631 <table> |
|
1632 |
|
1633 <tr> |
|
1634 <td><a href="#MiniScintilla.__init__">MiniScintilla</a></td> |
|
1635 <td>Constructor</td> |
|
1636 </tr> |
|
1637 <tr> |
|
1638 <td><a href="#MiniScintilla.editorCommand">editorCommand</a></td> |
|
1639 <td>Public method to perform a simple editor command.</td> |
|
1640 </tr> |
|
1641 <tr> |
|
1642 <td><a href="#MiniScintilla.encloseSelectedText">encloseSelectedText</a></td> |
|
1643 <td>Local function to enclose the current selection with some characters.</td> |
|
1644 </tr> |
|
1645 <tr> |
|
1646 <td><a href="#MiniScintilla.focusInEvent">focusInEvent</a></td> |
|
1647 <td>Protected method called when the editor receives focus.</td> |
|
1648 </tr> |
|
1649 <tr> |
|
1650 <td><a href="#MiniScintilla.focusOutEvent">focusOutEvent</a></td> |
|
1651 <td>Protected method called when the editor loses focus.</td> |
|
1652 </tr> |
|
1653 <tr> |
|
1654 <td><a href="#MiniScintilla.getFileName">getFileName</a></td> |
|
1655 <td>Public method to return the name of the file being displayed.</td> |
|
1656 </tr> |
|
1657 <tr> |
|
1658 <td><a href="#MiniScintilla.keyPressEvent">keyPressEvent</a></td> |
|
1659 <td>Protected method to handle the user input a key at a time.</td> |
|
1660 </tr> |
|
1661 <tr> |
|
1662 <td><a href="#MiniScintilla.mousePressEvent">mousePressEvent</a></td> |
|
1663 <td>Protected method to handle the mouse press event.</td> |
|
1664 </tr> |
|
1665 <tr> |
|
1666 <td><a href="#MiniScintilla.removeTrailingWhitespace">removeTrailingWhitespace</a></td> |
|
1667 <td>Public method to remove trailing whitespace.</td> |
|
1668 </tr> |
|
1669 </table> |
|
1670 <h3>Static Methods</h3> |
|
1671 |
|
1672 <table> |
|
1673 <tr><td>None</td></tr> |
|
1674 </table> |
|
1675 |
|
1676 <a NAME="MiniScintilla.__init__" ID="MiniScintilla.__init__"></a> |
|
1677 <h4>MiniScintilla (Constructor)</h4> |
|
1678 <b>MiniScintilla</b>(<i>parent=None</i>) |
|
1679 |
|
1680 <p> |
|
1681 Constructor |
|
1682 </p> |
|
1683 <dl> |
|
1684 |
|
1685 <dt><i>parent</i> (QWidget)</dt> |
|
1686 <dd> |
|
1687 parent widget |
|
1688 </dd> |
|
1689 </dl> |
|
1690 <a NAME="MiniScintilla.editorCommand" ID="MiniScintilla.editorCommand"></a> |
|
1691 <h4>MiniScintilla.editorCommand</h4> |
|
1692 <b>editorCommand</b>(<i>cmd</i>) |
|
1693 |
|
1694 <p> |
|
1695 Public method to perform a simple editor command. |
|
1696 </p> |
|
1697 <dl> |
|
1698 |
|
1699 <dt><i>cmd</i></dt> |
|
1700 <dd> |
|
1701 the scintilla command to be performed (integer) |
|
1702 </dd> |
|
1703 </dl> |
|
1704 <a NAME="MiniScintilla.encloseSelectedText" ID="MiniScintilla.encloseSelectedText"></a> |
|
1705 <h4>MiniScintilla.encloseSelectedText</h4> |
|
1706 <b>encloseSelectedText</b>(<i></i>) |
|
1707 |
|
1708 <p> |
|
1709 Local function to enclose the current selection with some |
|
1710 characters. |
|
1711 </p> |
|
1712 <dl> |
|
1713 |
|
1714 <dt><i>encString</i> (str)</dt> |
|
1715 <dd> |
|
1716 string to use to enclose the selection |
|
1717 (one or two characters) |
|
1718 </dd> |
|
1719 </dl> |
|
1720 <a NAME="MiniScintilla.focusInEvent" ID="MiniScintilla.focusInEvent"></a> |
|
1721 <h4>MiniScintilla.focusInEvent</h4> |
|
1722 <b>focusInEvent</b>(<i>event</i>) |
|
1723 |
|
1724 <p> |
|
1725 Protected method called when the editor receives focus. |
|
1726 </p> |
|
1727 <p> |
|
1728 This method checks for modifications of the current file and |
|
1729 rereads it upon request. The cursor is placed at the current position |
|
1730 assuming, that it is in the vicinity of the old position after the |
|
1731 reread. |
|
1732 </p> |
|
1733 <dl> |
|
1734 |
|
1735 <dt><i>event</i> (QFocusEvent)</dt> |
|
1736 <dd> |
|
1737 the event object |
|
1738 </dd> |
|
1739 </dl> |
|
1740 <a NAME="MiniScintilla.focusOutEvent" ID="MiniScintilla.focusOutEvent"></a> |
|
1741 <h4>MiniScintilla.focusOutEvent</h4> |
|
1742 <b>focusOutEvent</b>(<i>event</i>) |
|
1743 |
|
1744 <p> |
|
1745 Protected method called when the editor loses focus. |
|
1746 </p> |
|
1747 <dl> |
|
1748 |
|
1749 <dt><i>event</i> (QFocusEvent)</dt> |
|
1750 <dd> |
|
1751 the event object |
|
1752 </dd> |
|
1753 </dl> |
|
1754 <a NAME="MiniScintilla.getFileName" ID="MiniScintilla.getFileName"></a> |
|
1755 <h4>MiniScintilla.getFileName</h4> |
|
1756 <b>getFileName</b>(<i></i>) |
|
1757 |
|
1758 <p> |
|
1759 Public method to return the name of the file being displayed. |
|
1760 </p> |
|
1761 <dl> |
|
1762 <dt>Return:</dt> |
|
1763 <dd> |
|
1764 filename of the displayed file |
|
1765 </dd> |
|
1766 </dl> |
|
1767 <dl> |
|
1768 <dt>Return Type:</dt> |
|
1769 <dd> |
|
1770 str |
|
1771 </dd> |
|
1772 </dl> |
|
1773 <a NAME="MiniScintilla.keyPressEvent" ID="MiniScintilla.keyPressEvent"></a> |
|
1774 <h4>MiniScintilla.keyPressEvent</h4> |
|
1775 <b>keyPressEvent</b>(<i>ev</i>) |
|
1776 |
|
1777 <p> |
|
1778 Protected method to handle the user input a key at a time. |
|
1779 </p> |
|
1780 <dl> |
|
1781 |
|
1782 <dt><i>ev</i> (QKeyEvent)</dt> |
|
1783 <dd> |
|
1784 key event |
|
1785 </dd> |
|
1786 </dl> |
|
1787 <a NAME="MiniScintilla.mousePressEvent" ID="MiniScintilla.mousePressEvent"></a> |
|
1788 <h4>MiniScintilla.mousePressEvent</h4> |
|
1789 <b>mousePressEvent</b>(<i>event</i>) |
|
1790 |
|
1791 <p> |
|
1792 Protected method to handle the mouse press event. |
|
1793 </p> |
|
1794 <dl> |
|
1795 |
|
1796 <dt><i>event</i> (QMouseEvent)</dt> |
|
1797 <dd> |
|
1798 the mouse press event |
|
1799 </dd> |
|
1800 </dl> |
|
1801 <a NAME="MiniScintilla.removeTrailingWhitespace" ID="MiniScintilla.removeTrailingWhitespace"></a> |
|
1802 <h4>MiniScintilla.removeTrailingWhitespace</h4> |
|
1803 <b>removeTrailingWhitespace</b>(<i></i>) |
|
1804 |
|
1805 <p> |
|
1806 Public method to remove trailing whitespace. |
|
1807 </p> |
|
1808 <div align="right"><a href="#top">Up</a></div> |
|
1809 <hr /> |
|
1810 </body></html> |