Documentation/Source/eric4.QScintilla.Terminal.html

changeset 3
0d9daebf5b8c
equal deleted inserted replaced
2:bc6196164237 3:0d9daebf5b8c
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
4 <html><head>
5 <title>eric4.QScintilla.Terminal</title>
6 <style>
7 body {
8 background:white;
9 margin: 0em 1em 10em 1em;
10 color: black;
11 }
12
13 h1 { color: white; background: #4FA4FF; }
14 h2 { color: white; background: #4FA4FF; }
15 h3 { color: white; background: #00557F; }
16 h4 { color: white; background: #00557F; }
17
18 a { color: #AA5500; }
19
20 </style>
21 </head>
22 <body><a NAME="top" ID="top"></a>
23 <h1>eric4.QScintilla.Terminal</h1>
24 <p>
25 Module implementing a simple terminal based on QScintilla.
26 </p>
27 <h3>Global Attributes</h3>
28 <table>
29 <tr><td>None</td></tr>
30 </table>
31 <h3>Classes</h3>
32 <table>
33 <tr>
34 <td><a href="#Terminal">Terminal</a></td>
35 <td>Class implementing a simple terminal based on QScintilla.</td>
36 </tr>
37 </table>
38 <h3>Functions</h3>
39 <table>
40 <tr><td>None</td></tr>
41 </table>
42 <hr /><hr />
43 <a NAME="Terminal" ID="Terminal"></a>
44 <h2>Terminal</h2>
45 <p>
46 Class implementing a simple terminal based on QScintilla.
47 </p><p>
48 A user can enter commands that are executed by a shell process.
49 </p>
50 <h3>Derived from</h3>
51 QsciScintillaCompat
52 <h3>Class Attributes</h3>
53 <table>
54 <tr><td>None</td></tr>
55 </table>
56 <h3>Methods</h3>
57 <table>
58 <tr>
59 <td><a href="#Terminal.__init__">Terminal</a></td>
60 <td>Constructor</td>
61 </tr><tr>
62 <td><a href="#Terminal.__QScintillaCharLeft">__QScintillaCharLeft</a></td>
63 <td>Private method to handle the Cursor Left command.</td>
64 </tr><tr>
65 <td><a href="#Terminal.__QScintillaCharLeftExtend">__QScintillaCharLeftExtend</a></td>
66 <td>Private method to handle the Extend Selection Left command.</td>
67 </tr><tr>
68 <td><a href="#Terminal.__QScintillaCharRight">__QScintillaCharRight</a></td>
69 <td>Private method to handle the Cursor Right command.</td>
70 </tr><tr>
71 <td><a href="#Terminal.__QScintillaDelete">__QScintillaDelete</a></td>
72 <td>Private method to handle the delete command.</td>
73 </tr><tr>
74 <td><a href="#Terminal.__QScintillaDeleteBack">__QScintillaDeleteBack</a></td>
75 <td>Private method to handle the Backspace key.</td>
76 </tr><tr>
77 <td><a href="#Terminal.__QScintillaDeleteLineLeft">__QScintillaDeleteLineLeft</a></td>
78 <td>Private method to handle the Delete Line Left command.</td>
79 </tr><tr>
80 <td><a href="#Terminal.__QScintillaDeleteLineRight">__QScintillaDeleteLineRight</a></td>
81 <td>Private method to handle the Delete Line Right command.</td>
82 </tr><tr>
83 <td><a href="#Terminal.__QScintillaDeleteWordLeft">__QScintillaDeleteWordLeft</a></td>
84 <td>Private method to handle the Delete Word Left command.</td>
85 </tr><tr>
86 <td><a href="#Terminal.__QScintillaDeleteWordRight">__QScintillaDeleteWordRight</a></td>
87 <td>Private method to handle the Delete Word Right command.</td>
88 </tr><tr>
89 <td><a href="#Terminal.__QScintillaLeftCommand">__QScintillaLeftCommand</a></td>
90 <td>Private method to handle a QScintilla command working to the left.</td>
91 </tr><tr>
92 <td><a href="#Terminal.__QScintillaLeftDeleteCommand">__QScintillaLeftDeleteCommand</a></td>
93 <td>Private method to handle a QScintilla delete command working to the left.</td>
94 </tr><tr>
95 <td><a href="#Terminal.__QScintillaLineDown">__QScintillaLineDown</a></td>
96 <td>Private method to handle the Down key.</td>
97 </tr><tr>
98 <td><a href="#Terminal.__QScintillaLineEnd">__QScintillaLineEnd</a></td>
99 <td>Private method to handle the End key.</td>
100 </tr><tr>
101 <td><a href="#Terminal.__QScintillaLineUp">__QScintillaLineUp</a></td>
102 <td>Private method to handle the Up key.</td>
103 </tr><tr>
104 <td><a href="#Terminal.__QScintillaNewline">__QScintillaNewline</a></td>
105 <td>Private method to handle the Return key.</td>
106 </tr><tr>
107 <td><a href="#Terminal.__QScintillaRightCommand">__QScintillaRightCommand</a></td>
108 <td>Private method to handle a QScintilla command working to the right.</td>
109 </tr><tr>
110 <td><a href="#Terminal.__QScintillaVCHome">__QScintillaVCHome</a></td>
111 <td>Private method to handle the Home key.</td>
112 </tr><tr>
113 <td><a href="#Terminal.__QScintillaVCHomeExtend">__QScintillaVCHomeExtend</a></td>
114 <td>Private method to handle the Extend Selection to start of line command.</td>
115 </tr><tr>
116 <td><a href="#Terminal.__QScintillaWordLeft">__QScintillaWordLeft</a></td>
117 <td>Private method to handle the Cursor Word Left command.</td>
118 </tr><tr>
119 <td><a href="#Terminal.__QScintillaWordLeftExtend">__QScintillaWordLeftExtend</a></td>
120 <td>Private method to handle the Extend Selection Left one word command.</td>
121 </tr><tr>
122 <td><a href="#Terminal.__QScintillaWordRight">__QScintillaWordRight</a></td>
123 <td>Private method to handle the Cursor Word Right command.</td>
124 </tr><tr>
125 <td><a href="#Terminal.__bindLexer">__bindLexer</a></td>
126 <td>Private slot to set the lexer.</td>
127 </tr><tr>
128 <td><a href="#Terminal.__clearCurrentLine">__clearCurrentLine</a></td>
129 <td>Private method to clear the line containing the cursor.</td>
130 </tr><tr>
131 <td><a href="#Terminal.__clearHistory">__clearHistory</a></td>
132 <td>Private slot to clear the current history.</td>
133 </tr><tr>
134 <td><a href="#Terminal.__configure">__configure</a></td>
135 <td>Private method to open the configuration dialog.</td>
136 </tr><tr>
137 <td><a href="#Terminal.__executeCommand">__executeCommand</a></td>
138 <td>Private slot to execute a command.</td>
139 </tr><tr>
140 <td><a href="#Terminal.__finished">__finished</a></td>
141 <td>Private method called, when the shell process has finished.</td>
142 </tr><tr>
143 <td><a href="#Terminal.__getEndPos">__getEndPos</a></td>
144 <td>Private method to return the line and column of the last character.</td>
145 </tr><tr>
146 <td><a href="#Terminal.__insertHistory">__insertHistory</a></td>
147 <td>Private method to insert a command selected from the history.</td>
148 </tr><tr>
149 <td><a href="#Terminal.__insertText">__insertText</a></td>
150 <td>Private method to insert some text at the current cursor position.</td>
151 </tr><tr>
152 <td><a href="#Terminal.__insertTextAtEnd">__insertTextAtEnd</a></td>
153 <td>Private method to insert some text at the end of the command line.</td>
154 </tr><tr>
155 <td><a href="#Terminal.__isCursorOnLastLine">__isCursorOnLastLine</a></td>
156 <td>Private method to check, if the cursor is on the last line.</td>
157 </tr><tr>
158 <td><a href="#Terminal.__readOutput">__readOutput</a></td>
159 <td>Private method to process the output of the shell.</td>
160 </tr><tr>
161 <td><a href="#Terminal.__reset">__reset</a></td>
162 <td>Private slot to handle the 'reset' context menu entry.</td>
163 </tr><tr>
164 <td><a href="#Terminal.__rsearchHistory">__rsearchHistory</a></td>
165 <td>Private method used to reverse search the history.</td>
166 </tr><tr>
167 <td><a href="#Terminal.__searchHistory">__searchHistory</a></td>
168 <td>Private method used to search the history.</td>
169 </tr><tr>
170 <td><a href="#Terminal.__selectHistory">__selectHistory</a></td>
171 <td>Private slot to select a history entry to execute.</td>
172 </tr><tr>
173 <td><a href="#Terminal.__send">__send</a></td>
174 <td>Private method to send data to the shell process.</td>
175 </tr><tr>
176 <td><a href="#Terminal.__sendCtrl">__sendCtrl</a></td>
177 <td>Private slot to send a control command to the shell process.</td>
178 </tr><tr>
179 <td><a href="#Terminal.__setMargin0">__setMargin0</a></td>
180 <td>Private method to configure margin 0.</td>
181 </tr><tr>
182 <td><a href="#Terminal.__setMonospaced">__setMonospaced</a></td>
183 <td>Private method to set/reset a monospaced font.</td>
184 </tr><tr>
185 <td><a href="#Terminal.__setTextDisplay">__setTextDisplay</a></td>
186 <td>Private method to configure the text display.</td>
187 </tr><tr>
188 <td><a href="#Terminal.__showHistory">__showHistory</a></td>
189 <td>Private slot to show the shell history dialog.</td>
190 </tr><tr>
191 <td><a href="#Terminal.__startShell">__startShell</a></td>
192 <td>Private slot to start the shell process.</td>
193 </tr><tr>
194 <td><a href="#Terminal.__started">__started</a></td>
195 <td>Private method called, when the shell process has started.</td>
196 </tr><tr>
197 <td><a href="#Terminal.__stopShell">__stopShell</a></td>
198 <td>Private slot to stop the shell process.</td>
199 </tr><tr>
200 <td><a href="#Terminal.__useHistory">__useHistory</a></td>
201 <td>Private method to display a command from the history.</td>
202 </tr><tr>
203 <td><a href="#Terminal.__write">__write</a></td>
204 <td>Private method to display some text.</td>
205 </tr><tr>
206 <td><a href="#Terminal.clear">clear</a></td>
207 <td>Public slot to clear the display.</td>
208 </tr><tr>
209 <td><a href="#Terminal.closeTerminal">closeTerminal</a></td>
210 <td>Public method to shutdown the terminal.</td>
211 </tr><tr>
212 <td><a href="#Terminal.contextMenuEvent">contextMenuEvent</a></td>
213 <td>Reimplemented to show our own context menu.</td>
214 </tr><tr>
215 <td><a href="#Terminal.editorCommand">editorCommand</a></td>
216 <td>Public method to perform an editor command.</td>
217 </tr><tr>
218 <td><a href="#Terminal.focusInEvent">focusInEvent</a></td>
219 <td>Public method called when the shell receives focus.</td>
220 </tr><tr>
221 <td><a href="#Terminal.focusOutEvent">focusOutEvent</a></td>
222 <td>Public method called when the shell loses focus.</td>
223 </tr><tr>
224 <td><a href="#Terminal.getHistory">getHistory</a></td>
225 <td>Public method to get the history.</td>
226 </tr><tr>
227 <td><a href="#Terminal.handlePreferencesChanged">handlePreferencesChanged</a></td>
228 <td>Public slot to handle the preferencesChanged signal.</td>
229 </tr><tr>
230 <td><a href="#Terminal.insert">insert</a></td>
231 <td>Public slot to insert text at the current cursor position.</td>
232 </tr><tr>
233 <td><a href="#Terminal.keyPressEvent">keyPressEvent</a></td>
234 <td>Re-implemented to handle the user input a key at a time.</td>
235 </tr><tr>
236 <td><a href="#Terminal.loadHistory">loadHistory</a></td>
237 <td>Public method to load the history.</td>
238 </tr><tr>
239 <td><a href="#Terminal.mousePressEvent">mousePressEvent</a></td>
240 <td>Protected method to handle the mouse press event.</td>
241 </tr><tr>
242 <td><a href="#Terminal.reloadHistory">reloadHistory</a></td>
243 <td>Public method to reload the history.</td>
244 </tr><tr>
245 <td><a href="#Terminal.saveHistory">saveHistory</a></td>
246 <td>Public method to save the history.</td>
247 </tr>
248 </table>
249 <a NAME="Terminal.__init__" ID="Terminal.__init__"></a>
250 <h4>Terminal (Constructor)</h4>
251 <b>Terminal</b>(<i>vm, parent = None</i>)
252 <p>
253 Constructor
254 </p><dl>
255 <dt><i>vm</i></dt>
256 <dd>
257 reference to the viewmanager object
258 </dd><dt><i>parent</i></dt>
259 <dd>
260 parent widget (QWidget)
261 </dd>
262 </dl><a NAME="Terminal.__QScintillaCharLeft" ID="Terminal.__QScintillaCharLeft"></a>
263 <h4>Terminal.__QScintillaCharLeft</h4>
264 <b>__QScintillaCharLeft</b>(<i></i>)
265 <p>
266 Private method to handle the Cursor Left command.
267 </p><a NAME="Terminal.__QScintillaCharLeftExtend" ID="Terminal.__QScintillaCharLeftExtend"></a>
268 <h4>Terminal.__QScintillaCharLeftExtend</h4>
269 <b>__QScintillaCharLeftExtend</b>(<i></i>)
270 <p>
271 Private method to handle the Extend Selection Left command.
272 </p><a NAME="Terminal.__QScintillaCharRight" ID="Terminal.__QScintillaCharRight"></a>
273 <h4>Terminal.__QScintillaCharRight</h4>
274 <b>__QScintillaCharRight</b>(<i></i>)
275 <p>
276 Private method to handle the Cursor Right command.
277 </p><a NAME="Terminal.__QScintillaDelete" ID="Terminal.__QScintillaDelete"></a>
278 <h4>Terminal.__QScintillaDelete</h4>
279 <b>__QScintillaDelete</b>(<i></i>)
280 <p>
281 Private method to handle the delete command.
282 </p><a NAME="Terminal.__QScintillaDeleteBack" ID="Terminal.__QScintillaDeleteBack"></a>
283 <h4>Terminal.__QScintillaDeleteBack</h4>
284 <b>__QScintillaDeleteBack</b>(<i></i>)
285 <p>
286 Private method to handle the Backspace key.
287 </p><a NAME="Terminal.__QScintillaDeleteLineLeft" ID="Terminal.__QScintillaDeleteLineLeft"></a>
288 <h4>Terminal.__QScintillaDeleteLineLeft</h4>
289 <b>__QScintillaDeleteLineLeft</b>(<i></i>)
290 <p>
291 Private method to handle the Delete Line Left command.
292 </p><a NAME="Terminal.__QScintillaDeleteLineRight" ID="Terminal.__QScintillaDeleteLineRight"></a>
293 <h4>Terminal.__QScintillaDeleteLineRight</h4>
294 <b>__QScintillaDeleteLineRight</b>(<i></i>)
295 <p>
296 Private method to handle the Delete Line Right command.
297 </p><a NAME="Terminal.__QScintillaDeleteWordLeft" ID="Terminal.__QScintillaDeleteWordLeft"></a>
298 <h4>Terminal.__QScintillaDeleteWordLeft</h4>
299 <b>__QScintillaDeleteWordLeft</b>(<i></i>)
300 <p>
301 Private method to handle the Delete Word Left command.
302 </p><a NAME="Terminal.__QScintillaDeleteWordRight" ID="Terminal.__QScintillaDeleteWordRight"></a>
303 <h4>Terminal.__QScintillaDeleteWordRight</h4>
304 <b>__QScintillaDeleteWordRight</b>(<i></i>)
305 <p>
306 Private method to handle the Delete Word Right command.
307 </p><a NAME="Terminal.__QScintillaLeftCommand" ID="Terminal.__QScintillaLeftCommand"></a>
308 <h4>Terminal.__QScintillaLeftCommand</h4>
309 <b>__QScintillaLeftCommand</b>(<i>method, allLinesAllowed = False</i>)
310 <p>
311 Private method to handle a QScintilla command working to the left.
312 </p><dl>
313 <dt><i>method</i></dt>
314 <dd>
315 shell method to execute
316 </dd>
317 </dl><a NAME="Terminal.__QScintillaLeftDeleteCommand" ID="Terminal.__QScintillaLeftDeleteCommand"></a>
318 <h4>Terminal.__QScintillaLeftDeleteCommand</h4>
319 <b>__QScintillaLeftDeleteCommand</b>(<i>method</i>)
320 <p>
321 Private method to handle a QScintilla delete command working to the left.
322 </p><dl>
323 <dt><i>method</i></dt>
324 <dd>
325 shell method to execute
326 </dd>
327 </dl><a NAME="Terminal.__QScintillaLineDown" ID="Terminal.__QScintillaLineDown"></a>
328 <h4>Terminal.__QScintillaLineDown</h4>
329 <b>__QScintillaLineDown</b>(<i>cmd</i>)
330 <p>
331 Private method to handle the Down key.
332 </p><dl>
333 <dt><i>cmd</i></dt>
334 <dd>
335 QScintilla command
336 </dd>
337 </dl><a NAME="Terminal.__QScintillaLineEnd" ID="Terminal.__QScintillaLineEnd"></a>
338 <h4>Terminal.__QScintillaLineEnd</h4>
339 <b>__QScintillaLineEnd</b>(<i>cmd</i>)
340 <p>
341 Private method to handle the End key.
342 </p><dl>
343 <dt><i>cmd</i></dt>
344 <dd>
345 QScintilla command
346 </dd>
347 </dl><a NAME="Terminal.__QScintillaLineUp" ID="Terminal.__QScintillaLineUp"></a>
348 <h4>Terminal.__QScintillaLineUp</h4>
349 <b>__QScintillaLineUp</b>(<i>cmd</i>)
350 <p>
351 Private method to handle the Up key.
352 </p><dl>
353 <dt><i>cmd</i></dt>
354 <dd>
355 QScintilla command
356 </dd>
357 </dl><a NAME="Terminal.__QScintillaNewline" ID="Terminal.__QScintillaNewline"></a>
358 <h4>Terminal.__QScintillaNewline</h4>
359 <b>__QScintillaNewline</b>(<i>cmd</i>)
360 <p>
361 Private method to handle the Return key.
362 </p><dl>
363 <dt><i>cmd</i></dt>
364 <dd>
365 QScintilla command
366 </dd>
367 </dl><a NAME="Terminal.__QScintillaRightCommand" ID="Terminal.__QScintillaRightCommand"></a>
368 <h4>Terminal.__QScintillaRightCommand</h4>
369 <b>__QScintillaRightCommand</b>(<i>method</i>)
370 <p>
371 Private method to handle a QScintilla command working to the right.
372 </p><dl>
373 <dt><i>method</i></dt>
374 <dd>
375 shell method to execute
376 </dd>
377 </dl><a NAME="Terminal.__QScintillaVCHome" ID="Terminal.__QScintillaVCHome"></a>
378 <h4>Terminal.__QScintillaVCHome</h4>
379 <b>__QScintillaVCHome</b>(<i>cmd</i>)
380 <p>
381 Private method to handle the Home key.
382 </p><dl>
383 <dt><i>cmd</i></dt>
384 <dd>
385 QScintilla command
386 </dd>
387 </dl><a NAME="Terminal.__QScintillaVCHomeExtend" ID="Terminal.__QScintillaVCHomeExtend"></a>
388 <h4>Terminal.__QScintillaVCHomeExtend</h4>
389 <b>__QScintillaVCHomeExtend</b>(<i></i>)
390 <p>
391 Private method to handle the Extend Selection to start of line command.
392 </p><a NAME="Terminal.__QScintillaWordLeft" ID="Terminal.__QScintillaWordLeft"></a>
393 <h4>Terminal.__QScintillaWordLeft</h4>
394 <b>__QScintillaWordLeft</b>(<i></i>)
395 <p>
396 Private method to handle the Cursor Word Left command.
397 </p><a NAME="Terminal.__QScintillaWordLeftExtend" ID="Terminal.__QScintillaWordLeftExtend"></a>
398 <h4>Terminal.__QScintillaWordLeftExtend</h4>
399 <b>__QScintillaWordLeftExtend</b>(<i></i>)
400 <p>
401 Private method to handle the Extend Selection Left one word command.
402 </p><a NAME="Terminal.__QScintillaWordRight" ID="Terminal.__QScintillaWordRight"></a>
403 <h4>Terminal.__QScintillaWordRight</h4>
404 <b>__QScintillaWordRight</b>(<i></i>)
405 <p>
406 Private method to handle the Cursor Word Right command.
407 </p><a NAME="Terminal.__bindLexer" ID="Terminal.__bindLexer"></a>
408 <h4>Terminal.__bindLexer</h4>
409 <b>__bindLexer</b>(<i></i>)
410 <p>
411 Private slot to set the lexer.
412 </p><a NAME="Terminal.__clearCurrentLine" ID="Terminal.__clearCurrentLine"></a>
413 <h4>Terminal.__clearCurrentLine</h4>
414 <b>__clearCurrentLine</b>(<i></i>)
415 <p>
416 Private method to clear the line containing the cursor.
417 </p><a NAME="Terminal.__clearHistory" ID="Terminal.__clearHistory"></a>
418 <h4>Terminal.__clearHistory</h4>
419 <b>__clearHistory</b>(<i></i>)
420 <p>
421 Private slot to clear the current history.
422 </p><a NAME="Terminal.__configure" ID="Terminal.__configure"></a>
423 <h4>Terminal.__configure</h4>
424 <b>__configure</b>(<i></i>)
425 <p>
426 Private method to open the configuration dialog.
427 </p><a NAME="Terminal.__executeCommand" ID="Terminal.__executeCommand"></a>
428 <h4>Terminal.__executeCommand</h4>
429 <b>__executeCommand</b>(<i>cmd</i>)
430 <p>
431 Private slot to execute a command.
432 </p><dl>
433 <dt><i>cmd</i></dt>
434 <dd>
435 command to be executed by debug client (string)
436 </dd>
437 </dl><a NAME="Terminal.__finished" ID="Terminal.__finished"></a>
438 <h4>Terminal.__finished</h4>
439 <b>__finished</b>(<i></i>)
440 <p>
441 Private method called, when the shell process has finished.
442 </p><a NAME="Terminal.__getEndPos" ID="Terminal.__getEndPos"></a>
443 <h4>Terminal.__getEndPos</h4>
444 <b>__getEndPos</b>(<i></i>)
445 <p>
446 Private method to return the line and column of the last character.
447 </p><dl>
448 <dt>Returns:</dt>
449 <dd>
450 tuple of two values (int, int) giving the line and column
451 </dd>
452 </dl><a NAME="Terminal.__insertHistory" ID="Terminal.__insertHistory"></a>
453 <h4>Terminal.__insertHistory</h4>
454 <b>__insertHistory</b>(<i>cmd</i>)
455 <p>
456 Private method to insert a command selected from the history.
457 </p><dl>
458 <dt><i>cmd</i></dt>
459 <dd>
460 history entry to be inserted (string)
461 </dd>
462 </dl><a NAME="Terminal.__insertText" ID="Terminal.__insertText"></a>
463 <h4>Terminal.__insertText</h4>
464 <b>__insertText</b>(<i>s</i>)
465 <p>
466 Private method to insert some text at the current cursor position.
467 </p><dl>
468 <dt><i>s</i></dt>
469 <dd>
470 text to be inserted (string)
471 </dd>
472 </dl><a NAME="Terminal.__insertTextAtEnd" ID="Terminal.__insertTextAtEnd"></a>
473 <h4>Terminal.__insertTextAtEnd</h4>
474 <b>__insertTextAtEnd</b>(<i>s</i>)
475 <p>
476 Private method to insert some text at the end of the command line.
477 </p><dl>
478 <dt><i>s</i></dt>
479 <dd>
480 text to be inserted (string)
481 </dd>
482 </dl><a NAME="Terminal.__isCursorOnLastLine" ID="Terminal.__isCursorOnLastLine"></a>
483 <h4>Terminal.__isCursorOnLastLine</h4>
484 <b>__isCursorOnLastLine</b>(<i></i>)
485 <p>
486 Private method to check, if the cursor is on the last line.
487 </p><a NAME="Terminal.__readOutput" ID="Terminal.__readOutput"></a>
488 <h4>Terminal.__readOutput</h4>
489 <b>__readOutput</b>(<i></i>)
490 <p>
491 Private method to process the output of the shell.
492 </p><a NAME="Terminal.__reset" ID="Terminal.__reset"></a>
493 <h4>Terminal.__reset</h4>
494 <b>__reset</b>(<i></i>)
495 <p>
496 Private slot to handle the 'reset' context menu entry.
497 </p><a NAME="Terminal.__rsearchHistory" ID="Terminal.__rsearchHistory"></a>
498 <h4>Terminal.__rsearchHistory</h4>
499 <b>__rsearchHistory</b>(<i>txt, startIdx = -1</i>)
500 <p>
501 Private method used to reverse search the history.
502 </p><dl>
503 <dt><i>txt</i></dt>
504 <dd>
505 text to match at the beginning (string)
506 </dd><dt><i>startIdx</i></dt>
507 <dd>
508 index to start search from (integer)
509 </dd>
510 </dl><dl>
511 <dt>Returns:</dt>
512 <dd>
513 index of found entry (integer)
514 </dd>
515 </dl><a NAME="Terminal.__searchHistory" ID="Terminal.__searchHistory"></a>
516 <h4>Terminal.__searchHistory</h4>
517 <b>__searchHistory</b>(<i>txt, startIdx = -1</i>)
518 <p>
519 Private method used to search the history.
520 </p><dl>
521 <dt><i>txt</i></dt>
522 <dd>
523 text to match at the beginning (string)
524 </dd><dt><i>startIdx</i></dt>
525 <dd>
526 index to start search from (integer)
527 </dd>
528 </dl><dl>
529 <dt>Returns:</dt>
530 <dd>
531 index of found entry (integer)
532 </dd>
533 </dl><a NAME="Terminal.__selectHistory" ID="Terminal.__selectHistory"></a>
534 <h4>Terminal.__selectHistory</h4>
535 <b>__selectHistory</b>(<i></i>)
536 <p>
537 Private slot to select a history entry to execute.
538 </p><a NAME="Terminal.__send" ID="Terminal.__send"></a>
539 <h4>Terminal.__send</h4>
540 <b>__send</b>(<i>data</i>)
541 <p>
542 Private method to send data to the shell process.
543 </p><dl>
544 <dt><i>data</i></dt>
545 <dd>
546 data to be sent to the shell process (string)
547 </dd>
548 </dl><a NAME="Terminal.__sendCtrl" ID="Terminal.__sendCtrl"></a>
549 <h4>Terminal.__sendCtrl</h4>
550 <b>__sendCtrl</b>(<i>cmd</i>)
551 <p>
552 Private slot to send a control command to the shell process.
553 </p><dl>
554 <dt><i>the</i></dt>
555 <dd>
556 control command to be sent (integer)
557 </dd>
558 </dl><a NAME="Terminal.__setMargin0" ID="Terminal.__setMargin0"></a>
559 <h4>Terminal.__setMargin0</h4>
560 <b>__setMargin0</b>(<i></i>)
561 <p>
562 Private method to configure margin 0.
563 </p><a NAME="Terminal.__setMonospaced" ID="Terminal.__setMonospaced"></a>
564 <h4>Terminal.__setMonospaced</h4>
565 <b>__setMonospaced</b>(<i>on</i>)
566 <p>
567 Private method to set/reset a monospaced font.
568 </p><dl>
569 <dt><i>on</i></dt>
570 <dd>
571 flag to indicate usage of a monospace font (boolean)
572 </dd>
573 </dl><a NAME="Terminal.__setTextDisplay" ID="Terminal.__setTextDisplay"></a>
574 <h4>Terminal.__setTextDisplay</h4>
575 <b>__setTextDisplay</b>(<i></i>)
576 <p>
577 Private method to configure the text display.
578 </p><a NAME="Terminal.__showHistory" ID="Terminal.__showHistory"></a>
579 <h4>Terminal.__showHistory</h4>
580 <b>__showHistory</b>(<i></i>)
581 <p>
582 Private slot to show the shell history dialog.
583 </p><a NAME="Terminal.__startShell" ID="Terminal.__startShell"></a>
584 <h4>Terminal.__startShell</h4>
585 <b>__startShell</b>(<i></i>)
586 <p>
587 Private slot to start the shell process.
588 </p><a NAME="Terminal.__started" ID="Terminal.__started"></a>
589 <h4>Terminal.__started</h4>
590 <b>__started</b>(<i></i>)
591 <p>
592 Private method called, when the shell process has started.
593 </p><a NAME="Terminal.__stopShell" ID="Terminal.__stopShell"></a>
594 <h4>Terminal.__stopShell</h4>
595 <b>__stopShell</b>(<i></i>)
596 <p>
597 Private slot to stop the shell process.
598 </p><a NAME="Terminal.__useHistory" ID="Terminal.__useHistory"></a>
599 <h4>Terminal.__useHistory</h4>
600 <b>__useHistory</b>(<i></i>)
601 <p>
602 Private method to display a command from the history.
603 </p><a NAME="Terminal.__write" ID="Terminal.__write"></a>
604 <h4>Terminal.__write</h4>
605 <b>__write</b>(<i>s</i>)
606 <p>
607 Private method to display some text.
608 </p><dl>
609 <dt><i>s</i></dt>
610 <dd>
611 text to be displayed (string)
612 </dd>
613 </dl><a NAME="Terminal.clear" ID="Terminal.clear"></a>
614 <h4>Terminal.clear</h4>
615 <b>clear</b>(<i></i>)
616 <p>
617 Public slot to clear the display.
618 </p><a NAME="Terminal.closeTerminal" ID="Terminal.closeTerminal"></a>
619 <h4>Terminal.closeTerminal</h4>
620 <b>closeTerminal</b>(<i></i>)
621 <p>
622 Public method to shutdown the terminal.
623 </p><a NAME="Terminal.contextMenuEvent" ID="Terminal.contextMenuEvent"></a>
624 <h4>Terminal.contextMenuEvent</h4>
625 <b>contextMenuEvent</b>(<i>ev</i>)
626 <p>
627 Reimplemented to show our own context menu.
628 </p><dl>
629 <dt><i>ev</i></dt>
630 <dd>
631 context menu event (QContextMenuEvent)
632 </dd>
633 </dl><a NAME="Terminal.editorCommand" ID="Terminal.editorCommand"></a>
634 <h4>Terminal.editorCommand</h4>
635 <b>editorCommand</b>(<i>cmd</i>)
636 <p>
637 Public method to perform an editor command.
638 </p><dl>
639 <dt><i>cmd</i></dt>
640 <dd>
641 the scintilla command to be performed
642 </dd>
643 </dl><a NAME="Terminal.focusInEvent" ID="Terminal.focusInEvent"></a>
644 <h4>Terminal.focusInEvent</h4>
645 <b>focusInEvent</b>(<i>event</i>)
646 <p>
647 Public method called when the shell receives focus.
648 </p><dl>
649 <dt><i>event</i></dt>
650 <dd>
651 the event object (QFocusEvent)
652 </dd>
653 </dl><a NAME="Terminal.focusOutEvent" ID="Terminal.focusOutEvent"></a>
654 <h4>Terminal.focusOutEvent</h4>
655 <b>focusOutEvent</b>(<i>event</i>)
656 <p>
657 Public method called when the shell loses focus.
658 </p><dl>
659 <dt><i>event</i></dt>
660 <dd>
661 the event object (QFocusEvent)
662 </dd>
663 </dl><a NAME="Terminal.getHistory" ID="Terminal.getHistory"></a>
664 <h4>Terminal.getHistory</h4>
665 <b>getHistory</b>(<i></i>)
666 <p>
667 Public method to get the history.
668 </p><dl>
669 <dt>Returns:</dt>
670 <dd>
671 reference to the history list (list of strings)
672 </dd>
673 </dl><a NAME="Terminal.handlePreferencesChanged" ID="Terminal.handlePreferencesChanged"></a>
674 <h4>Terminal.handlePreferencesChanged</h4>
675 <b>handlePreferencesChanged</b>(<i></i>)
676 <p>
677 Public slot to handle the preferencesChanged signal.
678 </p><a NAME="Terminal.insert" ID="Terminal.insert"></a>
679 <h4>Terminal.insert</h4>
680 <b>insert</b>(<i>txt</i>)
681 <p>
682 Public slot to insert text at the current cursor position.
683 </p><p>
684 The cursor is advanced to the end of the inserted text.
685 </p><dl>
686 <dt><i>txt</i></dt>
687 <dd>
688 text to be inserted (string)
689 </dd>
690 </dl><a NAME="Terminal.keyPressEvent" ID="Terminal.keyPressEvent"></a>
691 <h4>Terminal.keyPressEvent</h4>
692 <b>keyPressEvent</b>(<i>ev</i>)
693 <p>
694 Re-implemented to handle the user input a key at a time.
695 </p><dl>
696 <dt><i>ev</i></dt>
697 <dd>
698 key event (QKeyEvent)
699 </dd>
700 </dl><a NAME="Terminal.loadHistory" ID="Terminal.loadHistory"></a>
701 <h4>Terminal.loadHistory</h4>
702 <b>loadHistory</b>(<i></i>)
703 <p>
704 Public method to load the history.
705 </p><a NAME="Terminal.mousePressEvent" ID="Terminal.mousePressEvent"></a>
706 <h4>Terminal.mousePressEvent</h4>
707 <b>mousePressEvent</b>(<i>event</i>)
708 <p>
709 Protected method to handle the mouse press event.
710 </p><dl>
711 <dt><i>event</i></dt>
712 <dd>
713 the mouse press event (QMouseEvent)
714 </dd>
715 </dl><a NAME="Terminal.reloadHistory" ID="Terminal.reloadHistory"></a>
716 <h4>Terminal.reloadHistory</h4>
717 <b>reloadHistory</b>(<i></i>)
718 <p>
719 Public method to reload the history.
720 </p><a NAME="Terminal.saveHistory" ID="Terminal.saveHistory"></a>
721 <h4>Terminal.saveHistory</h4>
722 <b>saveHistory</b>(<i></i>)
723 <p>
724 Public method to save the history.
725 </p>
726 <div align="right"><a href="#top">Up</a></div>
727 <hr />
728 </body></html>

eric ide

mercurial