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