16 |
16 |
17 a { color: #BA6D36; } |
17 a { color: #BA6D36; } |
18 |
18 |
19 </style> |
19 </style> |
20 </head> |
20 </head> |
21 <body><a NAME="top" ID="top"></a> |
21 <body> |
|
22 <a NAME="top" ID="top"></a> |
22 <h1>eric6.WebBrowser.SearchWidget</h1> |
23 <h1>eric6.WebBrowser.SearchWidget</h1> |
|
24 |
23 <p> |
25 <p> |
24 Module implementing the search bar for the web browser. |
26 Module implementing the search bar for the web browser. |
25 </p> |
27 </p> |
26 <h3>Global Attributes</h3> |
28 <h3>Global Attributes</h3> |
|
29 |
27 <table> |
30 <table> |
28 <tr><td>None</td></tr> |
31 <tr><td>None</td></tr> |
29 </table> |
32 </table> |
30 <h3>Classes</h3> |
33 <h3>Classes</h3> |
31 <table> |
34 |
|
35 <table> |
|
36 |
32 <tr> |
37 <tr> |
33 <td><a href="#SearchWidget">SearchWidget</a></td> |
38 <td><a href="#SearchWidget">SearchWidget</a></td> |
34 <td>Class implementing the search bar for the web browser.</td> |
39 <td>Class implementing the search bar for the web browser.</td> |
35 </tr> |
40 </tr> |
36 </table> |
41 </table> |
37 <h3>Functions</h3> |
42 <h3>Functions</h3> |
38 <table> |
43 |
39 <tr><td>None</td></tr> |
44 <table> |
40 </table> |
45 <tr><td>None</td></tr> |
41 <hr /><hr /> |
46 </table> |
|
47 <hr /> |
|
48 <hr /> |
42 <a NAME="SearchWidget" ID="SearchWidget"></a> |
49 <a NAME="SearchWidget" ID="SearchWidget"></a> |
43 <h2>SearchWidget</h2> |
50 <h2>SearchWidget</h2> |
|
51 |
44 <p> |
52 <p> |
45 Class implementing the search bar for the web browser. |
53 Class implementing the search bar for the web browser. |
46 </p> |
54 </p> |
47 <h3>Derived from</h3> |
55 <h3>Derived from</h3> |
48 QWidget, Ui_SearchWidget |
56 QWidget, Ui_SearchWidget |
49 <h3>Class Attributes</h3> |
57 <h3>Class Attributes</h3> |
|
58 |
50 <table> |
59 <table> |
51 <tr><td>None</td></tr> |
60 <tr><td>None</td></tr> |
52 </table> |
61 </table> |
53 <h3>Class Methods</h3> |
62 <h3>Class Methods</h3> |
|
63 |
54 <table> |
64 <table> |
55 <tr><td>None</td></tr> |
65 <tr><td>None</td></tr> |
56 </table> |
66 </table> |
57 <h3>Methods</h3> |
67 <h3>Methods</h3> |
58 <table> |
68 |
|
69 <table> |
|
70 |
59 <tr> |
71 <tr> |
60 <td><a href="#SearchWidget.__init__">SearchWidget</a></td> |
72 <td><a href="#SearchWidget.__init__">SearchWidget</a></td> |
61 <td>Constructor</td> |
73 <td>Constructor</td> |
62 </tr><tr> |
74 </tr> |
|
75 <tr> |
63 <td><a href="#SearchWidget.__findByReturnPressed">__findByReturnPressed</a></td> |
76 <td><a href="#SearchWidget.__findByReturnPressed">__findByReturnPressed</a></td> |
64 <td>Private slot to handle the returnPressed signal of the findtext combobox.</td> |
77 <td>Private slot to handle the returnPressed signal of the findtext combobox.</td> |
65 </tr><tr> |
78 </tr> |
|
79 <tr> |
66 <td><a href="#SearchWidget.__findNextPrev">__findNextPrev</a></td> |
80 <td><a href="#SearchWidget.__findNextPrev">__findNextPrev</a></td> |
67 <td>Private slot to find the next occurrence of text.</td> |
81 <td>Private slot to find the next occurrence of text.</td> |
68 </tr><tr> |
82 </tr> |
|
83 <tr> |
69 <td><a href="#SearchWidget.__findNextPrevCallback">__findNextPrevCallback</a></td> |
84 <td><a href="#SearchWidget.__findNextPrevCallback">__findNextPrevCallback</a></td> |
70 <td>Private method to process the result of the last search.</td> |
85 <td>Private method to process the result of the last search.</td> |
71 </tr><tr> |
86 </tr> |
|
87 <tr> |
72 <td><a href="#SearchWidget.__resetSearch">__resetSearch</a></td> |
88 <td><a href="#SearchWidget.__resetSearch">__resetSearch</a></td> |
73 <td>Private method to reset the last search.</td> |
89 <td>Private method to reset the last search.</td> |
74 </tr><tr> |
90 </tr> |
|
91 <tr> |
75 <td><a href="#SearchWidget.__searchTextEdited">__searchTextEdited</a></td> |
92 <td><a href="#SearchWidget.__searchTextEdited">__searchTextEdited</a></td> |
76 <td>Private slot to perform an incremental search.</td> |
93 <td>Private slot to perform an incremental search.</td> |
77 </tr><tr> |
94 </tr> |
|
95 <tr> |
78 <td><a href="#SearchWidget.__setFindtextComboBackground">__setFindtextComboBackground</a></td> |
96 <td><a href="#SearchWidget.__setFindtextComboBackground">__setFindtextComboBackground</a></td> |
79 <td>Private slot to change the findtext combo background to indicate errors.</td> |
97 <td>Private slot to change the findtext combo background to indicate errors.</td> |
80 </tr><tr> |
98 </tr> |
|
99 <tr> |
81 <td><a href="#SearchWidget.findNext">findNext</a></td> |
100 <td><a href="#SearchWidget.findNext">findNext</a></td> |
82 <td>Public slot to find the next occurrence.</td> |
101 <td>Public slot to find the next occurrence.</td> |
83 </tr><tr> |
102 </tr> |
|
103 <tr> |
84 <td><a href="#SearchWidget.findPrevious">findPrevious</a></td> |
104 <td><a href="#SearchWidget.findPrevious">findPrevious</a></td> |
85 <td>Public slot to find the previous occurrence.</td> |
105 <td>Public slot to find the previous occurrence.</td> |
86 </tr><tr> |
106 </tr> |
|
107 <tr> |
87 <td><a href="#SearchWidget.keyPressEvent">keyPressEvent</a></td> |
108 <td><a href="#SearchWidget.keyPressEvent">keyPressEvent</a></td> |
88 <td>Protected slot to handle key press events.</td> |
109 <td>Protected slot to handle key press events.</td> |
89 </tr><tr> |
110 </tr> |
|
111 <tr> |
90 <td><a href="#SearchWidget.on_closeButton_clicked">on_closeButton_clicked</a></td> |
112 <td><a href="#SearchWidget.on_closeButton_clicked">on_closeButton_clicked</a></td> |
91 <td>Private slot to close the widget.</td> |
113 <td>Private slot to close the widget.</td> |
92 </tr><tr> |
114 </tr> |
|
115 <tr> |
93 <td><a href="#SearchWidget.on_findNextButton_clicked">on_findNextButton_clicked</a></td> |
116 <td><a href="#SearchWidget.on_findNextButton_clicked">on_findNextButton_clicked</a></td> |
94 <td>Private slot to find the next occurrence.</td> |
117 <td>Private slot to find the next occurrence.</td> |
95 </tr><tr> |
118 </tr> |
|
119 <tr> |
96 <td><a href="#SearchWidget.on_findPrevButton_clicked">on_findPrevButton_clicked</a></td> |
120 <td><a href="#SearchWidget.on_findPrevButton_clicked">on_findPrevButton_clicked</a></td> |
97 <td>Private slot to find the previous occurrence.</td> |
121 <td>Private slot to find the previous occurrence.</td> |
98 </tr><tr> |
122 </tr> |
|
123 <tr> |
99 <td><a href="#SearchWidget.on_findtextCombo_editTextChanged">on_findtextCombo_editTextChanged</a></td> |
124 <td><a href="#SearchWidget.on_findtextCombo_editTextChanged">on_findtextCombo_editTextChanged</a></td> |
100 <td>Private slot to enable/disable the find buttons.</td> |
125 <td>Private slot to enable/disable the find buttons.</td> |
101 </tr><tr> |
126 </tr> |
|
127 <tr> |
102 <td><a href="#SearchWidget.showFind">showFind</a></td> |
128 <td><a href="#SearchWidget.showFind">showFind</a></td> |
103 <td>Public method to display this dialog.</td> |
129 <td>Public method to display this dialog.</td> |
104 </tr> |
130 </tr> |
105 </table> |
131 </table> |
106 <h3>Static Methods</h3> |
132 <h3>Static Methods</h3> |
107 <table> |
133 |
108 <tr><td>None</td></tr> |
134 <table> |
109 </table> |
135 <tr><td>None</td></tr> |
|
136 </table> |
|
137 |
110 <a NAME="SearchWidget.__init__" ID="SearchWidget.__init__"></a> |
138 <a NAME="SearchWidget.__init__" ID="SearchWidget.__init__"></a> |
111 <h4>SearchWidget (Constructor)</h4> |
139 <h4>SearchWidget (Constructor)</h4> |
112 <b>SearchWidget</b>(<i>mainWindow, parent=None</i>) |
140 <b>SearchWidget</b>(<i>mainWindow, parent=None</i>) |
|
141 |
113 <p> |
142 <p> |
114 Constructor |
143 Constructor |
115 </p><dl> |
144 </p> |
|
145 <dl> |
|
146 |
116 <dt><i>mainWindow</i></dt> |
147 <dt><i>mainWindow</i></dt> |
117 <dd> |
148 <dd> |
118 reference to the main window (QMainWindow) |
149 reference to the main window (QMainWindow) |
119 </dd><dt><i>parent</i></dt> |
150 </dd> |
|
151 <dt><i>parent</i></dt> |
120 <dd> |
152 <dd> |
121 parent widget of this dialog (QWidget) |
153 parent widget of this dialog (QWidget) |
122 </dd> |
154 </dd> |
123 </dl><a NAME="SearchWidget.__findByReturnPressed" ID="SearchWidget.__findByReturnPressed"></a> |
155 </dl> |
|
156 <a NAME="SearchWidget.__findByReturnPressed" ID="SearchWidget.__findByReturnPressed"></a> |
124 <h4>SearchWidget.__findByReturnPressed</h4> |
157 <h4>SearchWidget.__findByReturnPressed</h4> |
125 <b>__findByReturnPressed</b>(<i></i>) |
158 <b>__findByReturnPressed</b>(<i></i>) |
|
159 |
126 <p> |
160 <p> |
127 Private slot to handle the returnPressed signal of the findtext |
161 Private slot to handle the returnPressed signal of the findtext |
128 combobox. |
162 combobox. |
129 </p><a NAME="SearchWidget.__findNextPrev" ID="SearchWidget.__findNextPrev"></a> |
163 </p> |
|
164 <a NAME="SearchWidget.__findNextPrev" ID="SearchWidget.__findNextPrev"></a> |
130 <h4>SearchWidget.__findNextPrev</h4> |
165 <h4>SearchWidget.__findNextPrev</h4> |
131 <b>__findNextPrev</b>(<i></i>) |
166 <b>__findNextPrev</b>(<i></i>) |
|
167 |
132 <p> |
168 <p> |
133 Private slot to find the next occurrence of text. |
169 Private slot to find the next occurrence of text. |
134 </p><a NAME="SearchWidget.__findNextPrevCallback" ID="SearchWidget.__findNextPrevCallback"></a> |
170 </p> |
|
171 <a NAME="SearchWidget.__findNextPrevCallback" ID="SearchWidget.__findNextPrevCallback"></a> |
135 <h4>SearchWidget.__findNextPrevCallback</h4> |
172 <h4>SearchWidget.__findNextPrevCallback</h4> |
136 <b>__findNextPrevCallback</b>(<i>found</i>) |
173 <b>__findNextPrevCallback</b>(<i>found</i>) |
|
174 |
137 <p> |
175 <p> |
138 Private method to process the result of the last search. |
176 Private method to process the result of the last search. |
139 </p><dl> |
177 </p> |
|
178 <dl> |
|
179 |
140 <dt><i>found</i> (bool)</dt> |
180 <dt><i>found</i> (bool)</dt> |
141 <dd> |
181 <dd> |
142 flag indicating if the last search succeeded |
182 flag indicating if the last search succeeded |
143 </dd> |
183 </dd> |
144 </dl><a NAME="SearchWidget.__resetSearch" ID="SearchWidget.__resetSearch"></a> |
184 </dl> |
|
185 <a NAME="SearchWidget.__resetSearch" ID="SearchWidget.__resetSearch"></a> |
145 <h4>SearchWidget.__resetSearch</h4> |
186 <h4>SearchWidget.__resetSearch</h4> |
146 <b>__resetSearch</b>(<i></i>) |
187 <b>__resetSearch</b>(<i></i>) |
|
188 |
147 <p> |
189 <p> |
148 Private method to reset the last search. |
190 Private method to reset the last search. |
149 </p><a NAME="SearchWidget.__searchTextEdited" ID="SearchWidget.__searchTextEdited"></a> |
191 </p> |
|
192 <a NAME="SearchWidget.__searchTextEdited" ID="SearchWidget.__searchTextEdited"></a> |
150 <h4>SearchWidget.__searchTextEdited</h4> |
193 <h4>SearchWidget.__searchTextEdited</h4> |
151 <b>__searchTextEdited</b>(<i>txt</i>) |
194 <b>__searchTextEdited</b>(<i>txt</i>) |
|
195 |
152 <p> |
196 <p> |
153 Private slot to perform an incremental search. |
197 Private slot to perform an incremental search. |
154 </p><dl> |
198 </p> |
|
199 <dl> |
|
200 |
155 <dt><i>txt</i></dt> |
201 <dt><i>txt</i></dt> |
156 <dd> |
202 <dd> |
157 current text of the search combos line edit (string) |
203 current text of the search combos line edit (string) |
158 (unused) |
204 (unused) |
159 </dd> |
205 </dd> |
160 </dl><a NAME="SearchWidget.__setFindtextComboBackground" ID="SearchWidget.__setFindtextComboBackground"></a> |
206 </dl> |
|
207 <a NAME="SearchWidget.__setFindtextComboBackground" ID="SearchWidget.__setFindtextComboBackground"></a> |
161 <h4>SearchWidget.__setFindtextComboBackground</h4> |
208 <h4>SearchWidget.__setFindtextComboBackground</h4> |
162 <b>__setFindtextComboBackground</b>(<i>error</i>) |
209 <b>__setFindtextComboBackground</b>(<i>error</i>) |
|
210 |
163 <p> |
211 <p> |
164 Private slot to change the findtext combo background to indicate |
212 Private slot to change the findtext combo background to indicate |
165 errors. |
213 errors. |
166 </p><dl> |
214 </p> |
|
215 <dl> |
|
216 |
167 <dt><i>error</i></dt> |
217 <dt><i>error</i></dt> |
168 <dd> |
218 <dd> |
169 flag indicating an error condition (boolean) |
219 flag indicating an error condition (boolean) |
170 </dd> |
220 </dd> |
171 </dl><a NAME="SearchWidget.findNext" ID="SearchWidget.findNext"></a> |
221 </dl> |
|
222 <a NAME="SearchWidget.findNext" ID="SearchWidget.findNext"></a> |
172 <h4>SearchWidget.findNext</h4> |
223 <h4>SearchWidget.findNext</h4> |
173 <b>findNext</b>(<i></i>) |
224 <b>findNext</b>(<i></i>) |
|
225 |
174 <p> |
226 <p> |
175 Public slot to find the next occurrence. |
227 Public slot to find the next occurrence. |
176 </p><a NAME="SearchWidget.findPrevious" ID="SearchWidget.findPrevious"></a> |
228 </p> |
|
229 <a NAME="SearchWidget.findPrevious" ID="SearchWidget.findPrevious"></a> |
177 <h4>SearchWidget.findPrevious</h4> |
230 <h4>SearchWidget.findPrevious</h4> |
178 <b>findPrevious</b>(<i></i>) |
231 <b>findPrevious</b>(<i></i>) |
|
232 |
179 <p> |
233 <p> |
180 Public slot to find the previous occurrence. |
234 Public slot to find the previous occurrence. |
181 </p><a NAME="SearchWidget.keyPressEvent" ID="SearchWidget.keyPressEvent"></a> |
235 </p> |
|
236 <a NAME="SearchWidget.keyPressEvent" ID="SearchWidget.keyPressEvent"></a> |
182 <h4>SearchWidget.keyPressEvent</h4> |
237 <h4>SearchWidget.keyPressEvent</h4> |
183 <b>keyPressEvent</b>(<i>event</i>) |
238 <b>keyPressEvent</b>(<i>event</i>) |
|
239 |
184 <p> |
240 <p> |
185 Protected slot to handle key press events. |
241 Protected slot to handle key press events. |
186 </p><dl> |
242 </p> |
|
243 <dl> |
|
244 |
187 <dt><i>event</i></dt> |
245 <dt><i>event</i></dt> |
188 <dd> |
246 <dd> |
189 reference to the key press event (QKeyEvent) |
247 reference to the key press event (QKeyEvent) |
190 </dd> |
248 </dd> |
191 </dl><a NAME="SearchWidget.on_closeButton_clicked" ID="SearchWidget.on_closeButton_clicked"></a> |
249 </dl> |
|
250 <a NAME="SearchWidget.on_closeButton_clicked" ID="SearchWidget.on_closeButton_clicked"></a> |
192 <h4>SearchWidget.on_closeButton_clicked</h4> |
251 <h4>SearchWidget.on_closeButton_clicked</h4> |
193 <b>on_closeButton_clicked</b>(<i></i>) |
252 <b>on_closeButton_clicked</b>(<i></i>) |
|
253 |
194 <p> |
254 <p> |
195 Private slot to close the widget. |
255 Private slot to close the widget. |
196 </p><a NAME="SearchWidget.on_findNextButton_clicked" ID="SearchWidget.on_findNextButton_clicked"></a> |
256 </p> |
|
257 <a NAME="SearchWidget.on_findNextButton_clicked" ID="SearchWidget.on_findNextButton_clicked"></a> |
197 <h4>SearchWidget.on_findNextButton_clicked</h4> |
258 <h4>SearchWidget.on_findNextButton_clicked</h4> |
198 <b>on_findNextButton_clicked</b>(<i></i>) |
259 <b>on_findNextButton_clicked</b>(<i></i>) |
|
260 |
199 <p> |
261 <p> |
200 Private slot to find the next occurrence. |
262 Private slot to find the next occurrence. |
201 </p><a NAME="SearchWidget.on_findPrevButton_clicked" ID="SearchWidget.on_findPrevButton_clicked"></a> |
263 </p> |
|
264 <a NAME="SearchWidget.on_findPrevButton_clicked" ID="SearchWidget.on_findPrevButton_clicked"></a> |
202 <h4>SearchWidget.on_findPrevButton_clicked</h4> |
265 <h4>SearchWidget.on_findPrevButton_clicked</h4> |
203 <b>on_findPrevButton_clicked</b>(<i></i>) |
266 <b>on_findPrevButton_clicked</b>(<i></i>) |
|
267 |
204 <p> |
268 <p> |
205 Private slot to find the previous occurrence. |
269 Private slot to find the previous occurrence. |
206 </p><a NAME="SearchWidget.on_findtextCombo_editTextChanged" ID="SearchWidget.on_findtextCombo_editTextChanged"></a> |
270 </p> |
|
271 <a NAME="SearchWidget.on_findtextCombo_editTextChanged" ID="SearchWidget.on_findtextCombo_editTextChanged"></a> |
207 <h4>SearchWidget.on_findtextCombo_editTextChanged</h4> |
272 <h4>SearchWidget.on_findtextCombo_editTextChanged</h4> |
208 <b>on_findtextCombo_editTextChanged</b>(<i>txt</i>) |
273 <b>on_findtextCombo_editTextChanged</b>(<i>txt</i>) |
|
274 |
209 <p> |
275 <p> |
210 Private slot to enable/disable the find buttons. |
276 Private slot to enable/disable the find buttons. |
211 </p><dl> |
277 </p> |
|
278 <dl> |
|
279 |
212 <dt><i>txt</i></dt> |
280 <dt><i>txt</i></dt> |
213 <dd> |
281 <dd> |
214 text of the combobox (string) |
282 text of the combobox (string) |
215 </dd> |
283 </dd> |
216 </dl><a NAME="SearchWidget.showFind" ID="SearchWidget.showFind"></a> |
284 </dl> |
|
285 <a NAME="SearchWidget.showFind" ID="SearchWidget.showFind"></a> |
217 <h4>SearchWidget.showFind</h4> |
286 <h4>SearchWidget.showFind</h4> |
218 <b>showFind</b>(<i></i>) |
287 <b>showFind</b>(<i></i>) |
|
288 |
219 <p> |
289 <p> |
220 Public method to display this dialog. |
290 Public method to display this dialog. |
221 </p> |
291 </p> |
222 <div align="right"><a href="#top">Up</a></div> |
292 <div align="right"><a href="#top">Up</a></div> |
223 <hr /> |
293 <hr /> |