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