|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.WebBrowser.SearchWidget</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body><a NAME="top" ID="top"></a> |
|
22 <h1>eric6.WebBrowser.SearchWidget</h1> |
|
23 <p> |
|
24 Module implementing the search bar for the web browser. |
|
25 </p> |
|
26 <h3>Global Attributes</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <h3>Classes</h3> |
|
31 <table> |
|
32 <tr> |
|
33 <td><a href="#SearchWidget">SearchWidget</a></td> |
|
34 <td>Class implementing the search bar for the web browser.</td> |
|
35 </tr> |
|
36 </table> |
|
37 <h3>Functions</h3> |
|
38 <table> |
|
39 <tr><td>None</td></tr> |
|
40 </table> |
|
41 <hr /><hr /> |
|
42 <a NAME="SearchWidget" ID="SearchWidget"></a> |
|
43 <h2>SearchWidget</h2> |
|
44 <p> |
|
45 Class implementing the search bar for the web browser. |
|
46 </p> |
|
47 <h3>Derived from</h3> |
|
48 QWidget, Ui_SearchWidget |
|
49 <h3>Class Attributes</h3> |
|
50 <table> |
|
51 <tr><td>None</td></tr> |
|
52 </table> |
|
53 <h3>Class Methods</h3> |
|
54 <table> |
|
55 <tr><td>None</td></tr> |
|
56 </table> |
|
57 <h3>Methods</h3> |
|
58 <table> |
|
59 <tr> |
|
60 <td><a href="#SearchWidget.__init__">SearchWidget</a></td> |
|
61 <td>Constructor</td> |
|
62 </tr><tr> |
|
63 <td><a href="#SearchWidget.__findByReturnPressed">__findByReturnPressed</a></td> |
|
64 <td>Private slot to handle the returnPressed signal of the findtext combobox.</td> |
|
65 </tr><tr> |
|
66 <td><a href="#SearchWidget.__findNextPrev">__findNextPrev</a></td> |
|
67 <td>Private slot to find the next occurrence of text.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#SearchWidget.__findNextPrevCallback">__findNextPrevCallback</a></td> |
|
70 <td>Private method to process the result of the last search.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#SearchWidget.__resetSearch">__resetSearch</a></td> |
|
73 <td>Private method to reset the last search.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#SearchWidget.__searchTextEdited">__searchTextEdited</a></td> |
|
76 <td>Private slot to perform an incremental search.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#SearchWidget.__setFindtextComboBackground">__setFindtextComboBackground</a></td> |
|
79 <td>Private slot to change the findtext combo background to indicate errors.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#SearchWidget.findNext">findNext</a></td> |
|
82 <td>Public slot to find the next occurrence.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#SearchWidget.findPrevious">findPrevious</a></td> |
|
85 <td>Public slot to find the previous occurrence.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#SearchWidget.keyPressEvent">keyPressEvent</a></td> |
|
88 <td>Protected slot to handle key press events.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#SearchWidget.on_closeButton_clicked">on_closeButton_clicked</a></td> |
|
91 <td>Private slot to close the widget.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#SearchWidget.on_findNextButton_clicked">on_findNextButton_clicked</a></td> |
|
94 <td>Private slot to find the next occurrence.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#SearchWidget.on_findPrevButton_clicked">on_findPrevButton_clicked</a></td> |
|
97 <td>Private slot to find the previous occurrence.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#SearchWidget.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="#SearchWidget.showFind">showFind</a></td> |
|
103 <td>Public method to display this dialog.</td> |
|
104 </tr> |
|
105 </table> |
|
106 <h3>Static Methods</h3> |
|
107 <table> |
|
108 <tr><td>None</td></tr> |
|
109 </table> |
|
110 <a NAME="SearchWidget.__init__" ID="SearchWidget.__init__"></a> |
|
111 <h4>SearchWidget (Constructor)</h4> |
|
112 <b>SearchWidget</b>(<i>mainWindow, parent=None</i>) |
|
113 <p> |
|
114 Constructor |
|
115 </p><dl> |
|
116 <dt><i>mainWindow</i></dt> |
|
117 <dd> |
|
118 reference to the main window (QMainWindow) |
|
119 </dd><dt><i>parent</i></dt> |
|
120 <dd> |
|
121 parent widget of this dialog (QWidget) |
|
122 </dd> |
|
123 </dl><a NAME="SearchWidget.__findByReturnPressed" ID="SearchWidget.__findByReturnPressed"></a> |
|
124 <h4>SearchWidget.__findByReturnPressed</h4> |
|
125 <b>__findByReturnPressed</b>(<i></i>) |
|
126 <p> |
|
127 Private slot to handle the returnPressed signal of the findtext |
|
128 combobox. |
|
129 </p><a NAME="SearchWidget.__findNextPrev" ID="SearchWidget.__findNextPrev"></a> |
|
130 <h4>SearchWidget.__findNextPrev</h4> |
|
131 <b>__findNextPrev</b>(<i></i>) |
|
132 <p> |
|
133 Private slot to find the next occurrence of text. |
|
134 </p><a NAME="SearchWidget.__findNextPrevCallback" ID="SearchWidget.__findNextPrevCallback"></a> |
|
135 <h4>SearchWidget.__findNextPrevCallback</h4> |
|
136 <b>__findNextPrevCallback</b>(<i>found</i>) |
|
137 <p> |
|
138 Private method to process the result of the last search. |
|
139 </p><dl> |
|
140 <dt><i>found</i> (bool)</dt> |
|
141 <dd> |
|
142 flag indicating if the last search succeeded |
|
143 </dd> |
|
144 </dl><a NAME="SearchWidget.__resetSearch" ID="SearchWidget.__resetSearch"></a> |
|
145 <h4>SearchWidget.__resetSearch</h4> |
|
146 <b>__resetSearch</b>(<i></i>) |
|
147 <p> |
|
148 Private method to reset the last search. |
|
149 </p><a NAME="SearchWidget.__searchTextEdited" ID="SearchWidget.__searchTextEdited"></a> |
|
150 <h4>SearchWidget.__searchTextEdited</h4> |
|
151 <b>__searchTextEdited</b>(<i>txt</i>) |
|
152 <p> |
|
153 Private slot to perform an incremental search. |
|
154 </p><dl> |
|
155 <dt><i>txt</i></dt> |
|
156 <dd> |
|
157 current text of the search combos line edit (string) |
|
158 (unused) |
|
159 </dd> |
|
160 </dl><a NAME="SearchWidget.__setFindtextComboBackground" ID="SearchWidget.__setFindtextComboBackground"></a> |
|
161 <h4>SearchWidget.__setFindtextComboBackground</h4> |
|
162 <b>__setFindtextComboBackground</b>(<i>error</i>) |
|
163 <p> |
|
164 Private slot to change the findtext combo background to indicate |
|
165 errors. |
|
166 </p><dl> |
|
167 <dt><i>error</i></dt> |
|
168 <dd> |
|
169 flag indicating an error condition (boolean) |
|
170 </dd> |
|
171 </dl><a NAME="SearchWidget.findNext" ID="SearchWidget.findNext"></a> |
|
172 <h4>SearchWidget.findNext</h4> |
|
173 <b>findNext</b>(<i></i>) |
|
174 <p> |
|
175 Public slot to find the next occurrence. |
|
176 </p><a NAME="SearchWidget.findPrevious" ID="SearchWidget.findPrevious"></a> |
|
177 <h4>SearchWidget.findPrevious</h4> |
|
178 <b>findPrevious</b>(<i></i>) |
|
179 <p> |
|
180 Public slot to find the previous occurrence. |
|
181 </p><a NAME="SearchWidget.keyPressEvent" ID="SearchWidget.keyPressEvent"></a> |
|
182 <h4>SearchWidget.keyPressEvent</h4> |
|
183 <b>keyPressEvent</b>(<i>event</i>) |
|
184 <p> |
|
185 Protected slot to handle key press events. |
|
186 </p><dl> |
|
187 <dt><i>event</i></dt> |
|
188 <dd> |
|
189 reference to the key press event (QKeyEvent) |
|
190 </dd> |
|
191 </dl><a NAME="SearchWidget.on_closeButton_clicked" ID="SearchWidget.on_closeButton_clicked"></a> |
|
192 <h4>SearchWidget.on_closeButton_clicked</h4> |
|
193 <b>on_closeButton_clicked</b>(<i></i>) |
|
194 <p> |
|
195 Private slot to close the widget. |
|
196 </p><a NAME="SearchWidget.on_findNextButton_clicked" ID="SearchWidget.on_findNextButton_clicked"></a> |
|
197 <h4>SearchWidget.on_findNextButton_clicked</h4> |
|
198 <b>on_findNextButton_clicked</b>(<i></i>) |
|
199 <p> |
|
200 Private slot to find the next occurrence. |
|
201 </p><a NAME="SearchWidget.on_findPrevButton_clicked" ID="SearchWidget.on_findPrevButton_clicked"></a> |
|
202 <h4>SearchWidget.on_findPrevButton_clicked</h4> |
|
203 <b>on_findPrevButton_clicked</b>(<i></i>) |
|
204 <p> |
|
205 Private slot to find the previous occurrence. |
|
206 </p><a NAME="SearchWidget.on_findtextCombo_editTextChanged" ID="SearchWidget.on_findtextCombo_editTextChanged"></a> |
|
207 <h4>SearchWidget.on_findtextCombo_editTextChanged</h4> |
|
208 <b>on_findtextCombo_editTextChanged</b>(<i>txt</i>) |
|
209 <p> |
|
210 Private slot to enable/disable the find buttons. |
|
211 </p><dl> |
|
212 <dt><i>txt</i></dt> |
|
213 <dd> |
|
214 text of the combobox (string) |
|
215 </dd> |
|
216 </dl><a NAME="SearchWidget.showFind" ID="SearchWidget.showFind"></a> |
|
217 <h4>SearchWidget.showFind</h4> |
|
218 <b>showFind</b>(<i></i>) |
|
219 <p> |
|
220 Public method to display this dialog. |
|
221 </p> |
|
222 <div align="right"><a href="#top">Up</a></div> |
|
223 <hr /> |
|
224 </body></html> |