|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.QScintilla.SearchReplaceWidget</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.QScintilla.SearchReplaceWidget</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing the search and replace widget. |
|
13 </p> |
|
14 <h3>Global Attributes</h3> |
|
15 |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 |
|
21 <table> |
|
22 |
|
23 <tr> |
|
24 <td><a href="#SearchReplaceSlidingWidget">SearchReplaceSlidingWidget</a></td> |
|
25 <td>Class implementing the search and replace widget with sliding behavior.</td> |
|
26 </tr> |
|
27 <tr> |
|
28 <td><a href="#SearchReplaceWidget">SearchReplaceWidget</a></td> |
|
29 <td>Class implementing the search and replace widget.</td> |
|
30 </tr> |
|
31 </table> |
|
32 <h3>Functions</h3> |
|
33 |
|
34 <table> |
|
35 <tr><td>None</td></tr> |
|
36 </table> |
|
37 <hr /> |
|
38 <hr /> |
|
39 <a NAME="SearchReplaceSlidingWidget" ID="SearchReplaceSlidingWidget"></a> |
|
40 <h2>SearchReplaceSlidingWidget</h2> |
|
41 |
|
42 <p> |
|
43 Class implementing the search and replace widget with sliding behavior. |
|
44 </p> |
|
45 <h3>Signals</h3> |
|
46 <dl> |
|
47 |
|
48 <dt>searchListChanged()</dt> |
|
49 <dd> |
|
50 emitted to indicate a change of the search list |
|
51 </dd> |
|
52 </dl> |
|
53 <h3>Derived from</h3> |
|
54 QWidget |
|
55 <h3>Class Attributes</h3> |
|
56 |
|
57 <table> |
|
58 <tr><td>None</td></tr> |
|
59 </table> |
|
60 <h3>Class Methods</h3> |
|
61 |
|
62 <table> |
|
63 <tr><td>None</td></tr> |
|
64 </table> |
|
65 <h3>Methods</h3> |
|
66 |
|
67 <table> |
|
68 |
|
69 <tr> |
|
70 <td><a href="#SearchReplaceSlidingWidget.__init__">SearchReplaceSlidingWidget</a></td> |
|
71 <td>Constructor</td> |
|
72 </tr> |
|
73 <tr> |
|
74 <td><a href="#SearchReplaceSlidingWidget.__enableScrollerButtons">__enableScrollerButtons</a></td> |
|
75 <td>Private method to set the enabled state of the scroll buttons.</td> |
|
76 </tr> |
|
77 <tr> |
|
78 <td><a href="#SearchReplaceSlidingWidget.__slide">__slide</a></td> |
|
79 <td>Private method to move the sliding widget.</td> |
|
80 </tr> |
|
81 <tr> |
|
82 <td><a href="#SearchReplaceSlidingWidget.__slideLeft">__slideLeft</a></td> |
|
83 <td>Private slot to move the widget to the left, i.e.</td> |
|
84 </tr> |
|
85 <tr> |
|
86 <td><a href="#SearchReplaceSlidingWidget.__slideRight">__slideRight</a></td> |
|
87 <td>Private slot to move the widget to the right, i.e.</td> |
|
88 </tr> |
|
89 <tr> |
|
90 <td><a href="#SearchReplaceSlidingWidget.changeEvent">changeEvent</a></td> |
|
91 <td>Protected method handling state changes.</td> |
|
92 </tr> |
|
93 <tr> |
|
94 <td><a href="#SearchReplaceSlidingWidget.findNext">findNext</a></td> |
|
95 <td>Public slot to find the next occurrence of text.</td> |
|
96 </tr> |
|
97 <tr> |
|
98 <td><a href="#SearchReplaceSlidingWidget.findPrev">findPrev</a></td> |
|
99 <td>Public slot to find the next previous of text.</td> |
|
100 </tr> |
|
101 <tr> |
|
102 <td><a href="#SearchReplaceSlidingWidget.replace">replace</a></td> |
|
103 <td>Public method to replace the current selection.</td> |
|
104 </tr> |
|
105 <tr> |
|
106 <td><a href="#SearchReplaceSlidingWidget.replaceAll">replaceAll</a></td> |
|
107 <td>Public method to replace all occurrences.</td> |
|
108 </tr> |
|
109 <tr> |
|
110 <td><a href="#SearchReplaceSlidingWidget.replaceSearch">replaceSearch</a></td> |
|
111 <td>Public method to replace the current selection and search again.</td> |
|
112 </tr> |
|
113 <tr> |
|
114 <td><a href="#SearchReplaceSlidingWidget.resizeEvent">resizeEvent</a></td> |
|
115 <td>Protected method to handle resize events.</td> |
|
116 </tr> |
|
117 <tr> |
|
118 <td><a href="#SearchReplaceSlidingWidget.selectionChanged">selectionChanged</a></td> |
|
119 <td>Public slot tracking changes of selected text.</td> |
|
120 </tr> |
|
121 <tr> |
|
122 <td><a href="#SearchReplaceSlidingWidget.show">show</a></td> |
|
123 <td>Public slot to show the widget.</td> |
|
124 </tr> |
|
125 <tr> |
|
126 <td><a href="#SearchReplaceSlidingWidget.updateSelectionCheckBox">updateSelectionCheckBox</a></td> |
|
127 <td>Public slot to update the selection check box.</td> |
|
128 </tr> |
|
129 </table> |
|
130 <h3>Static Methods</h3> |
|
131 |
|
132 <table> |
|
133 <tr><td>None</td></tr> |
|
134 </table> |
|
135 |
|
136 <a NAME="SearchReplaceSlidingWidget.__init__" ID="SearchReplaceSlidingWidget.__init__"></a> |
|
137 <h4>SearchReplaceSlidingWidget (Constructor)</h4> |
|
138 <b>SearchReplaceSlidingWidget</b>(<i>replace, vm, parent=None</i>) |
|
139 |
|
140 <p> |
|
141 Constructor |
|
142 </p> |
|
143 <dl> |
|
144 |
|
145 <dt><i>replace</i></dt> |
|
146 <dd> |
|
147 flag indicating a replace widget is called |
|
148 </dd> |
|
149 <dt><i>vm</i></dt> |
|
150 <dd> |
|
151 reference to the viewmanager object |
|
152 </dd> |
|
153 <dt><i>parent</i></dt> |
|
154 <dd> |
|
155 parent widget of this widget (QWidget) |
|
156 </dd> |
|
157 </dl> |
|
158 <a NAME="SearchReplaceSlidingWidget.__enableScrollerButtons" ID="SearchReplaceSlidingWidget.__enableScrollerButtons"></a> |
|
159 <h4>SearchReplaceSlidingWidget.__enableScrollerButtons</h4> |
|
160 <b>__enableScrollerButtons</b>(<i></i>) |
|
161 |
|
162 <p> |
|
163 Private method to set the enabled state of the scroll buttons. |
|
164 </p> |
|
165 <a NAME="SearchReplaceSlidingWidget.__slide" ID="SearchReplaceSlidingWidget.__slide"></a> |
|
166 <h4>SearchReplaceSlidingWidget.__slide</h4> |
|
167 <b>__slide</b>(<i>toLeft</i>) |
|
168 |
|
169 <p> |
|
170 Private method to move the sliding widget. |
|
171 </p> |
|
172 <dl> |
|
173 |
|
174 <dt><i>toLeft</i></dt> |
|
175 <dd> |
|
176 flag indicating to move to the left (boolean) |
|
177 </dd> |
|
178 </dl> |
|
179 <a NAME="SearchReplaceSlidingWidget.__slideLeft" ID="SearchReplaceSlidingWidget.__slideLeft"></a> |
|
180 <h4>SearchReplaceSlidingWidget.__slideLeft</h4> |
|
181 <b>__slideLeft</b>(<i></i>) |
|
182 |
|
183 <p> |
|
184 Private slot to move the widget to the left, i.e. show contents to the |
|
185 right. |
|
186 </p> |
|
187 <a NAME="SearchReplaceSlidingWidget.__slideRight" ID="SearchReplaceSlidingWidget.__slideRight"></a> |
|
188 <h4>SearchReplaceSlidingWidget.__slideRight</h4> |
|
189 <b>__slideRight</b>(<i></i>) |
|
190 |
|
191 <p> |
|
192 Private slot to move the widget to the right, i.e. show contents to |
|
193 the left. |
|
194 </p> |
|
195 <a NAME="SearchReplaceSlidingWidget.changeEvent" ID="SearchReplaceSlidingWidget.changeEvent"></a> |
|
196 <h4>SearchReplaceSlidingWidget.changeEvent</h4> |
|
197 <b>changeEvent</b>(<i>evt</i>) |
|
198 |
|
199 <p> |
|
200 Protected method handling state changes. |
|
201 </p> |
|
202 <dl> |
|
203 |
|
204 <dt><i>evt</i></dt> |
|
205 <dd> |
|
206 event containing the state change (QEvent) |
|
207 </dd> |
|
208 </dl> |
|
209 <a NAME="SearchReplaceSlidingWidget.findNext" ID="SearchReplaceSlidingWidget.findNext"></a> |
|
210 <h4>SearchReplaceSlidingWidget.findNext</h4> |
|
211 <b>findNext</b>(<i></i>) |
|
212 |
|
213 <p> |
|
214 Public slot to find the next occurrence of text. |
|
215 </p> |
|
216 <a NAME="SearchReplaceSlidingWidget.findPrev" ID="SearchReplaceSlidingWidget.findPrev"></a> |
|
217 <h4>SearchReplaceSlidingWidget.findPrev</h4> |
|
218 <b>findPrev</b>(<i></i>) |
|
219 |
|
220 <p> |
|
221 Public slot to find the next previous of text. |
|
222 </p> |
|
223 <a NAME="SearchReplaceSlidingWidget.replace" ID="SearchReplaceSlidingWidget.replace"></a> |
|
224 <h4>SearchReplaceSlidingWidget.replace</h4> |
|
225 <b>replace</b>(<i></i>) |
|
226 |
|
227 <p> |
|
228 Public method to replace the current selection. |
|
229 </p> |
|
230 <a NAME="SearchReplaceSlidingWidget.replaceAll" ID="SearchReplaceSlidingWidget.replaceAll"></a> |
|
231 <h4>SearchReplaceSlidingWidget.replaceAll</h4> |
|
232 <b>replaceAll</b>(<i></i>) |
|
233 |
|
234 <p> |
|
235 Public method to replace all occurrences. |
|
236 </p> |
|
237 <a NAME="SearchReplaceSlidingWidget.replaceSearch" ID="SearchReplaceSlidingWidget.replaceSearch"></a> |
|
238 <h4>SearchReplaceSlidingWidget.replaceSearch</h4> |
|
239 <b>replaceSearch</b>(<i></i>) |
|
240 |
|
241 <p> |
|
242 Public method to replace the current selection and search again. |
|
243 </p> |
|
244 <a NAME="SearchReplaceSlidingWidget.resizeEvent" ID="SearchReplaceSlidingWidget.resizeEvent"></a> |
|
245 <h4>SearchReplaceSlidingWidget.resizeEvent</h4> |
|
246 <b>resizeEvent</b>(<i>evt</i>) |
|
247 |
|
248 <p> |
|
249 Protected method to handle resize events. |
|
250 </p> |
|
251 <dl> |
|
252 |
|
253 <dt><i>evt</i></dt> |
|
254 <dd> |
|
255 reference to the resize event (QResizeEvent) |
|
256 </dd> |
|
257 </dl> |
|
258 <a NAME="SearchReplaceSlidingWidget.selectionChanged" ID="SearchReplaceSlidingWidget.selectionChanged"></a> |
|
259 <h4>SearchReplaceSlidingWidget.selectionChanged</h4> |
|
260 <b>selectionChanged</b>(<i>editor</i>) |
|
261 |
|
262 <p> |
|
263 Public slot tracking changes of selected text. |
|
264 </p> |
|
265 <dl> |
|
266 |
|
267 <dt><i>editor</i> (Editor)</dt> |
|
268 <dd> |
|
269 reference to the editor |
|
270 </dd> |
|
271 </dl> |
|
272 <a NAME="SearchReplaceSlidingWidget.show" ID="SearchReplaceSlidingWidget.show"></a> |
|
273 <h4>SearchReplaceSlidingWidget.show</h4> |
|
274 <b>show</b>(<i>text=''</i>) |
|
275 |
|
276 <p> |
|
277 Public slot to show the widget. |
|
278 </p> |
|
279 <dl> |
|
280 |
|
281 <dt><i>text</i></dt> |
|
282 <dd> |
|
283 text to be shown in the findtext edit (string) |
|
284 </dd> |
|
285 </dl> |
|
286 <a NAME="SearchReplaceSlidingWidget.updateSelectionCheckBox" ID="SearchReplaceSlidingWidget.updateSelectionCheckBox"></a> |
|
287 <h4>SearchReplaceSlidingWidget.updateSelectionCheckBox</h4> |
|
288 <b>updateSelectionCheckBox</b>(<i>editor</i>) |
|
289 |
|
290 <p> |
|
291 Public slot to update the selection check box. |
|
292 </p> |
|
293 <dl> |
|
294 |
|
295 <dt><i>editor</i></dt> |
|
296 <dd> |
|
297 reference to the editor (Editor) |
|
298 </dd> |
|
299 </dl> |
|
300 <div align="right"><a href="#top">Up</a></div> |
|
301 <hr /> |
|
302 <hr /> |
|
303 <a NAME="SearchReplaceWidget" ID="SearchReplaceWidget"></a> |
|
304 <h2>SearchReplaceWidget</h2> |
|
305 |
|
306 <p> |
|
307 Class implementing the search and replace widget. |
|
308 </p> |
|
309 <h3>Signals</h3> |
|
310 <dl> |
|
311 |
|
312 <dt>searchListChanged()</dt> |
|
313 <dd> |
|
314 emitted to indicate a change of the search list |
|
315 </dd> |
|
316 </dl> |
|
317 <h3>Derived from</h3> |
|
318 QWidget |
|
319 <h3>Class Attributes</h3> |
|
320 |
|
321 <table> |
|
322 <tr><td>None</td></tr> |
|
323 </table> |
|
324 <h3>Class Methods</h3> |
|
325 |
|
326 <table> |
|
327 <tr><td>None</td></tr> |
|
328 </table> |
|
329 <h3>Methods</h3> |
|
330 |
|
331 <table> |
|
332 |
|
333 <tr> |
|
334 <td><a href="#SearchReplaceWidget.__init__">SearchReplaceWidget</a></td> |
|
335 <td>Constructor</td> |
|
336 </tr> |
|
337 <tr> |
|
338 <td><a href="#SearchReplaceWidget.__doReplace">__doReplace</a></td> |
|
339 <td>Private method to replace one occurrence of text.</td> |
|
340 </tr> |
|
341 <tr> |
|
342 <td><a href="#SearchReplaceWidget.__findByReturnPressed">__findByReturnPressed</a></td> |
|
343 <td>Private slot to handle the returnPressed signal of the findtext combobox.</td> |
|
344 </tr> |
|
345 <tr> |
|
346 <td><a href="#SearchReplaceWidget.__findNextPrev">__findNextPrev</a></td> |
|
347 <td>Private method to find the next occurrence of the search text.</td> |
|
348 </tr> |
|
349 <tr> |
|
350 <td><a href="#SearchReplaceWidget.__markOccurrences">__markOccurrences</a></td> |
|
351 <td>Private method to mark all occurrences of the search text.</td> |
|
352 </tr> |
|
353 <tr> |
|
354 <td><a href="#SearchReplaceWidget.__quickSearch">__quickSearch</a></td> |
|
355 <td>Private slot to search for the entered text while typing.</td> |
|
356 </tr> |
|
357 <tr> |
|
358 <td><a href="#SearchReplaceWidget.__quickSearchMarkOccurrences">__quickSearchMarkOccurrences</a></td> |
|
359 <td>Private method to mark all occurrences of the search text.</td> |
|
360 </tr> |
|
361 <tr> |
|
362 <td><a href="#SearchReplaceWidget.__selectionBoundary">__selectionBoundary</a></td> |
|
363 <td>Private method to calculate the current selection boundary.</td> |
|
364 </tr> |
|
365 <tr> |
|
366 <td><a href="#SearchReplaceWidget.__setFindNextEnabled">__setFindNextEnabled</a></td> |
|
367 <td>Private method to set the enabled state of "Find Next".</td> |
|
368 </tr> |
|
369 <tr> |
|
370 <td><a href="#SearchReplaceWidget.__setFindPrevEnabled">__setFindPrevEnabled</a></td> |
|
371 <td>Private method to set the enabled state of "Find Prev".</td> |
|
372 </tr> |
|
373 <tr> |
|
374 <td><a href="#SearchReplaceWidget.__setReplaceAllEnabled">__setReplaceAllEnabled</a></td> |
|
375 <td>Private method to set the enabled state of "Replace All".</td> |
|
376 </tr> |
|
377 <tr> |
|
378 <td><a href="#SearchReplaceWidget.__setReplaceAndSearchEnabled">__setReplaceAndSearchEnabled</a></td> |
|
379 <td>Private method to set the enabled state of "Replace And Search".</td> |
|
380 </tr> |
|
381 <tr> |
|
382 <td><a href="#SearchReplaceWidget.__setReplaceSelectionEnabled">__setReplaceSelectionEnabled</a></td> |
|
383 <td>Private method to set the enabled state of "Replace Occurrence".</td> |
|
384 </tr> |
|
385 <tr> |
|
386 <td><a href="#SearchReplaceWidget.__setSearchEditColors">__setSearchEditColors</a></td> |
|
387 <td>Private method to set the search edit colors.</td> |
|
388 </tr> |
|
389 <tr> |
|
390 <td><a href="#SearchReplaceWidget.__setShortcuts">__setShortcuts</a></td> |
|
391 <td>Private method to set the local action's shortcuts to the same key sequences as in the view manager.</td> |
|
392 </tr> |
|
393 <tr> |
|
394 <td><a href="#SearchReplaceWidget.__showFind">__showFind</a></td> |
|
395 <td>Private method to display this widget in find mode.</td> |
|
396 </tr> |
|
397 <tr> |
|
398 <td><a href="#SearchReplaceWidget.__showReplace">__showReplace</a></td> |
|
399 <td>Private slot to display this widget in replace mode.</td> |
|
400 </tr> |
|
401 <tr> |
|
402 <td><a href="#SearchReplaceWidget.__updateQuickSearchMarkers">__updateQuickSearchMarkers</a></td> |
|
403 <td>Private slot to handle the selection of the various check boxes.</td> |
|
404 </tr> |
|
405 <tr> |
|
406 <td><a href="#SearchReplaceWidget.changeEvent">changeEvent</a></td> |
|
407 <td>Protected method handling state changes.</td> |
|
408 </tr> |
|
409 <tr> |
|
410 <td><a href="#SearchReplaceWidget.findNext">findNext</a></td> |
|
411 <td>Public slot to find the next occurrence of text.</td> |
|
412 </tr> |
|
413 <tr> |
|
414 <td><a href="#SearchReplaceWidget.findPrev">findPrev</a></td> |
|
415 <td>Public slot to find the next previous of text.</td> |
|
416 </tr> |
|
417 <tr> |
|
418 <td><a href="#SearchReplaceWidget.keyPressEvent">keyPressEvent</a></td> |
|
419 <td>Protected slot to handle key press events.</td> |
|
420 </tr> |
|
421 <tr> |
|
422 <td><a href="#SearchReplaceWidget.on_closeButton_clicked">on_closeButton_clicked</a></td> |
|
423 <td>Private slot to close the widget.</td> |
|
424 </tr> |
|
425 <tr> |
|
426 <td><a href="#SearchReplaceWidget.on_extendButton_clicked">on_extendButton_clicked</a></td> |
|
427 <td>Private slot to handle the quicksearch extend action.</td> |
|
428 </tr> |
|
429 <tr> |
|
430 <td><a href="#SearchReplaceWidget.on_findNextButton_clicked">on_findNextButton_clicked</a></td> |
|
431 <td>Private slot to find the next occurrence of text.</td> |
|
432 </tr> |
|
433 <tr> |
|
434 <td><a href="#SearchReplaceWidget.on_findPrevButton_clicked">on_findPrevButton_clicked</a></td> |
|
435 <td>Private slot to find the previous occurrence of text.</td> |
|
436 </tr> |
|
437 <tr> |
|
438 <td><a href="#SearchReplaceWidget.on_findtextCombo_editTextChanged">on_findtextCombo_editTextChanged</a></td> |
|
439 <td>Private slot to enable/disable the find buttons.</td> |
|
440 </tr> |
|
441 <tr> |
|
442 <td><a href="#SearchReplaceWidget.on_replaceAllButton_clicked">on_replaceAllButton_clicked</a></td> |
|
443 <td>Private slot to replace all occurrences of text.</td> |
|
444 </tr> |
|
445 <tr> |
|
446 <td><a href="#SearchReplaceWidget.on_replaceButton_clicked">on_replaceButton_clicked</a></td> |
|
447 <td>Private slot to replace one occurrence of text.</td> |
|
448 </tr> |
|
449 <tr> |
|
450 <td><a href="#SearchReplaceWidget.on_replaceSearchButton_clicked">on_replaceSearchButton_clicked</a></td> |
|
451 <td>Private slot to replace one occurrence of text and search for the next one.</td> |
|
452 </tr> |
|
453 <tr> |
|
454 <td><a href="#SearchReplaceWidget.replace">replace</a></td> |
|
455 <td>Public method to replace the current selection.</td> |
|
456 </tr> |
|
457 <tr> |
|
458 <td><a href="#SearchReplaceWidget.replaceAll">replaceAll</a></td> |
|
459 <td>Public method to replace all occurrences.</td> |
|
460 </tr> |
|
461 <tr> |
|
462 <td><a href="#SearchReplaceWidget.replaceSearch">replaceSearch</a></td> |
|
463 <td>Public method to replace the current selection and search again.</td> |
|
464 </tr> |
|
465 <tr> |
|
466 <td><a href="#SearchReplaceWidget.selectionChanged">selectionChanged</a></td> |
|
467 <td>Public slot tracking changes of selected text.</td> |
|
468 </tr> |
|
469 <tr> |
|
470 <td><a href="#SearchReplaceWidget.show">show</a></td> |
|
471 <td>Public slot to show the widget.</td> |
|
472 </tr> |
|
473 <tr> |
|
474 <td><a href="#SearchReplaceWidget.updateSelectionCheckBox">updateSelectionCheckBox</a></td> |
|
475 <td>Public slot to update the selection check box.</td> |
|
476 </tr> |
|
477 </table> |
|
478 <h3>Static Methods</h3> |
|
479 |
|
480 <table> |
|
481 <tr><td>None</td></tr> |
|
482 </table> |
|
483 |
|
484 <a NAME="SearchReplaceWidget.__init__" ID="SearchReplaceWidget.__init__"></a> |
|
485 <h4>SearchReplaceWidget (Constructor)</h4> |
|
486 <b>SearchReplaceWidget</b>(<i>replace, vm, parent=None, sliding=False</i>) |
|
487 |
|
488 <p> |
|
489 Constructor |
|
490 </p> |
|
491 <dl> |
|
492 |
|
493 <dt><i>replace</i></dt> |
|
494 <dd> |
|
495 flag indicating a replace widget is called |
|
496 </dd> |
|
497 <dt><i>vm</i></dt> |
|
498 <dd> |
|
499 reference to the viewmanager object |
|
500 </dd> |
|
501 <dt><i>parent</i></dt> |
|
502 <dd> |
|
503 parent widget of this widget (QWidget) |
|
504 </dd> |
|
505 <dt><i>sliding</i></dt> |
|
506 <dd> |
|
507 flag indicating the widget is embedded in the |
|
508 sliding widget (boolean) |
|
509 </dd> |
|
510 </dl> |
|
511 <a NAME="SearchReplaceWidget.__doReplace" ID="SearchReplaceWidget.__doReplace"></a> |
|
512 <h4>SearchReplaceWidget.__doReplace</h4> |
|
513 <b>__doReplace</b>(<i>searchNext</i>) |
|
514 |
|
515 <p> |
|
516 Private method to replace one occurrence of text. |
|
517 </p> |
|
518 <dl> |
|
519 |
|
520 <dt><i>searchNext</i></dt> |
|
521 <dd> |
|
522 flag indicating to search for the next occurrence |
|
523 (boolean). |
|
524 </dd> |
|
525 </dl> |
|
526 <a NAME="SearchReplaceWidget.__findByReturnPressed" ID="SearchReplaceWidget.__findByReturnPressed"></a> |
|
527 <h4>SearchReplaceWidget.__findByReturnPressed</h4> |
|
528 <b>__findByReturnPressed</b>(<i></i>) |
|
529 |
|
530 <p> |
|
531 Private slot to handle the returnPressed signal of the findtext |
|
532 combobox. |
|
533 </p> |
|
534 <a NAME="SearchReplaceWidget.__findNextPrev" ID="SearchReplaceWidget.__findNextPrev"></a> |
|
535 <h4>SearchReplaceWidget.__findNextPrev</h4> |
|
536 <b>__findNextPrev</b>(<i>txt, backwards</i>) |
|
537 |
|
538 <p> |
|
539 Private method to find the next occurrence of the search text. |
|
540 </p> |
|
541 <dl> |
|
542 |
|
543 <dt><i>txt</i></dt> |
|
544 <dd> |
|
545 text to search for (string) |
|
546 </dd> |
|
547 <dt><i>backwards</i></dt> |
|
548 <dd> |
|
549 flag indicating a backwards search (boolean) |
|
550 </dd> |
|
551 </dl> |
|
552 <dl> |
|
553 <dt>Return:</dt> |
|
554 <dd> |
|
555 flag indicating success (boolean) |
|
556 </dd> |
|
557 </dl> |
|
558 <a NAME="SearchReplaceWidget.__markOccurrences" ID="SearchReplaceWidget.__markOccurrences"></a> |
|
559 <h4>SearchReplaceWidget.__markOccurrences</h4> |
|
560 <b>__markOccurrences</b>(<i>txt</i>) |
|
561 |
|
562 <p> |
|
563 Private method to mark all occurrences of the search text. |
|
564 </p> |
|
565 <dl> |
|
566 |
|
567 <dt><i>txt</i></dt> |
|
568 <dd> |
|
569 text to search for (string) |
|
570 </dd> |
|
571 </dl> |
|
572 <a NAME="SearchReplaceWidget.__quickSearch" ID="SearchReplaceWidget.__quickSearch"></a> |
|
573 <h4>SearchReplaceWidget.__quickSearch</h4> |
|
574 <b>__quickSearch</b>(<i>txt</i>) |
|
575 |
|
576 <p> |
|
577 Private slot to search for the entered text while typing. |
|
578 </p> |
|
579 <dl> |
|
580 |
|
581 <dt><i>txt</i> (str)</dt> |
|
582 <dd> |
|
583 text of the search edit |
|
584 </dd> |
|
585 </dl> |
|
586 <a NAME="SearchReplaceWidget.__quickSearchMarkOccurrences" ID="SearchReplaceWidget.__quickSearchMarkOccurrences"></a> |
|
587 <h4>SearchReplaceWidget.__quickSearchMarkOccurrences</h4> |
|
588 <b>__quickSearchMarkOccurrences</b>(<i>txt</i>) |
|
589 |
|
590 <p> |
|
591 Private method to mark all occurrences of the search text. |
|
592 </p> |
|
593 <dl> |
|
594 |
|
595 <dt><i>txt</i></dt> |
|
596 <dd> |
|
597 text to search for (string) |
|
598 </dd> |
|
599 </dl> |
|
600 <a NAME="SearchReplaceWidget.__selectionBoundary" ID="SearchReplaceWidget.__selectionBoundary"></a> |
|
601 <h4>SearchReplaceWidget.__selectionBoundary</h4> |
|
602 <b>__selectionBoundary</b>(<i>selections=None</i>) |
|
603 |
|
604 <p> |
|
605 Private method to calculate the current selection boundary. |
|
606 </p> |
|
607 <dl> |
|
608 |
|
609 <dt><i>selections</i></dt> |
|
610 <dd> |
|
611 optional parameter giving the selections to |
|
612 calculate the boundary for (list of tuples of four integer) |
|
613 </dd> |
|
614 </dl> |
|
615 <dl> |
|
616 <dt>Return:</dt> |
|
617 <dd> |
|
618 tuple of start line and index and end line and index |
|
619 (tuple of four integer) |
|
620 </dd> |
|
621 </dl> |
|
622 <a NAME="SearchReplaceWidget.__setFindNextEnabled" ID="SearchReplaceWidget.__setFindNextEnabled"></a> |
|
623 <h4>SearchReplaceWidget.__setFindNextEnabled</h4> |
|
624 <b>__setFindNextEnabled</b>(<i>enable</i>) |
|
625 |
|
626 <p> |
|
627 Private method to set the enabled state of "Find Next". |
|
628 </p> |
|
629 <dl> |
|
630 |
|
631 <dt><i>enable</i> (bool)</dt> |
|
632 <dd> |
|
633 flag indicating the enable state to be set |
|
634 </dd> |
|
635 </dl> |
|
636 <a NAME="SearchReplaceWidget.__setFindPrevEnabled" ID="SearchReplaceWidget.__setFindPrevEnabled"></a> |
|
637 <h4>SearchReplaceWidget.__setFindPrevEnabled</h4> |
|
638 <b>__setFindPrevEnabled</b>(<i>enable</i>) |
|
639 |
|
640 <p> |
|
641 Private method to set the enabled state of "Find Prev". |
|
642 </p> |
|
643 <dl> |
|
644 |
|
645 <dt><i>enable</i> (bool)</dt> |
|
646 <dd> |
|
647 flag indicating the enable state to be set |
|
648 </dd> |
|
649 </dl> |
|
650 <a NAME="SearchReplaceWidget.__setReplaceAllEnabled" ID="SearchReplaceWidget.__setReplaceAllEnabled"></a> |
|
651 <h4>SearchReplaceWidget.__setReplaceAllEnabled</h4> |
|
652 <b>__setReplaceAllEnabled</b>(<i>enable</i>) |
|
653 |
|
654 <p> |
|
655 Private method to set the enabled state of "Replace All". |
|
656 </p> |
|
657 <dl> |
|
658 |
|
659 <dt><i>enable</i> (bool)</dt> |
|
660 <dd> |
|
661 flag indicating the enable state to be set |
|
662 </dd> |
|
663 </dl> |
|
664 <a NAME="SearchReplaceWidget.__setReplaceAndSearchEnabled" ID="SearchReplaceWidget.__setReplaceAndSearchEnabled"></a> |
|
665 <h4>SearchReplaceWidget.__setReplaceAndSearchEnabled</h4> |
|
666 <b>__setReplaceAndSearchEnabled</b>(<i>enable</i>) |
|
667 |
|
668 <p> |
|
669 Private method to set the enabled state of "Replace And Search". |
|
670 </p> |
|
671 <dl> |
|
672 |
|
673 <dt><i>enable</i> (bool)</dt> |
|
674 <dd> |
|
675 flag indicating the enable state to be set |
|
676 </dd> |
|
677 </dl> |
|
678 <a NAME="SearchReplaceWidget.__setReplaceSelectionEnabled" ID="SearchReplaceWidget.__setReplaceSelectionEnabled"></a> |
|
679 <h4>SearchReplaceWidget.__setReplaceSelectionEnabled</h4> |
|
680 <b>__setReplaceSelectionEnabled</b>(<i>enable</i>) |
|
681 |
|
682 <p> |
|
683 Private method to set the enabled state of "Replace Occurrence". |
|
684 </p> |
|
685 <dl> |
|
686 |
|
687 <dt><i>enable</i> (bool)</dt> |
|
688 <dd> |
|
689 flag indicating the enable state to be set |
|
690 </dd> |
|
691 </dl> |
|
692 <a NAME="SearchReplaceWidget.__setSearchEditColors" ID="SearchReplaceWidget.__setSearchEditColors"></a> |
|
693 <h4>SearchReplaceWidget.__setSearchEditColors</h4> |
|
694 <b>__setSearchEditColors</b>(<i>ok</i>) |
|
695 |
|
696 <p> |
|
697 Private method to set the search edit colors. |
|
698 </p> |
|
699 <dl> |
|
700 |
|
701 <dt><i>ok</i> (bool)</dt> |
|
702 <dd> |
|
703 flag indicating a match |
|
704 </dd> |
|
705 </dl> |
|
706 <a NAME="SearchReplaceWidget.__setShortcuts" ID="SearchReplaceWidget.__setShortcuts"></a> |
|
707 <h4>SearchReplaceWidget.__setShortcuts</h4> |
|
708 <b>__setShortcuts</b>(<i></i>) |
|
709 |
|
710 <p> |
|
711 Private method to set the local action's shortcuts to the same key |
|
712 sequences as in the view manager. |
|
713 </p> |
|
714 <a NAME="SearchReplaceWidget.__showFind" ID="SearchReplaceWidget.__showFind"></a> |
|
715 <h4>SearchReplaceWidget.__showFind</h4> |
|
716 <b>__showFind</b>(<i>text=''</i>) |
|
717 |
|
718 <p> |
|
719 Private method to display this widget in find mode. |
|
720 </p> |
|
721 <dl> |
|
722 |
|
723 <dt><i>text</i></dt> |
|
724 <dd> |
|
725 text to be shown in the findtext edit (string) |
|
726 </dd> |
|
727 </dl> |
|
728 <a NAME="SearchReplaceWidget.__showReplace" ID="SearchReplaceWidget.__showReplace"></a> |
|
729 <h4>SearchReplaceWidget.__showReplace</h4> |
|
730 <b>__showReplace</b>(<i>text=''</i>) |
|
731 |
|
732 <p> |
|
733 Private slot to display this widget in replace mode. |
|
734 </p> |
|
735 <dl> |
|
736 |
|
737 <dt><i>text</i></dt> |
|
738 <dd> |
|
739 text to be shown in the findtext edit |
|
740 </dd> |
|
741 </dl> |
|
742 <a NAME="SearchReplaceWidget.__updateQuickSearchMarkers" ID="SearchReplaceWidget.__updateQuickSearchMarkers"></a> |
|
743 <h4>SearchReplaceWidget.__updateQuickSearchMarkers</h4> |
|
744 <b>__updateQuickSearchMarkers</b>(<i>on</i>) |
|
745 |
|
746 <p> |
|
747 Private slot to handle the selection of the various check boxes. |
|
748 </p> |
|
749 <dl> |
|
750 |
|
751 <dt><i>on</i> (bool)</dt> |
|
752 <dd> |
|
753 status of the check box (ignored) |
|
754 </dd> |
|
755 </dl> |
|
756 <a NAME="SearchReplaceWidget.changeEvent" ID="SearchReplaceWidget.changeEvent"></a> |
|
757 <h4>SearchReplaceWidget.changeEvent</h4> |
|
758 <b>changeEvent</b>(<i>evt</i>) |
|
759 |
|
760 <p> |
|
761 Protected method handling state changes. |
|
762 </p> |
|
763 <dl> |
|
764 |
|
765 <dt><i>evt</i></dt> |
|
766 <dd> |
|
767 event containing the state change (QEvent) |
|
768 </dd> |
|
769 </dl> |
|
770 <a NAME="SearchReplaceWidget.findNext" ID="SearchReplaceWidget.findNext"></a> |
|
771 <h4>SearchReplaceWidget.findNext</h4> |
|
772 <b>findNext</b>(<i></i>) |
|
773 |
|
774 <p> |
|
775 Public slot to find the next occurrence of text. |
|
776 </p> |
|
777 <a NAME="SearchReplaceWidget.findPrev" ID="SearchReplaceWidget.findPrev"></a> |
|
778 <h4>SearchReplaceWidget.findPrev</h4> |
|
779 <b>findPrev</b>(<i></i>) |
|
780 |
|
781 <p> |
|
782 Public slot to find the next previous of text. |
|
783 </p> |
|
784 <a NAME="SearchReplaceWidget.keyPressEvent" ID="SearchReplaceWidget.keyPressEvent"></a> |
|
785 <h4>SearchReplaceWidget.keyPressEvent</h4> |
|
786 <b>keyPressEvent</b>(<i>event</i>) |
|
787 |
|
788 <p> |
|
789 Protected slot to handle key press events. |
|
790 </p> |
|
791 <dl> |
|
792 |
|
793 <dt><i>event</i></dt> |
|
794 <dd> |
|
795 reference to the key press event (QKeyEvent) |
|
796 </dd> |
|
797 </dl> |
|
798 <a NAME="SearchReplaceWidget.on_closeButton_clicked" ID="SearchReplaceWidget.on_closeButton_clicked"></a> |
|
799 <h4>SearchReplaceWidget.on_closeButton_clicked</h4> |
|
800 <b>on_closeButton_clicked</b>(<i></i>) |
|
801 |
|
802 <p> |
|
803 Private slot to close the widget. |
|
804 </p> |
|
805 <a NAME="SearchReplaceWidget.on_extendButton_clicked" ID="SearchReplaceWidget.on_extendButton_clicked"></a> |
|
806 <h4>SearchReplaceWidget.on_extendButton_clicked</h4> |
|
807 <b>on_extendButton_clicked</b>(<i></i>) |
|
808 |
|
809 <p> |
|
810 Private slot to handle the quicksearch extend action. |
|
811 </p> |
|
812 <a NAME="SearchReplaceWidget.on_findNextButton_clicked" ID="SearchReplaceWidget.on_findNextButton_clicked"></a> |
|
813 <h4>SearchReplaceWidget.on_findNextButton_clicked</h4> |
|
814 <b>on_findNextButton_clicked</b>(<i></i>) |
|
815 |
|
816 <p> |
|
817 Private slot to find the next occurrence of text. |
|
818 </p> |
|
819 <a NAME="SearchReplaceWidget.on_findPrevButton_clicked" ID="SearchReplaceWidget.on_findPrevButton_clicked"></a> |
|
820 <h4>SearchReplaceWidget.on_findPrevButton_clicked</h4> |
|
821 <b>on_findPrevButton_clicked</b>(<i></i>) |
|
822 |
|
823 <p> |
|
824 Private slot to find the previous occurrence of text. |
|
825 </p> |
|
826 <a NAME="SearchReplaceWidget.on_findtextCombo_editTextChanged" ID="SearchReplaceWidget.on_findtextCombo_editTextChanged"></a> |
|
827 <h4>SearchReplaceWidget.on_findtextCombo_editTextChanged</h4> |
|
828 <b>on_findtextCombo_editTextChanged</b>(<i>txt</i>) |
|
829 |
|
830 <p> |
|
831 Private slot to enable/disable the find buttons. |
|
832 </p> |
|
833 <dl> |
|
834 |
|
835 <dt><i>txt</i> (str)</dt> |
|
836 <dd> |
|
837 text of the find text combo |
|
838 </dd> |
|
839 </dl> |
|
840 <a NAME="SearchReplaceWidget.on_replaceAllButton_clicked" ID="SearchReplaceWidget.on_replaceAllButton_clicked"></a> |
|
841 <h4>SearchReplaceWidget.on_replaceAllButton_clicked</h4> |
|
842 <b>on_replaceAllButton_clicked</b>(<i></i>) |
|
843 |
|
844 <p> |
|
845 Private slot to replace all occurrences of text. |
|
846 </p> |
|
847 <a NAME="SearchReplaceWidget.on_replaceButton_clicked" ID="SearchReplaceWidget.on_replaceButton_clicked"></a> |
|
848 <h4>SearchReplaceWidget.on_replaceButton_clicked</h4> |
|
849 <b>on_replaceButton_clicked</b>(<i></i>) |
|
850 |
|
851 <p> |
|
852 Private slot to replace one occurrence of text. |
|
853 </p> |
|
854 <a NAME="SearchReplaceWidget.on_replaceSearchButton_clicked" ID="SearchReplaceWidget.on_replaceSearchButton_clicked"></a> |
|
855 <h4>SearchReplaceWidget.on_replaceSearchButton_clicked</h4> |
|
856 <b>on_replaceSearchButton_clicked</b>(<i></i>) |
|
857 |
|
858 <p> |
|
859 Private slot to replace one occurrence of text and search for the next |
|
860 one. |
|
861 </p> |
|
862 <a NAME="SearchReplaceWidget.replace" ID="SearchReplaceWidget.replace"></a> |
|
863 <h4>SearchReplaceWidget.replace</h4> |
|
864 <b>replace</b>(<i></i>) |
|
865 |
|
866 <p> |
|
867 Public method to replace the current selection. |
|
868 </p> |
|
869 <a NAME="SearchReplaceWidget.replaceAll" ID="SearchReplaceWidget.replaceAll"></a> |
|
870 <h4>SearchReplaceWidget.replaceAll</h4> |
|
871 <b>replaceAll</b>(<i></i>) |
|
872 |
|
873 <p> |
|
874 Public method to replace all occurrences. |
|
875 </p> |
|
876 <a NAME="SearchReplaceWidget.replaceSearch" ID="SearchReplaceWidget.replaceSearch"></a> |
|
877 <h4>SearchReplaceWidget.replaceSearch</h4> |
|
878 <b>replaceSearch</b>(<i></i>) |
|
879 |
|
880 <p> |
|
881 Public method to replace the current selection and search again. |
|
882 </p> |
|
883 <a NAME="SearchReplaceWidget.selectionChanged" ID="SearchReplaceWidget.selectionChanged"></a> |
|
884 <h4>SearchReplaceWidget.selectionChanged</h4> |
|
885 <b>selectionChanged</b>(<i>editor</i>) |
|
886 |
|
887 <p> |
|
888 Public slot tracking changes of selected text. |
|
889 </p> |
|
890 <dl> |
|
891 |
|
892 <dt><i>editor</i> (Editor)</dt> |
|
893 <dd> |
|
894 reference to the editor |
|
895 </dd> |
|
896 </dl> |
|
897 <a NAME="SearchReplaceWidget.show" ID="SearchReplaceWidget.show"></a> |
|
898 <h4>SearchReplaceWidget.show</h4> |
|
899 <b>show</b>(<i>text=''</i>) |
|
900 |
|
901 <p> |
|
902 Public slot to show the widget. |
|
903 </p> |
|
904 <dl> |
|
905 |
|
906 <dt><i>text</i></dt> |
|
907 <dd> |
|
908 text to be shown in the findtext edit (string) |
|
909 </dd> |
|
910 </dl> |
|
911 <a NAME="SearchReplaceWidget.updateSelectionCheckBox" ID="SearchReplaceWidget.updateSelectionCheckBox"></a> |
|
912 <h4>SearchReplaceWidget.updateSelectionCheckBox</h4> |
|
913 <b>updateSelectionCheckBox</b>(<i>editor</i>) |
|
914 |
|
915 <p> |
|
916 Public slot to update the selection check box. |
|
917 </p> |
|
918 <dl> |
|
919 |
|
920 <dt><i>editor</i> (Editor)</dt> |
|
921 <dd> |
|
922 reference to the editor |
|
923 </dd> |
|
924 </dl> |
|
925 <div align="right"><a href="#top">Up</a></div> |
|
926 <hr /> |
|
927 </body></html> |