Documentation/Source/eric5.QScintilla.Terminal.html

branch
5_3_x
changeset 2475
c74e1cff7f3f
parent 2473
c9f484ea061b
child 2477
5d706fb30a10
equal deleted inserted replaced
2473:c9f484ea061b 2475:c74e1cff7f3f
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric5.QScintilla.Terminal</title>
4 <meta charset="UTF-8">
5 <style>
6 body {
7 background: #EDECE6;
8 margin: 0em 1em 10em 1em;
9 color: black;
10 }
11
12 h1 { color: white; background: #85774A; }
13 h2 { color: white; background: #85774A; }
14 h3 { color: white; background: #9D936E; }
15 h4 { color: white; background: #9D936E; }
16
17 a { color: #BA6D36; }
18
19 </style>
20 </head>
21 <body><a NAME="top" ID="top"></a>
22 <h1>eric5.QScintilla.Terminal</h1>
23 <p>
24 Module implementing a simple terminal based on QScintilla.
25 </p>
26 <h3>Global Attributes</h3>
27 <table>
28 <tr><td>None</td></tr>
29 </table>
30 <h3>Classes</h3>
31 <table>
32 <tr>
33 <td><a href="#Terminal">Terminal</a></td>
34 <td>Class implementing a simple terminal based on QScintilla.</td>
35 </tr><tr>
36 <td><a href="#TerminalAssembly">TerminalAssembly</a></td>
37 <td>Class implementing the containing widget for the terminal.</td>
38 </tr>
39 </table>
40 <h3>Functions</h3>
41 <table>
42 <tr><td>None</td></tr>
43 </table>
44 <hr /><hr />
45 <a NAME="Terminal" ID="Terminal"></a>
46 <h2>Terminal</h2>
47 <p>
48 Class implementing a simple terminal based on QScintilla.
49 </p><p>
50 A user can enter commands that are executed by a shell process.
51 </p><h3>Signals</h3>
52 <dl>
53 <dt>searchStringFound(found)</dt>
54 <dd>
55 emitted to indicate the search result (boolean)
56 </dd>
57 </dl>
58 <h3>Derived from</h3>
59 QsciScintillaCompat
60 <h3>Class Attributes</h3>
61 <table>
62 <tr><td>None</td></tr>
63 </table>
64 <h3>Class Methods</h3>
65 <table>
66 <tr><td>None</td></tr>
67 </table>
68 <h3>Methods</h3>
69 <table>
70 <tr>
71 <td><a href="#Terminal.__init__">Terminal</a></td>
72 <td>Constructor</td>
73 </tr><tr>
74 <td><a href="#Terminal.__QScintillaCharLeft">__QScintillaCharLeft</a></td>
75 <td>Private method to handle the Cursor Left command.</td>
76 </tr><tr>
77 <td><a href="#Terminal.__QScintillaCharLeftExtend">__QScintillaCharLeftExtend</a></td>
78 <td>Private method to handle the Extend Selection Left command.</td>
79 </tr><tr>
80 <td><a href="#Terminal.__QScintillaCharRight">__QScintillaCharRight</a></td>
81 <td>Private method to handle the Cursor Right command.</td>
82 </tr><tr>
83 <td><a href="#Terminal.__QScintillaDelete">__QScintillaDelete</a></td>
84 <td>Private method to handle the delete command.</td>
85 </tr><tr>
86 <td><a href="#Terminal.__QScintillaDeleteBack">__QScintillaDeleteBack</a></td>
87 <td>Private method to handle the Backspace key.</td>
88 </tr><tr>
89 <td><a href="#Terminal.__QScintillaDeleteLineLeft">__QScintillaDeleteLineLeft</a></td>
90 <td>Private method to handle the Delete Line Left command.</td>
91 </tr><tr>
92 <td><a href="#Terminal.__QScintillaDeleteLineRight">__QScintillaDeleteLineRight</a></td>
93 <td>Private method to handle the Delete Line Right command.</td>
94 </tr><tr>
95 <td><a href="#Terminal.__QScintillaDeleteWordLeft">__QScintillaDeleteWordLeft</a></td>
96 <td>Private method to handle the Delete Word Left command.</td>
97 </tr><tr>
98 <td><a href="#Terminal.__QScintillaDeleteWordRight">__QScintillaDeleteWordRight</a></td>
99 <td>Private method to handle the Delete Word Right command.</td>
100 </tr><tr>
101 <td><a href="#Terminal.__QScintillaLeftCommand">__QScintillaLeftCommand</a></td>
102 <td>Private method to handle a QScintilla command working to the left.</td>
103 </tr><tr>
104 <td><a href="#Terminal.__QScintillaLeftDeleteCommand">__QScintillaLeftDeleteCommand</a></td>
105 <td>Private method to handle a QScintilla delete command working to the left.</td>
106 </tr><tr>
107 <td><a href="#Terminal.__QScintillaLineDown">__QScintillaLineDown</a></td>
108 <td>Private method to handle the Down key.</td>
109 </tr><tr>
110 <td><a href="#Terminal.__QScintillaLineEnd">__QScintillaLineEnd</a></td>
111 <td>Private method to handle the End key.</td>
112 </tr><tr>
113 <td><a href="#Terminal.__QScintillaLineUp">__QScintillaLineUp</a></td>
114 <td>Private method to handle the Up key.</td>
115 </tr><tr>
116 <td><a href="#Terminal.__QScintillaNewline">__QScintillaNewline</a></td>
117 <td>Private method to handle the Return key.</td>
118 </tr><tr>
119 <td><a href="#Terminal.__QScintillaRightCommand">__QScintillaRightCommand</a></td>
120 <td>Private method to handle a QScintilla command working to the right.</td>
121 </tr><tr>
122 <td><a href="#Terminal.__QScintillaVCHome">__QScintillaVCHome</a></td>
123 <td>Private method to handle the Home key.</td>
124 </tr><tr>
125 <td><a href="#Terminal.__QScintillaVCHomeExtend">__QScintillaVCHomeExtend</a></td>
126 <td>Private method to handle the Extend Selection to start of line command.</td>
127 </tr><tr>
128 <td><a href="#Terminal.__QScintillaWordLeft">__QScintillaWordLeft</a></td>
129 <td>Private method to handle the Cursor Word Left command.</td>
130 </tr><tr>
131 <td><a href="#Terminal.__QScintillaWordLeftExtend">__QScintillaWordLeftExtend</a></td>
132 <td>Private method to handle the Extend Selection Left one word command.</td>
133 </tr><tr>
134 <td><a href="#Terminal.__QScintillaWordRight">__QScintillaWordRight</a></td>
135 <td>Private method to handle the Cursor Word Right command.</td>
136 </tr><tr>
137 <td><a href="#Terminal.__bindLexer">__bindLexer</a></td>
138 <td>Private slot to set the lexer.</td>
139 </tr><tr>
140 <td><a href="#Terminal.__clearCurrentLine">__clearCurrentLine</a></td>
141 <td>Private method to clear the line containing the cursor.</td>
142 </tr><tr>
143 <td><a href="#Terminal.__clearHistory">__clearHistory</a></td>
144 <td>Private slot to clear the current history.</td>
145 </tr><tr>
146 <td><a href="#Terminal.__configure">__configure</a></td>
147 <td>Private method to open the configuration dialog.</td>
148 </tr><tr>
149 <td><a href="#Terminal.__executeCommand">__executeCommand</a></td>
150 <td>Private slot to execute a command.</td>
151 </tr><tr>
152 <td><a href="#Terminal.__find">__find</a></td>
153 <td>Private slot to show the find widget.</td>
154 </tr><tr>
155 <td><a href="#Terminal.__finished">__finished</a></td>
156 <td>Private method called, when the shell process has finished.</td>
157 </tr><tr>
158 <td><a href="#Terminal.__getEndPos">__getEndPos</a></td>
159 <td>Private method to return the line and column of the last character.</td>
160 </tr><tr>
161 <td><a href="#Terminal.__insertHistory">__insertHistory</a></td>
162 <td>Private method to insert a command selected from the history.</td>
163 </tr><tr>
164 <td><a href="#Terminal.__insertText">__insertText</a></td>
165 <td>Private method to insert some text at the current cursor position.</td>
166 </tr><tr>
167 <td><a href="#Terminal.__insertTextAtEnd">__insertTextAtEnd</a></td>
168 <td>Private method to insert some text at the end of the command line.</td>
169 </tr><tr>
170 <td><a href="#Terminal.__isCursorOnLastLine">__isCursorOnLastLine</a></td>
171 <td>Private method to check, if the cursor is on the last line.</td>
172 </tr><tr>
173 <td><a href="#Terminal.__readOutput">__readOutput</a></td>
174 <td>Private method to process the output of the shell.</td>
175 </tr><tr>
176 <td><a href="#Terminal.__reset">__reset</a></td>
177 <td>Private slot to handle the 'reset' context menu entry.</td>
178 </tr><tr>
179 <td><a href="#Terminal.__rsearchHistory">__rsearchHistory</a></td>
180 <td>Private method used to reverse search the history.</td>
181 </tr><tr>
182 <td><a href="#Terminal.__searchHistory">__searchHistory</a></td>
183 <td>Private method used to search the history.</td>
184 </tr><tr>
185 <td><a href="#Terminal.__searchNext">__searchNext</a></td>
186 <td>Private method to search for the next occurrence.</td>
187 </tr><tr>
188 <td><a href="#Terminal.__searchPrev">__searchPrev</a></td>
189 <td>Private method to search for the next occurrence.</td>
190 </tr><tr>
191 <td><a href="#Terminal.__selectHistory">__selectHistory</a></td>
192 <td>Private slot to select a history entry to execute.</td>
193 </tr><tr>
194 <td><a href="#Terminal.__send">__send</a></td>
195 <td>Private method to send data to the shell process.</td>
196 </tr><tr>
197 <td><a href="#Terminal.__sendCtrl">__sendCtrl</a></td>
198 <td>Private slot to send a control command to the shell process.</td>
199 </tr><tr>
200 <td><a href="#Terminal.__setMargin0">__setMargin0</a></td>
201 <td>Private method to configure margin 0.</td>
202 </tr><tr>
203 <td><a href="#Terminal.__setMonospaced">__setMonospaced</a></td>
204 <td>Private method to set/reset a monospaced font.</td>
205 </tr><tr>
206 <td><a href="#Terminal.__setTextDisplay">__setTextDisplay</a></td>
207 <td>Private method to configure the text display.</td>
208 </tr><tr>
209 <td><a href="#Terminal.__showHistory">__showHistory</a></td>
210 <td>Private slot to show the shell history dialog.</td>
211 </tr><tr>
212 <td><a href="#Terminal.__startShell">__startShell</a></td>
213 <td>Private slot to start the shell process.</td>
214 </tr><tr>
215 <td><a href="#Terminal.__started">__started</a></td>
216 <td>Private method called, when the shell process has started.</td>
217 </tr><tr>
218 <td><a href="#Terminal.__stopShell">__stopShell</a></td>
219 <td>Private slot to stop the shell process.</td>
220 </tr><tr>
221 <td><a href="#Terminal.__useHistory">__useHistory</a></td>
222 <td>Private method to display a command from the history.</td>
223 </tr><tr>
224 <td><a href="#Terminal.__write">__write</a></td>
225 <td>Private method to display some text.</td>
226 </tr><tr>
227 <td><a href="#Terminal.clear">clear</a></td>
228 <td>Public slot to clear the display.</td>
229 </tr><tr>
230 <td><a href="#Terminal.closeTerminal">closeTerminal</a></td>
231 <td>Public method to shutdown the terminal.</td>
232 </tr><tr>
233 <td><a href="#Terminal.contextMenuEvent">contextMenuEvent</a></td>
234 <td>Reimplemented to show our own context menu.</td>
235 </tr><tr>
236 <td><a href="#Terminal.editorCommand">editorCommand</a></td>
237 <td>Public method to perform an editor command.</td>
238 </tr><tr>
239 <td><a href="#Terminal.event">event</a></td>
240 <td>Protected method handling events.</td>
241 </tr><tr>
242 <td><a href="#Terminal.focusInEvent">focusInEvent</a></td>
243 <td>Public method called when the shell receives focus.</td>
244 </tr><tr>
245 <td><a href="#Terminal.focusOutEvent">focusOutEvent</a></td>
246 <td>Public method called when the shell loses focus.</td>
247 </tr><tr>
248 <td><a href="#Terminal.gestureEvent">gestureEvent</a></td>
249 <td>Protected method handling gesture events.</td>
250 </tr><tr>
251 <td><a href="#Terminal.getHistory">getHistory</a></td>
252 <td>Public method to get the history.</td>
253 </tr><tr>
254 <td><a href="#Terminal.handlePreferencesChanged">handlePreferencesChanged</a></td>
255 <td>Public slot to handle the preferencesChanged signal.</td>
256 </tr><tr>
257 <td><a href="#Terminal.insert">insert</a></td>
258 <td>Public slot to insert text at the current cursor position.</td>
259 </tr><tr>
260 <td><a href="#Terminal.keyPressEvent">keyPressEvent</a></td>
261 <td>Re-implemented to handle the user input a key at a time.</td>
262 </tr><tr>
263 <td><a href="#Terminal.loadHistory">loadHistory</a></td>
264 <td>Public method to load the history.</td>
265 </tr><tr>
266 <td><a href="#Terminal.mousePressEvent">mousePressEvent</a></td>
267 <td>Protected method to handle the mouse press event.</td>
268 </tr><tr>
269 <td><a href="#Terminal.reloadHistory">reloadHistory</a></td>
270 <td>Public method to reload the history.</td>
271 </tr><tr>
272 <td><a href="#Terminal.saveHistory">saveHistory</a></td>
273 <td>Public method to save the history.</td>
274 </tr><tr>
275 <td><a href="#Terminal.searchNext">searchNext</a></td>
276 <td>Public method to search the next occurrence of the given text.</td>
277 </tr><tr>
278 <td><a href="#Terminal.searchPrev">searchPrev</a></td>
279 <td>Public method to search the previous occurrence of the given text.</td>
280 </tr><tr>
281 <td><a href="#Terminal.wheelEvent">wheelEvent</a></td>
282 <td>Protected method to handle wheel events.</td>
283 </tr>
284 </table>
285 <h3>Static Methods</h3>
286 <table>
287 <tr><td>None</td></tr>
288 </table>
289 <a NAME="Terminal.__init__" ID="Terminal.__init__"></a>
290 <h4>Terminal (Constructor)</h4>
291 <b>Terminal</b>(<i>vm, parent=None</i>)
292 <p>
293 Constructor
294 </p><dl>
295 <dt><i>vm</i></dt>
296 <dd>
297 reference to the viewmanager object
298 </dd><dt><i>parent</i></dt>
299 <dd>
300 parent widget (QWidget)
301 </dd>
302 </dl><a NAME="Terminal.__QScintillaCharLeft" ID="Terminal.__QScintillaCharLeft"></a>
303 <h4>Terminal.__QScintillaCharLeft</h4>
304 <b>__QScintillaCharLeft</b>(<i></i>)
305 <p>
306 Private method to handle the Cursor Left command.
307 </p><a NAME="Terminal.__QScintillaCharLeftExtend" ID="Terminal.__QScintillaCharLeftExtend"></a>
308 <h4>Terminal.__QScintillaCharLeftExtend</h4>
309 <b>__QScintillaCharLeftExtend</b>(<i></i>)
310 <p>
311 Private method to handle the Extend Selection Left command.
312 </p><a NAME="Terminal.__QScintillaCharRight" ID="Terminal.__QScintillaCharRight"></a>
313 <h4>Terminal.__QScintillaCharRight</h4>
314 <b>__QScintillaCharRight</b>(<i></i>)
315 <p>
316 Private method to handle the Cursor Right command.
317 </p><a NAME="Terminal.__QScintillaDelete" ID="Terminal.__QScintillaDelete"></a>
318 <h4>Terminal.__QScintillaDelete</h4>
319 <b>__QScintillaDelete</b>(<i></i>)
320 <p>
321 Private method to handle the delete command.
322 </p><a NAME="Terminal.__QScintillaDeleteBack" ID="Terminal.__QScintillaDeleteBack"></a>
323 <h4>Terminal.__QScintillaDeleteBack</h4>
324 <b>__QScintillaDeleteBack</b>(<i></i>)
325 <p>
326 Private method to handle the Backspace key.
327 </p><a NAME="Terminal.__QScintillaDeleteLineLeft" ID="Terminal.__QScintillaDeleteLineLeft"></a>
328 <h4>Terminal.__QScintillaDeleteLineLeft</h4>
329 <b>__QScintillaDeleteLineLeft</b>(<i></i>)
330 <p>
331 Private method to handle the Delete Line Left command.
332 </p><a NAME="Terminal.__QScintillaDeleteLineRight" ID="Terminal.__QScintillaDeleteLineRight"></a>
333 <h4>Terminal.__QScintillaDeleteLineRight</h4>
334 <b>__QScintillaDeleteLineRight</b>(<i></i>)
335 <p>
336 Private method to handle the Delete Line Right command.
337 </p><a NAME="Terminal.__QScintillaDeleteWordLeft" ID="Terminal.__QScintillaDeleteWordLeft"></a>
338 <h4>Terminal.__QScintillaDeleteWordLeft</h4>
339 <b>__QScintillaDeleteWordLeft</b>(<i></i>)
340 <p>
341 Private method to handle the Delete Word Left command.
342 </p><a NAME="Terminal.__QScintillaDeleteWordRight" ID="Terminal.__QScintillaDeleteWordRight"></a>
343 <h4>Terminal.__QScintillaDeleteWordRight</h4>
344 <b>__QScintillaDeleteWordRight</b>(<i></i>)
345 <p>
346 Private method to handle the Delete Word Right command.
347 </p><a NAME="Terminal.__QScintillaLeftCommand" ID="Terminal.__QScintillaLeftCommand"></a>
348 <h4>Terminal.__QScintillaLeftCommand</h4>
349 <b>__QScintillaLeftCommand</b>(<i>method, allLinesAllowed=False</i>)
350 <p>
351 Private method to handle a QScintilla command working to the left.
352 </p><dl>
353 <dt><i>method</i></dt>
354 <dd>
355 shell method to execute
356 </dd>
357 </dl><a NAME="Terminal.__QScintillaLeftDeleteCommand" ID="Terminal.__QScintillaLeftDeleteCommand"></a>
358 <h4>Terminal.__QScintillaLeftDeleteCommand</h4>
359 <b>__QScintillaLeftDeleteCommand</b>(<i>method</i>)
360 <p>
361 Private method to handle a QScintilla delete command working to the left.
362 </p><dl>
363 <dt><i>method</i></dt>
364 <dd>
365 shell method to execute
366 </dd>
367 </dl><a NAME="Terminal.__QScintillaLineDown" ID="Terminal.__QScintillaLineDown"></a>
368 <h4>Terminal.__QScintillaLineDown</h4>
369 <b>__QScintillaLineDown</b>(<i>cmd</i>)
370 <p>
371 Private method to handle the Down key.
372 </p><dl>
373 <dt><i>cmd</i></dt>
374 <dd>
375 QScintilla command
376 </dd>
377 </dl><a NAME="Terminal.__QScintillaLineEnd" ID="Terminal.__QScintillaLineEnd"></a>
378 <h4>Terminal.__QScintillaLineEnd</h4>
379 <b>__QScintillaLineEnd</b>(<i>cmd</i>)
380 <p>
381 Private method to handle the End key.
382 </p><dl>
383 <dt><i>cmd</i></dt>
384 <dd>
385 QScintilla command
386 </dd>
387 </dl><a NAME="Terminal.__QScintillaLineUp" ID="Terminal.__QScintillaLineUp"></a>
388 <h4>Terminal.__QScintillaLineUp</h4>
389 <b>__QScintillaLineUp</b>(<i>cmd</i>)
390 <p>
391 Private method to handle the Up key.
392 </p><dl>
393 <dt><i>cmd</i></dt>
394 <dd>
395 QScintilla command
396 </dd>
397 </dl><a NAME="Terminal.__QScintillaNewline" ID="Terminal.__QScintillaNewline"></a>
398 <h4>Terminal.__QScintillaNewline</h4>
399 <b>__QScintillaNewline</b>(<i>cmd</i>)
400 <p>
401 Private method to handle the Return key.
402 </p><dl>
403 <dt><i>cmd</i></dt>
404 <dd>
405 QScintilla command
406 </dd>
407 </dl><a NAME="Terminal.__QScintillaRightCommand" ID="Terminal.__QScintillaRightCommand"></a>
408 <h4>Terminal.__QScintillaRightCommand</h4>
409 <b>__QScintillaRightCommand</b>(<i>method</i>)
410 <p>
411 Private method to handle a QScintilla command working to the right.
412 </p><dl>
413 <dt><i>method</i></dt>
414 <dd>
415 shell method to execute
416 </dd>
417 </dl><a NAME="Terminal.__QScintillaVCHome" ID="Terminal.__QScintillaVCHome"></a>
418 <h4>Terminal.__QScintillaVCHome</h4>
419 <b>__QScintillaVCHome</b>(<i>cmd</i>)
420 <p>
421 Private method to handle the Home key.
422 </p><dl>
423 <dt><i>cmd</i></dt>
424 <dd>
425 QScintilla command
426 </dd>
427 </dl><a NAME="Terminal.__QScintillaVCHomeExtend" ID="Terminal.__QScintillaVCHomeExtend"></a>
428 <h4>Terminal.__QScintillaVCHomeExtend</h4>
429 <b>__QScintillaVCHomeExtend</b>(<i></i>)
430 <p>
431 Private method to handle the Extend Selection to start of line command.
432 </p><a NAME="Terminal.__QScintillaWordLeft" ID="Terminal.__QScintillaWordLeft"></a>
433 <h4>Terminal.__QScintillaWordLeft</h4>
434 <b>__QScintillaWordLeft</b>(<i></i>)
435 <p>
436 Private method to handle the Cursor Word Left command.
437 </p><a NAME="Terminal.__QScintillaWordLeftExtend" ID="Terminal.__QScintillaWordLeftExtend"></a>
438 <h4>Terminal.__QScintillaWordLeftExtend</h4>
439 <b>__QScintillaWordLeftExtend</b>(<i></i>)
440 <p>
441 Private method to handle the Extend Selection Left one word command.
442 </p><a NAME="Terminal.__QScintillaWordRight" ID="Terminal.__QScintillaWordRight"></a>
443 <h4>Terminal.__QScintillaWordRight</h4>
444 <b>__QScintillaWordRight</b>(<i></i>)
445 <p>
446 Private method to handle the Cursor Word Right command.
447 </p><a NAME="Terminal.__bindLexer" ID="Terminal.__bindLexer"></a>
448 <h4>Terminal.__bindLexer</h4>
449 <b>__bindLexer</b>(<i></i>)
450 <p>
451 Private slot to set the lexer.
452 </p><a NAME="Terminal.__clearCurrentLine" ID="Terminal.__clearCurrentLine"></a>
453 <h4>Terminal.__clearCurrentLine</h4>
454 <b>__clearCurrentLine</b>(<i></i>)
455 <p>
456 Private method to clear the line containing the cursor.
457 </p><a NAME="Terminal.__clearHistory" ID="Terminal.__clearHistory"></a>
458 <h4>Terminal.__clearHistory</h4>
459 <b>__clearHistory</b>(<i></i>)
460 <p>
461 Private slot to clear the current history.
462 </p><a NAME="Terminal.__configure" ID="Terminal.__configure"></a>
463 <h4>Terminal.__configure</h4>
464 <b>__configure</b>(<i></i>)
465 <p>
466 Private method to open the configuration dialog.
467 </p><a NAME="Terminal.__executeCommand" ID="Terminal.__executeCommand"></a>
468 <h4>Terminal.__executeCommand</h4>
469 <b>__executeCommand</b>(<i>cmd</i>)
470 <p>
471 Private slot to execute a command.
472 </p><dl>
473 <dt><i>cmd</i></dt>
474 <dd>
475 command to be executed by debug client (string)
476 </dd>
477 </dl><a NAME="Terminal.__find" ID="Terminal.__find"></a>
478 <h4>Terminal.__find</h4>
479 <b>__find</b>(<i></i>)
480 <p>
481 Private slot to show the find widget.
482 </p><a NAME="Terminal.__finished" ID="Terminal.__finished"></a>
483 <h4>Terminal.__finished</h4>
484 <b>__finished</b>(<i></i>)
485 <p>
486 Private method called, when the shell process has finished.
487 </p><a NAME="Terminal.__getEndPos" ID="Terminal.__getEndPos"></a>
488 <h4>Terminal.__getEndPos</h4>
489 <b>__getEndPos</b>(<i></i>)
490 <p>
491 Private method to return the line and column of the last character.
492 </p><dl>
493 <dt>Returns:</dt>
494 <dd>
495 tuple of two values (int, int) giving the line and column
496 </dd>
497 </dl><a NAME="Terminal.__insertHistory" ID="Terminal.__insertHistory"></a>
498 <h4>Terminal.__insertHistory</h4>
499 <b>__insertHistory</b>(<i>cmd</i>)
500 <p>
501 Private method to insert a command selected from the history.
502 </p><dl>
503 <dt><i>cmd</i></dt>
504 <dd>
505 history entry to be inserted (string)
506 </dd>
507 </dl><a NAME="Terminal.__insertText" ID="Terminal.__insertText"></a>
508 <h4>Terminal.__insertText</h4>
509 <b>__insertText</b>(<i>s</i>)
510 <p>
511 Private method to insert some text at the current cursor position.
512 </p><dl>
513 <dt><i>s</i></dt>
514 <dd>
515 text to be inserted (string)
516 </dd>
517 </dl><a NAME="Terminal.__insertTextAtEnd" ID="Terminal.__insertTextAtEnd"></a>
518 <h4>Terminal.__insertTextAtEnd</h4>
519 <b>__insertTextAtEnd</b>(<i>s</i>)
520 <p>
521 Private method to insert some text at the end of the command line.
522 </p><dl>
523 <dt><i>s</i></dt>
524 <dd>
525 text to be inserted (string)
526 </dd>
527 </dl><a NAME="Terminal.__isCursorOnLastLine" ID="Terminal.__isCursorOnLastLine"></a>
528 <h4>Terminal.__isCursorOnLastLine</h4>
529 <b>__isCursorOnLastLine</b>(<i></i>)
530 <p>
531 Private method to check, if the cursor is on the last line.
532 </p><a NAME="Terminal.__readOutput" ID="Terminal.__readOutput"></a>
533 <h4>Terminal.__readOutput</h4>
534 <b>__readOutput</b>(<i></i>)
535 <p>
536 Private method to process the output of the shell.
537 </p><a NAME="Terminal.__reset" ID="Terminal.__reset"></a>
538 <h4>Terminal.__reset</h4>
539 <b>__reset</b>(<i></i>)
540 <p>
541 Private slot to handle the 'reset' context menu entry.
542 </p><a NAME="Terminal.__rsearchHistory" ID="Terminal.__rsearchHistory"></a>
543 <h4>Terminal.__rsearchHistory</h4>
544 <b>__rsearchHistory</b>(<i>txt, startIdx=-1</i>)
545 <p>
546 Private method used to reverse search the history.
547 </p><dl>
548 <dt><i>txt</i></dt>
549 <dd>
550 text to match at the beginning (string)
551 </dd><dt><i>startIdx</i></dt>
552 <dd>
553 index to start search from (integer)
554 </dd>
555 </dl><dl>
556 <dt>Returns:</dt>
557 <dd>
558 index of found entry (integer)
559 </dd>
560 </dl><a NAME="Terminal.__searchHistory" ID="Terminal.__searchHistory"></a>
561 <h4>Terminal.__searchHistory</h4>
562 <b>__searchHistory</b>(<i>txt, startIdx=-1</i>)
563 <p>
564 Private method used to search the history.
565 </p><dl>
566 <dt><i>txt</i></dt>
567 <dd>
568 text to match at the beginning (string)
569 </dd><dt><i>startIdx</i></dt>
570 <dd>
571 index to start search from (integer)
572 </dd>
573 </dl><dl>
574 <dt>Returns:</dt>
575 <dd>
576 index of found entry (integer)
577 </dd>
578 </dl><a NAME="Terminal.__searchNext" ID="Terminal.__searchNext"></a>
579 <h4>Terminal.__searchNext</h4>
580 <b>__searchNext</b>(<i></i>)
581 <p>
582 Private method to search for the next occurrence.
583 </p><a NAME="Terminal.__searchPrev" ID="Terminal.__searchPrev"></a>
584 <h4>Terminal.__searchPrev</h4>
585 <b>__searchPrev</b>(<i></i>)
586 <p>
587 Private method to search for the next occurrence.
588 </p><a NAME="Terminal.__selectHistory" ID="Terminal.__selectHistory"></a>
589 <h4>Terminal.__selectHistory</h4>
590 <b>__selectHistory</b>(<i></i>)
591 <p>
592 Private slot to select a history entry to execute.
593 </p><a NAME="Terminal.__send" ID="Terminal.__send"></a>
594 <h4>Terminal.__send</h4>
595 <b>__send</b>(<i>data</i>)
596 <p>
597 Private method to send data to the shell process.
598 </p><dl>
599 <dt><i>data</i></dt>
600 <dd>
601 data to be sent to the shell process (string)
602 </dd>
603 </dl><a NAME="Terminal.__sendCtrl" ID="Terminal.__sendCtrl"></a>
604 <h4>Terminal.__sendCtrl</h4>
605 <b>__sendCtrl</b>(<i>cmd</i>)
606 <p>
607 Private slot to send a control command to the shell process.
608 </p><dl>
609 <dt><i>the</i></dt>
610 <dd>
611 control command to be sent (integer)
612 </dd>
613 </dl><a NAME="Terminal.__setMargin0" ID="Terminal.__setMargin0"></a>
614 <h4>Terminal.__setMargin0</h4>
615 <b>__setMargin0</b>(<i></i>)
616 <p>
617 Private method to configure margin 0.
618 </p><a NAME="Terminal.__setMonospaced" ID="Terminal.__setMonospaced"></a>
619 <h4>Terminal.__setMonospaced</h4>
620 <b>__setMonospaced</b>(<i>on</i>)
621 <p>
622 Private method to set/reset a monospaced font.
623 </p><dl>
624 <dt><i>on</i></dt>
625 <dd>
626 flag to indicate usage of a monospace font (boolean)
627 </dd>
628 </dl><a NAME="Terminal.__setTextDisplay" ID="Terminal.__setTextDisplay"></a>
629 <h4>Terminal.__setTextDisplay</h4>
630 <b>__setTextDisplay</b>(<i></i>)
631 <p>
632 Private method to configure the text display.
633 </p><a NAME="Terminal.__showHistory" ID="Terminal.__showHistory"></a>
634 <h4>Terminal.__showHistory</h4>
635 <b>__showHistory</b>(<i></i>)
636 <p>
637 Private slot to show the shell history dialog.
638 </p><a NAME="Terminal.__startShell" ID="Terminal.__startShell"></a>
639 <h4>Terminal.__startShell</h4>
640 <b>__startShell</b>(<i></i>)
641 <p>
642 Private slot to start the shell process.
643 </p><a NAME="Terminal.__started" ID="Terminal.__started"></a>
644 <h4>Terminal.__started</h4>
645 <b>__started</b>(<i></i>)
646 <p>
647 Private method called, when the shell process has started.
648 </p><a NAME="Terminal.__stopShell" ID="Terminal.__stopShell"></a>
649 <h4>Terminal.__stopShell</h4>
650 <b>__stopShell</b>(<i></i>)
651 <p>
652 Private slot to stop the shell process.
653 </p><a NAME="Terminal.__useHistory" ID="Terminal.__useHistory"></a>
654 <h4>Terminal.__useHistory</h4>
655 <b>__useHistory</b>(<i></i>)
656 <p>
657 Private method to display a command from the history.
658 </p><a NAME="Terminal.__write" ID="Terminal.__write"></a>
659 <h4>Terminal.__write</h4>
660 <b>__write</b>(<i>s</i>)
661 <p>
662 Private method to display some text.
663 </p><dl>
664 <dt><i>s</i></dt>
665 <dd>
666 text to be displayed (string)
667 </dd>
668 </dl><a NAME="Terminal.clear" ID="Terminal.clear"></a>
669 <h4>Terminal.clear</h4>
670 <b>clear</b>(<i></i>)
671 <p>
672 Public slot to clear the display.
673 </p><a NAME="Terminal.closeTerminal" ID="Terminal.closeTerminal"></a>
674 <h4>Terminal.closeTerminal</h4>
675 <b>closeTerminal</b>(<i></i>)
676 <p>
677 Public method to shutdown the terminal.
678 </p><a NAME="Terminal.contextMenuEvent" ID="Terminal.contextMenuEvent"></a>
679 <h4>Terminal.contextMenuEvent</h4>
680 <b>contextMenuEvent</b>(<i>ev</i>)
681 <p>
682 Reimplemented to show our own context menu.
683 </p><dl>
684 <dt><i>ev</i></dt>
685 <dd>
686 context menu event (QContextMenuEvent)
687 </dd>
688 </dl><a NAME="Terminal.editorCommand" ID="Terminal.editorCommand"></a>
689 <h4>Terminal.editorCommand</h4>
690 <b>editorCommand</b>(<i>cmd</i>)
691 <p>
692 Public method to perform an editor command.
693 </p><dl>
694 <dt><i>cmd</i></dt>
695 <dd>
696 the scintilla command to be performed
697 </dd>
698 </dl><a NAME="Terminal.event" ID="Terminal.event"></a>
699 <h4>Terminal.event</h4>
700 <b>event</b>(<i>evt</i>)
701 <p>
702 Protected method handling events.
703 </p><dl>
704 <dt><i>evt</i></dt>
705 <dd>
706 reference to the event (QEvent)
707 </dd>
708 </dl><dl>
709 <dt>Returns:</dt>
710 <dd>
711 flag indicating, if the event was handled (boolean)
712 </dd>
713 </dl><a NAME="Terminal.focusInEvent" ID="Terminal.focusInEvent"></a>
714 <h4>Terminal.focusInEvent</h4>
715 <b>focusInEvent</b>(<i>event</i>)
716 <p>
717 Public method called when the shell receives focus.
718 </p><dl>
719 <dt><i>event</i></dt>
720 <dd>
721 the event object (QFocusEvent)
722 </dd>
723 </dl><a NAME="Terminal.focusOutEvent" ID="Terminal.focusOutEvent"></a>
724 <h4>Terminal.focusOutEvent</h4>
725 <b>focusOutEvent</b>(<i>event</i>)
726 <p>
727 Public method called when the shell loses focus.
728 </p><dl>
729 <dt><i>event</i></dt>
730 <dd>
731 the event object (QFocusEvent)
732 </dd>
733 </dl><a NAME="Terminal.gestureEvent" ID="Terminal.gestureEvent"></a>
734 <h4>Terminal.gestureEvent</h4>
735 <b>gestureEvent</b>(<i>evt</i>)
736 <p>
737 Protected method handling gesture events.
738 </p><dl>
739 <dt><i>evt</i></dt>
740 <dd>
741 reference to the gesture event (QGestureEvent
742 </dd>
743 </dl><a NAME="Terminal.getHistory" ID="Terminal.getHistory"></a>
744 <h4>Terminal.getHistory</h4>
745 <b>getHistory</b>(<i></i>)
746 <p>
747 Public method to get the history.
748 </p><dl>
749 <dt>Returns:</dt>
750 <dd>
751 reference to the history list (list of strings)
752 </dd>
753 </dl><a NAME="Terminal.handlePreferencesChanged" ID="Terminal.handlePreferencesChanged"></a>
754 <h4>Terminal.handlePreferencesChanged</h4>
755 <b>handlePreferencesChanged</b>(<i></i>)
756 <p>
757 Public slot to handle the preferencesChanged signal.
758 </p><a NAME="Terminal.insert" ID="Terminal.insert"></a>
759 <h4>Terminal.insert</h4>
760 <b>insert</b>(<i>txt</i>)
761 <p>
762 Public slot to insert text at the current cursor position.
763 </p><p>
764 The cursor is advanced to the end of the inserted text.
765 </p><dl>
766 <dt><i>txt</i></dt>
767 <dd>
768 text to be inserted (string)
769 </dd>
770 </dl><a NAME="Terminal.keyPressEvent" ID="Terminal.keyPressEvent"></a>
771 <h4>Terminal.keyPressEvent</h4>
772 <b>keyPressEvent</b>(<i>ev</i>)
773 <p>
774 Re-implemented to handle the user input a key at a time.
775 </p><dl>
776 <dt><i>ev</i></dt>
777 <dd>
778 key event (QKeyEvent)
779 </dd>
780 </dl><a NAME="Terminal.loadHistory" ID="Terminal.loadHistory"></a>
781 <h4>Terminal.loadHistory</h4>
782 <b>loadHistory</b>(<i></i>)
783 <p>
784 Public method to load the history.
785 </p><a NAME="Terminal.mousePressEvent" ID="Terminal.mousePressEvent"></a>
786 <h4>Terminal.mousePressEvent</h4>
787 <b>mousePressEvent</b>(<i>event</i>)
788 <p>
789 Protected method to handle the mouse press event.
790 </p><dl>
791 <dt><i>event</i></dt>
792 <dd>
793 the mouse press event (QMouseEvent)
794 </dd>
795 </dl><a NAME="Terminal.reloadHistory" ID="Terminal.reloadHistory"></a>
796 <h4>Terminal.reloadHistory</h4>
797 <b>reloadHistory</b>(<i></i>)
798 <p>
799 Public method to reload the history.
800 </p><a NAME="Terminal.saveHistory" ID="Terminal.saveHistory"></a>
801 <h4>Terminal.saveHistory</h4>
802 <b>saveHistory</b>(<i></i>)
803 <p>
804 Public method to save the history.
805 </p><a NAME="Terminal.searchNext" ID="Terminal.searchNext"></a>
806 <h4>Terminal.searchNext</h4>
807 <b>searchNext</b>(<i>txt, caseSensitive, wholeWord</i>)
808 <p>
809 Public method to search the next occurrence of the given text.
810 </p><dl>
811 <dt><i>txt</i></dt>
812 <dd>
813 text to search for (string)
814 </dd><dt><i>caseSensitive</i></dt>
815 <dd>
816 flag indicating to perform a case sensitive
817 search (boolean)
818 </dd><dt><i>wholeWord</i></dt>
819 <dd>
820 flag indicating to search for whole words
821 only (boolean)
822 </dd>
823 </dl><a NAME="Terminal.searchPrev" ID="Terminal.searchPrev"></a>
824 <h4>Terminal.searchPrev</h4>
825 <b>searchPrev</b>(<i>txt, caseSensitive, wholeWord</i>)
826 <p>
827 Public method to search the previous occurrence of the given text.
828 </p><dl>
829 <dt><i>txt</i></dt>
830 <dd>
831 text to search for (string)
832 </dd><dt><i>caseSensitive</i></dt>
833 <dd>
834 flag indicating to perform a case sensitive
835 search (boolean)
836 </dd><dt><i>wholeWord</i></dt>
837 <dd>
838 flag indicating to search for whole words
839 only (boolean)
840 </dd>
841 </dl><a NAME="Terminal.wheelEvent" ID="Terminal.wheelEvent"></a>
842 <h4>Terminal.wheelEvent</h4>
843 <b>wheelEvent</b>(<i>evt</i>)
844 <p>
845 Protected method to handle wheel events.
846 </p><dl>
847 <dt><i>evt</i></dt>
848 <dd>
849 reference to the wheel event (QWheelEvent)
850 </dd>
851 </dl>
852 <div align="right"><a href="#top">Up</a></div>
853 <hr /><hr />
854 <a NAME="TerminalAssembly" ID="TerminalAssembly"></a>
855 <h2>TerminalAssembly</h2>
856 <p>
857 Class implementing the containing widget for the terminal.
858 </p>
859 <h3>Derived from</h3>
860 QWidget
861 <h3>Class Attributes</h3>
862 <table>
863 <tr><td>None</td></tr>
864 </table>
865 <h3>Class Methods</h3>
866 <table>
867 <tr><td>None</td></tr>
868 </table>
869 <h3>Methods</h3>
870 <table>
871 <tr>
872 <td><a href="#TerminalAssembly.__init__">TerminalAssembly</a></td>
873 <td>Constructor</td>
874 </tr><tr>
875 <td><a href="#TerminalAssembly.showFind">showFind</a></td>
876 <td>Public method to display the search widget.</td>
877 </tr><tr>
878 <td><a href="#TerminalAssembly.terminal">terminal</a></td>
879 <td>Public method to get a reference to the terminal widget.</td>
880 </tr>
881 </table>
882 <h3>Static Methods</h3>
883 <table>
884 <tr><td>None</td></tr>
885 </table>
886 <a NAME="TerminalAssembly.__init__" ID="TerminalAssembly.__init__"></a>
887 <h4>TerminalAssembly (Constructor)</h4>
888 <b>TerminalAssembly</b>(<i>vm, parent=None</i>)
889 <p>
890 Constructor
891 </p><dl>
892 <dt><i>vm</i></dt>
893 <dd>
894 reference to the viewmanager object
895 </dd><dt><i>parent</i></dt>
896 <dd>
897 reference to the parent widget (QWidget)
898 </dd>
899 </dl><a NAME="TerminalAssembly.showFind" ID="TerminalAssembly.showFind"></a>
900 <h4>TerminalAssembly.showFind</h4>
901 <b>showFind</b>(<i>txt=""</i>)
902 <p>
903 Public method to display the search widget.
904 </p><dl>
905 <dt><i>txt</i></dt>
906 <dd>
907 text to be shown in the combo (string)
908 </dd>
909 </dl><a NAME="TerminalAssembly.terminal" ID="TerminalAssembly.terminal"></a>
910 <h4>TerminalAssembly.terminal</h4>
911 <b>terminal</b>(<i></i>)
912 <p>
913 Public method to get a reference to the terminal widget.
914 </p><dl>
915 <dt>Returns:</dt>
916 <dd>
917 reference to the terminal widget (Terminal)
918 </dd>
919 </dl>
920 <div align="right"><a href="#top">Up</a></div>
921 <hr />
922 </body></html>

eric ide

mercurial