|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' |
|
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> |
|
4 <html><head> |
|
5 <title>eric4.QScintilla.SearchReplaceWidget</title> |
|
6 <style> |
|
7 body { |
|
8 background:white; |
|
9 margin: 0em 1em 10em 1em; |
|
10 color: black; |
|
11 } |
|
12 |
|
13 h1 { color: white; background: #4FA4FF; } |
|
14 h2 { color: white; background: #4FA4FF; } |
|
15 h3 { color: white; background: #00557F; } |
|
16 h4 { color: white; background: #00557F; } |
|
17 |
|
18 a { color: #AA5500; } |
|
19 |
|
20 </style> |
|
21 </head> |
|
22 <body><a NAME="top" ID="top"></a> |
|
23 <h1>eric4.QScintilla.SearchReplaceWidget</h1> |
|
24 <p> |
|
25 Module implementing the search and replace widget. |
|
26 </p> |
|
27 <h3>Global Attributes</h3> |
|
28 <table> |
|
29 <tr><td>None</td></tr> |
|
30 </table> |
|
31 <h3>Classes</h3> |
|
32 <table> |
|
33 <tr> |
|
34 <td><a href="#SearchReplaceWidget">SearchReplaceWidget</a></td> |
|
35 <td>Class implementing the search and replace widget.</td> |
|
36 </tr> |
|
37 </table> |
|
38 <h3>Functions</h3> |
|
39 <table> |
|
40 <tr><td>None</td></tr> |
|
41 </table> |
|
42 <hr /><hr /> |
|
43 <a NAME="SearchReplaceWidget" ID="SearchReplaceWidget"></a> |
|
44 <h2>SearchReplaceWidget</h2> |
|
45 <p> |
|
46 Class implementing the search and replace widget. |
|
47 </p><h4>Signals</h4> |
|
48 <dl> |
|
49 <dt>searchListChanged</dt> |
|
50 <dd> |
|
51 emitted to indicate a change of the search list |
|
52 </dd> |
|
53 </dl> |
|
54 <h3>Derived from</h3> |
|
55 QWidget |
|
56 <h3>Class Attributes</h3> |
|
57 <table> |
|
58 <tr><td>None</td></tr> |
|
59 </table> |
|
60 <h3>Methods</h3> |
|
61 <table> |
|
62 <tr> |
|
63 <td><a href="#SearchReplaceWidget.__init__">SearchReplaceWidget</a></td> |
|
64 <td>Constructor</td> |
|
65 </tr><tr> |
|
66 <td><a href="#SearchReplaceWidget.__findByReturnPressed">__findByReturnPressed</a></td> |
|
67 <td>Private slot to handle the returnPressed signal of the findtext combobox.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#SearchReplaceWidget.__findNextPrev">__findNextPrev</a></td> |
|
70 <td>Private method to find the next occurrence of the search text.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#SearchReplaceWidget.__markOccurrences">__markOccurrences</a></td> |
|
73 <td>Private method to mark all occurrences of the search text.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#SearchReplaceWidget.__showFind">__showFind</a></td> |
|
76 <td>Private method to display this widget in find mode.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#SearchReplaceWidget.__showReplace">__showReplace</a></td> |
|
79 <td>Private slot to display this widget in replace mode.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#SearchReplaceWidget.findNext">findNext</a></td> |
|
82 <td>Public slot to find the next occurrence of text.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#SearchReplaceWidget.findPrev">findPrev</a></td> |
|
85 <td>Public slot to find the next previous of text.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#SearchReplaceWidget.keyPressEvent">keyPressEvent</a></td> |
|
88 <td>Protected slot to handle key press events.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#SearchReplaceWidget.on_closeButton_clicked">on_closeButton_clicked</a></td> |
|
91 <td>Private slot to close the widget.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#SearchReplaceWidget.on_findNextButton_clicked">on_findNextButton_clicked</a></td> |
|
94 <td>Private slot to find the next occurrence of text.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#SearchReplaceWidget.on_findPrevButton_clicked">on_findPrevButton_clicked</a></td> |
|
97 <td>Private slot to find the previous occurrence of text.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#SearchReplaceWidget.on_findtextCombo_editTextChanged">on_findtextCombo_editTextChanged</a></td> |
|
100 <td>Private slot to enable/disable the find buttons.</td> |
|
101 </tr><tr> |
|
102 <td><a href="#SearchReplaceWidget.on_replaceAllButton_clicked">on_replaceAllButton_clicked</a></td> |
|
103 <td>Private slot to replace all occurrences of text.</td> |
|
104 </tr><tr> |
|
105 <td><a href="#SearchReplaceWidget.on_replaceButton_clicked">on_replaceButton_clicked</a></td> |
|
106 <td>Private slot to replace one occurrence of text.</td> |
|
107 </tr><tr> |
|
108 <td><a href="#SearchReplaceWidget.selectionChanged">selectionChanged</a></td> |
|
109 <td>Public slot tracking changes of selected text.</td> |
|
110 </tr><tr> |
|
111 <td><a href="#SearchReplaceWidget.show">show</a></td> |
|
112 <td>Overridden slot from QWidget.</td> |
|
113 </tr><tr> |
|
114 <td><a href="#SearchReplaceWidget.updateSelectionCheckBox">updateSelectionCheckBox</a></td> |
|
115 <td>Public slot to update the selection check box.</td> |
|
116 </tr> |
|
117 </table> |
|
118 <a NAME="SearchReplaceWidget.__init__" ID="SearchReplaceWidget.__init__"></a> |
|
119 <h4>SearchReplaceWidget (Constructor)</h4> |
|
120 <b>SearchReplaceWidget</b>(<i>replace, vm, parent = None</i>) |
|
121 <p> |
|
122 Constructor |
|
123 </p><dl> |
|
124 <dt><i>replace</i></dt> |
|
125 <dd> |
|
126 flag indicating a replace widget is called |
|
127 </dd><dt><i>vm</i></dt> |
|
128 <dd> |
|
129 reference to the viewmanager object |
|
130 </dd><dt><i>parent</i></dt> |
|
131 <dd> |
|
132 parent widget of this widget (QWidget) |
|
133 </dd> |
|
134 </dl><a NAME="SearchReplaceWidget.__findByReturnPressed" ID="SearchReplaceWidget.__findByReturnPressed"></a> |
|
135 <h4>SearchReplaceWidget.__findByReturnPressed</h4> |
|
136 <b>__findByReturnPressed</b>(<i></i>) |
|
137 <p> |
|
138 Private slot to handle the returnPressed signal of the findtext combobox. |
|
139 </p><a NAME="SearchReplaceWidget.__findNextPrev" ID="SearchReplaceWidget.__findNextPrev"></a> |
|
140 <h4>SearchReplaceWidget.__findNextPrev</h4> |
|
141 <b>__findNextPrev</b>(<i>txt, backwards</i>) |
|
142 <p> |
|
143 Private method to find the next occurrence of the search text. |
|
144 </p><dl> |
|
145 <dt><i>txt</i></dt> |
|
146 <dd> |
|
147 text to search for (string) |
|
148 </dd><dt><i>backwards</i></dt> |
|
149 <dd> |
|
150 flag indicating a backwards search (boolean) |
|
151 </dd> |
|
152 </dl><dl> |
|
153 <dt>Returns:</dt> |
|
154 <dd> |
|
155 flag indicating success (boolean) |
|
156 </dd> |
|
157 </dl><a NAME="SearchReplaceWidget.__markOccurrences" ID="SearchReplaceWidget.__markOccurrences"></a> |
|
158 <h4>SearchReplaceWidget.__markOccurrences</h4> |
|
159 <b>__markOccurrences</b>(<i>txt</i>) |
|
160 <p> |
|
161 Private method to mark all occurrences of the search text. |
|
162 </p><dl> |
|
163 <dt><i>txt</i></dt> |
|
164 <dd> |
|
165 text to search for (string) |
|
166 </dd> |
|
167 </dl><a NAME="SearchReplaceWidget.__showFind" ID="SearchReplaceWidget.__showFind"></a> |
|
168 <h4>SearchReplaceWidget.__showFind</h4> |
|
169 <b>__showFind</b>(<i>text = ''</i>) |
|
170 <p> |
|
171 Private method to display this widget in find mode. |
|
172 </p><dl> |
|
173 <dt><i>text</i></dt> |
|
174 <dd> |
|
175 text to be shown in the findtext edit (string) |
|
176 </dd> |
|
177 </dl><a NAME="SearchReplaceWidget.__showReplace" ID="SearchReplaceWidget.__showReplace"></a> |
|
178 <h4>SearchReplaceWidget.__showReplace</h4> |
|
179 <b>__showReplace</b>(<i>text=''</i>) |
|
180 <p> |
|
181 Private slot to display this widget in replace mode. |
|
182 </p><dl> |
|
183 <dt><i>text</i></dt> |
|
184 <dd> |
|
185 text to be shown in the findtext edit |
|
186 </dd> |
|
187 </dl><a NAME="SearchReplaceWidget.findNext" ID="SearchReplaceWidget.findNext"></a> |
|
188 <h4>SearchReplaceWidget.findNext</h4> |
|
189 <b>findNext</b>(<i></i>) |
|
190 <p> |
|
191 Public slot to find the next occurrence of text. |
|
192 </p><a NAME="SearchReplaceWidget.findPrev" ID="SearchReplaceWidget.findPrev"></a> |
|
193 <h4>SearchReplaceWidget.findPrev</h4> |
|
194 <b>findPrev</b>(<i></i>) |
|
195 <p> |
|
196 Public slot to find the next previous of text. |
|
197 </p><a NAME="SearchReplaceWidget.keyPressEvent" ID="SearchReplaceWidget.keyPressEvent"></a> |
|
198 <h4>SearchReplaceWidget.keyPressEvent</h4> |
|
199 <b>keyPressEvent</b>(<i>event</i>) |
|
200 <p> |
|
201 Protected slot to handle key press events. |
|
202 </p><dl> |
|
203 <dt><i>event</i></dt> |
|
204 <dd> |
|
205 reference to the key press event (QKeyEvent) |
|
206 </dd> |
|
207 </dl><a NAME="SearchReplaceWidget.on_closeButton_clicked" ID="SearchReplaceWidget.on_closeButton_clicked"></a> |
|
208 <h4>SearchReplaceWidget.on_closeButton_clicked</h4> |
|
209 <b>on_closeButton_clicked</b>(<i></i>) |
|
210 <p> |
|
211 Private slot to close the widget. |
|
212 </p><a NAME="SearchReplaceWidget.on_findNextButton_clicked" ID="SearchReplaceWidget.on_findNextButton_clicked"></a> |
|
213 <h4>SearchReplaceWidget.on_findNextButton_clicked</h4> |
|
214 <b>on_findNextButton_clicked</b>(<i></i>) |
|
215 <p> |
|
216 Private slot to find the next occurrence of text. |
|
217 </p><a NAME="SearchReplaceWidget.on_findPrevButton_clicked" ID="SearchReplaceWidget.on_findPrevButton_clicked"></a> |
|
218 <h4>SearchReplaceWidget.on_findPrevButton_clicked</h4> |
|
219 <b>on_findPrevButton_clicked</b>(<i></i>) |
|
220 <p> |
|
221 Private slot to find the previous occurrence of text. |
|
222 </p><a NAME="SearchReplaceWidget.on_findtextCombo_editTextChanged" ID="SearchReplaceWidget.on_findtextCombo_editTextChanged"></a> |
|
223 <h4>SearchReplaceWidget.on_findtextCombo_editTextChanged</h4> |
|
224 <b>on_findtextCombo_editTextChanged</b>(<i>txt</i>) |
|
225 <p> |
|
226 Private slot to enable/disable the find buttons. |
|
227 </p><a NAME="SearchReplaceWidget.on_replaceAllButton_clicked" ID="SearchReplaceWidget.on_replaceAllButton_clicked"></a> |
|
228 <h4>SearchReplaceWidget.on_replaceAllButton_clicked</h4> |
|
229 <b>on_replaceAllButton_clicked</b>(<i></i>) |
|
230 <p> |
|
231 Private slot to replace all occurrences of text. |
|
232 </p><a NAME="SearchReplaceWidget.on_replaceButton_clicked" ID="SearchReplaceWidget.on_replaceButton_clicked"></a> |
|
233 <h4>SearchReplaceWidget.on_replaceButton_clicked</h4> |
|
234 <b>on_replaceButton_clicked</b>(<i></i>) |
|
235 <p> |
|
236 Private slot to replace one occurrence of text. |
|
237 </p><a NAME="SearchReplaceWidget.selectionChanged" ID="SearchReplaceWidget.selectionChanged"></a> |
|
238 <h4>SearchReplaceWidget.selectionChanged</h4> |
|
239 <b>selectionChanged</b>(<i></i>) |
|
240 <p> |
|
241 Public slot tracking changes of selected text. |
|
242 </p><a NAME="SearchReplaceWidget.show" ID="SearchReplaceWidget.show"></a> |
|
243 <h4>SearchReplaceWidget.show</h4> |
|
244 <b>show</b>(<i>text = ''</i>) |
|
245 <p> |
|
246 Overridden slot from QWidget. |
|
247 </p><dl> |
|
248 <dt><i>text</i></dt> |
|
249 <dd> |
|
250 text to be shown in the findtext edit (string) |
|
251 </dd> |
|
252 </dl><a NAME="SearchReplaceWidget.updateSelectionCheckBox" ID="SearchReplaceWidget.updateSelectionCheckBox"></a> |
|
253 <h4>SearchReplaceWidget.updateSelectionCheckBox</h4> |
|
254 <b>updateSelectionCheckBox</b>(<i>editor</i>) |
|
255 <p> |
|
256 Public slot to update the selection check box. |
|
257 </p><dl> |
|
258 <dt><i>editor</i></dt> |
|
259 <dd> |
|
260 reference to the editor (Editor) |
|
261 </dd> |
|
262 </dl> |
|
263 <div align="right"><a href="#top">Up</a></div> |
|
264 <hr /> |
|
265 </body></html> |