eric6/Documentation/Source/eric6.E5Gui.E5TextEditSearchWidget.html

branch
maintenance
changeset 6989
8b8cadf8d7e9
parent 6942
2602857055c5
child 7204
cbf6d88004ce
equal deleted inserted replaced
6938:7926553b7509 6989:8b8cadf8d7e9
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.E5Gui.E5TextEditSearchWidget</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.E5Gui.E5TextEditSearchWidget</h1>
23 <p>
24 Module implementing a horizontal search widget for QTextEdit.
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="#E5TextEditSearchWidget">E5TextEditSearchWidget</a></td>
34 <td>Class implementing a horizontal search widget for QTextEdit.</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="E5TextEditSearchWidget" ID="E5TextEditSearchWidget"></a>
43 <h2>E5TextEditSearchWidget</h2>
44 <p>
45 Class implementing a horizontal search widget for QTextEdit.
46 </p>
47 <h3>Derived from</h3>
48 QWidget
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="#E5TextEditSearchWidget.__init__">E5TextEditSearchWidget</a></td>
61 <td>Constructor</td>
62 </tr><tr>
63 <td><a href="#E5TextEditSearchWidget.__addWidthForHeightLayout">__addWidthForHeightLayout</a></td>
64 <td>Private method to set the middle part of the layout.</td>
65 </tr><tr>
66 <td><a href="#E5TextEditSearchWidget.__find">__find</a></td>
67 <td>Private method to search the associated text edit.</td>
68 </tr><tr>
69 <td><a href="#E5TextEditSearchWidget.__findByReturnPressed">__findByReturnPressed</a></td>
70 <td>Private slot to handle the returnPressed signal of the findtext combobox.</td>
71 </tr><tr>
72 <td><a href="#E5TextEditSearchWidget.__findNextPrevCallback">__findNextPrevCallback</a></td>
73 <td>Private method to process the result of the last search.</td>
74 </tr><tr>
75 <td><a href="#E5TextEditSearchWidget.__findPrevNextQTextEdit">__findPrevNextQTextEdit</a></td>
76 <td>Private method to to search the associated edit widget of type QTextEdit.</td>
77 </tr><tr>
78 <td><a href="#E5TextEditSearchWidget.__findPrevNextQWebEngineView">__findPrevNextQWebEngineView</a></td>
79 <td>Private method to to search the associated edit widget of type QWebEngineView.</td>
80 </tr><tr>
81 <td><a href="#E5TextEditSearchWidget.__findPrevNextQWebView">__findPrevNextQWebView</a></td>
82 <td>Private method to to search the associated edit widget of type QWebView.</td>
83 </tr><tr>
84 <td><a href="#E5TextEditSearchWidget.__setFindtextComboBackground">__setFindtextComboBackground</a></td>
85 <td>Private slot to change the findtext combo background to indicate errors.</td>
86 </tr><tr>
87 <td><a href="#E5TextEditSearchWidget.__setSearchButtons">__setSearchButtons</a></td>
88 <td>Private slot to set the state of the search buttons.</td>
89 </tr><tr>
90 <td><a href="#E5TextEditSearchWidget.__setupUi">__setupUi</a></td>
91 <td>Private method to generate the UI.</td>
92 </tr><tr>
93 <td><a href="#E5TextEditSearchWidget.attachTextEdit">attachTextEdit</a></td>
94 <td>Public method to attach a QTextEdit widget.</td>
95 </tr><tr>
96 <td><a href="#E5TextEditSearchWidget.keyPressEvent">keyPressEvent</a></td>
97 <td>Protected slot to handle key press events.</td>
98 </tr><tr>
99 <td><a href="#E5TextEditSearchWidget.on_findNextButton_clicked">on_findNextButton_clicked</a></td>
100 <td>Private slot to find the next occurrence.</td>
101 </tr><tr>
102 <td><a href="#E5TextEditSearchWidget.on_findPrevButton_clicked">on_findPrevButton_clicked</a></td>
103 <td>Private slot to find the previous occurrence.</td>
104 </tr><tr>
105 <td><a href="#E5TextEditSearchWidget.on_findtextCombo_editTextChanged">on_findtextCombo_editTextChanged</a></td>
106 <td>Private slot to enable/disable the find buttons.</td>
107 </tr><tr>
108 <td><a href="#E5TextEditSearchWidget.setWidthForHeight">setWidthForHeight</a></td>
109 <td>Public method to set the 'width for height'.</td>
110 </tr>
111 </table>
112 <h3>Static Methods</h3>
113 <table>
114 <tr><td>None</td></tr>
115 </table>
116 <a NAME="E5TextEditSearchWidget.__init__" ID="E5TextEditSearchWidget.__init__"></a>
117 <h4>E5TextEditSearchWidget (Constructor)</h4>
118 <b>E5TextEditSearchWidget</b>(<i>parent=None, widthForHeight=True</i>)
119 <p>
120 Constructor
121 </p><dl>
122 <dt><i>parent</i> (QWidget)</dt>
123 <dd>
124 reference to the parent widget
125 </dd><dt><i>widthForHeight</i> (bool)</dt>
126 <dd>
127 flag indicating to prefer width for height.
128 If this parameter is False, some widgets are shown in a third
129 line.
130 </dd>
131 </dl><a NAME="E5TextEditSearchWidget.__addWidthForHeightLayout" ID="E5TextEditSearchWidget.__addWidthForHeightLayout"></a>
132 <h4>E5TextEditSearchWidget.__addWidthForHeightLayout</h4>
133 <b>__addWidthForHeightLayout</b>(<i>widthForHeight</i>)
134 <p>
135 Private method to set the middle part of the layout.
136 </p><dl>
137 <dt><i>widthForHeight</i> (bool)</dt>
138 <dd>
139 flag indicating to prefer width
140 </dd>
141 </dl><a NAME="E5TextEditSearchWidget.__find" ID="E5TextEditSearchWidget.__find"></a>
142 <h4>E5TextEditSearchWidget.__find</h4>
143 <b>__find</b>(<i>backwards</i>)
144 <p>
145 Private method to search the associated text edit.
146 </p><dl>
147 <dt><i>backwards</i></dt>
148 <dd>
149 flag indicating a backwards search (boolean)
150 </dd>
151 </dl><a NAME="E5TextEditSearchWidget.__findByReturnPressed" ID="E5TextEditSearchWidget.__findByReturnPressed"></a>
152 <h4>E5TextEditSearchWidget.__findByReturnPressed</h4>
153 <b>__findByReturnPressed</b>(<i></i>)
154 <p>
155 Private slot to handle the returnPressed signal of the findtext
156 combobox.
157 </p><a NAME="E5TextEditSearchWidget.__findNextPrevCallback" ID="E5TextEditSearchWidget.__findNextPrevCallback"></a>
158 <h4>E5TextEditSearchWidget.__findNextPrevCallback</h4>
159 <b>__findNextPrevCallback</b>(<i>found</i>)
160 <p>
161 Private method to process the result of the last search.
162 </p><dl>
163 <dt><i>found</i> (bool)</dt>
164 <dd>
165 flag indicating if the last search succeeded
166 </dd>
167 </dl><a NAME="E5TextEditSearchWidget.__findPrevNextQTextEdit" ID="E5TextEditSearchWidget.__findPrevNextQTextEdit"></a>
168 <h4>E5TextEditSearchWidget.__findPrevNextQTextEdit</h4>
169 <b>__findPrevNextQTextEdit</b>(<i>backwards</i>)
170 <p>
171 Private method to to search the associated edit widget of
172 type QTextEdit.
173 </p><dl>
174 <dt><i>backwards</i> (bool)</dt>
175 <dd>
176 flag indicating a backwards search
177 </dd>
178 </dl><dl>
179 <dt>Returns:</dt>
180 <dd>
181 flag indicating the search result
182 </dd>
183 </dl><dl>
184 <dt>Return Type:</dt>
185 <dd>
186 bool
187 </dd>
188 </dl><a NAME="E5TextEditSearchWidget.__findPrevNextQWebEngineView" ID="E5TextEditSearchWidget.__findPrevNextQWebEngineView"></a>
189 <h4>E5TextEditSearchWidget.__findPrevNextQWebEngineView</h4>
190 <b>__findPrevNextQWebEngineView</b>(<i>backwards</i>)
191 <p>
192 Private method to to search the associated edit widget of
193 type QWebEngineView.
194 </p><dl>
195 <dt><i>backwards</i> (bool)</dt>
196 <dd>
197 flag indicating a backwards search
198 </dd>
199 </dl><a NAME="E5TextEditSearchWidget.__findPrevNextQWebView" ID="E5TextEditSearchWidget.__findPrevNextQWebView"></a>
200 <h4>E5TextEditSearchWidget.__findPrevNextQWebView</h4>
201 <b>__findPrevNextQWebView</b>(<i>backwards</i>)
202 <p>
203 Private method to to search the associated edit widget of
204 type QWebView.
205 </p><dl>
206 <dt><i>backwards</i> (bool)</dt>
207 <dd>
208 flag indicating a backwards search
209 </dd>
210 </dl><dl>
211 <dt>Returns:</dt>
212 <dd>
213 flag indicating the search result
214 </dd>
215 </dl><dl>
216 <dt>Return Type:</dt>
217 <dd>
218 bool
219 </dd>
220 </dl><a NAME="E5TextEditSearchWidget.__setFindtextComboBackground" ID="E5TextEditSearchWidget.__setFindtextComboBackground"></a>
221 <h4>E5TextEditSearchWidget.__setFindtextComboBackground</h4>
222 <b>__setFindtextComboBackground</b>(<i>error</i>)
223 <p>
224 Private slot to change the findtext combo background to indicate
225 errors.
226 </p><dl>
227 <dt><i>error</i></dt>
228 <dd>
229 flag indicating an error condition (boolean)
230 </dd>
231 </dl><a NAME="E5TextEditSearchWidget.__setSearchButtons" ID="E5TextEditSearchWidget.__setSearchButtons"></a>
232 <h4>E5TextEditSearchWidget.__setSearchButtons</h4>
233 <b>__setSearchButtons</b>(<i>enabled</i>)
234 <p>
235 Private slot to set the state of the search buttons.
236 </p><dl>
237 <dt><i>enabled</i></dt>
238 <dd>
239 flag indicating the state (boolean)
240 </dd>
241 </dl><a NAME="E5TextEditSearchWidget.__setupUi" ID="E5TextEditSearchWidget.__setupUi"></a>
242 <h4>E5TextEditSearchWidget.__setupUi</h4>
243 <b>__setupUi</b>(<i>widthForHeight</i>)
244 <p>
245 Private method to generate the UI.
246 </p><dl>
247 <dt><i>widthForHeight</i> (bool)</dt>
248 <dd>
249 flag indicating to prefer width for height
250 </dd>
251 </dl><a NAME="E5TextEditSearchWidget.attachTextEdit" ID="E5TextEditSearchWidget.attachTextEdit"></a>
252 <h4>E5TextEditSearchWidget.attachTextEdit</h4>
253 <b>attachTextEdit</b>(<i>textedit, editType="QTextEdit"</i>)
254 <p>
255 Public method to attach a QTextEdit widget.
256 </p><dl>
257 <dt><i>textedit</i> (QTextEdit, QWebEngineView or QWebView)</dt>
258 <dd>
259 reference to the edit widget to be attached
260 </dd><dt><i>editType</i> (str (one of "QTextEdit", "QWebEngineView" or "QWebView"))</dt>
261 <dd>
262 type of the attached edit widget
263 </dd>
264 </dl><a NAME="E5TextEditSearchWidget.keyPressEvent" ID="E5TextEditSearchWidget.keyPressEvent"></a>
265 <h4>E5TextEditSearchWidget.keyPressEvent</h4>
266 <b>keyPressEvent</b>(<i>event</i>)
267 <p>
268 Protected slot to handle key press events.
269 </p><dl>
270 <dt><i>event</i></dt>
271 <dd>
272 reference to the key press event (QKeyEvent)
273 </dd>
274 </dl><a NAME="E5TextEditSearchWidget.on_findNextButton_clicked" ID="E5TextEditSearchWidget.on_findNextButton_clicked"></a>
275 <h4>E5TextEditSearchWidget.on_findNextButton_clicked</h4>
276 <b>on_findNextButton_clicked</b>(<i></i>)
277 <p>
278 Private slot to find the next occurrence.
279 </p><a NAME="E5TextEditSearchWidget.on_findPrevButton_clicked" ID="E5TextEditSearchWidget.on_findPrevButton_clicked"></a>
280 <h4>E5TextEditSearchWidget.on_findPrevButton_clicked</h4>
281 <b>on_findPrevButton_clicked</b>(<i></i>)
282 <p>
283 Private slot to find the previous occurrence.
284 </p><a NAME="E5TextEditSearchWidget.on_findtextCombo_editTextChanged" ID="E5TextEditSearchWidget.on_findtextCombo_editTextChanged"></a>
285 <h4>E5TextEditSearchWidget.on_findtextCombo_editTextChanged</h4>
286 <b>on_findtextCombo_editTextChanged</b>(<i>txt</i>)
287 <p>
288 Private slot to enable/disable the find buttons.
289 </p><dl>
290 <dt><i>txt</i></dt>
291 <dd>
292 text of the combobox (string)
293 </dd>
294 </dl><a NAME="E5TextEditSearchWidget.setWidthForHeight" ID="E5TextEditSearchWidget.setWidthForHeight"></a>
295 <h4>E5TextEditSearchWidget.setWidthForHeight</h4>
296 <b>setWidthForHeight</b>(<i>widthForHeight</i>)
297 <p>
298 Public method to set the 'width for height'.
299 </p><dl>
300 <dt><i>widthForHeight</i> (bool)</dt>
301 <dd>
302 flag indicating to prefer width
303 </dd>
304 </dl>
305 <div align="right"><a href="#top">Up</a></div>
306 <hr />
307 </body></html>

eric ide

mercurial