|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.UI.FindLocationWidget</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.UI.FindLocationWidget</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing a dialog to search for files. |
|
13 </p> |
|
14 <h3>Global Attributes</h3> |
|
15 |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 |
|
21 <table> |
|
22 |
|
23 <tr> |
|
24 <td><a href="#FindLocationDialog">FindLocationDialog</a></td> |
|
25 <td>Class implementing a dialog to search for files.</td> |
|
26 </tr> |
|
27 <tr> |
|
28 <td><a href="#FindLocationWidget">FindLocationWidget</a></td> |
|
29 <td>Class implementing a widget to search for files.</td> |
|
30 </tr> |
|
31 </table> |
|
32 <h3>Functions</h3> |
|
33 |
|
34 <table> |
|
35 <tr><td>None</td></tr> |
|
36 </table> |
|
37 <hr /> |
|
38 <hr /> |
|
39 <a NAME="FindLocationDialog" ID="FindLocationDialog"></a> |
|
40 <h2>FindLocationDialog</h2> |
|
41 |
|
42 <p> |
|
43 Class implementing a dialog to search for files. |
|
44 </p> |
|
45 <p> |
|
46 The occurrences found are displayed in a QTreeWidget showing the |
|
47 filename and the pathname. The file will be opened upon a double click |
|
48 onto the respective entry of the list or by pressing the open button. |
|
49 </p> |
|
50 <h3>Signals</h3> |
|
51 <dl> |
|
52 |
|
53 <dt>designerFile(str)</dt> |
|
54 <dd> |
|
55 emitted to open a Qt-Designer file |
|
56 </dd> |
|
57 <dt>linguistFile(str)</dt> |
|
58 <dd> |
|
59 emitted to open a Qt-Linguist (*.ts) file |
|
60 </dd> |
|
61 <dt>pixmapFile(str)</dt> |
|
62 <dd> |
|
63 emitted to open a pixmap file |
|
64 </dd> |
|
65 <dt>sourceFile(str)</dt> |
|
66 <dd> |
|
67 emitted to open a file in the editor |
|
68 </dd> |
|
69 <dt>svgFile(str)</dt> |
|
70 <dd> |
|
71 emitted to open a SVG file |
|
72 </dd> |
|
73 <dt>trpreview([str])</dt> |
|
74 <dd> |
|
75 emitted to preview Qt-Linguist (*.qm) files |
|
76 </dd> |
|
77 <dt>umlFile(str)</dt> |
|
78 <dd> |
|
79 emitted to open an eric UML file |
|
80 </dd> |
|
81 </dl> |
|
82 <h3>Derived from</h3> |
|
83 QDialog |
|
84 <h3>Class Attributes</h3> |
|
85 |
|
86 <table> |
|
87 <tr><td>None</td></tr> |
|
88 </table> |
|
89 <h3>Class Methods</h3> |
|
90 |
|
91 <table> |
|
92 <tr><td>None</td></tr> |
|
93 </table> |
|
94 <h3>Methods</h3> |
|
95 |
|
96 <table> |
|
97 |
|
98 <tr> |
|
99 <td><a href="#FindLocationDialog.__init__">FindLocationDialog</a></td> |
|
100 <td>Constructor</td> |
|
101 </tr> |
|
102 <tr> |
|
103 <td><a href="#FindLocationDialog.activate">activate</a></td> |
|
104 <td>Public method to activate the dialog.</td> |
|
105 </tr> |
|
106 </table> |
|
107 <h3>Static Methods</h3> |
|
108 |
|
109 <table> |
|
110 <tr><td>None</td></tr> |
|
111 </table> |
|
112 |
|
113 <a NAME="FindLocationDialog.__init__" ID="FindLocationDialog.__init__"></a> |
|
114 <h4>FindLocationDialog (Constructor)</h4> |
|
115 <b>FindLocationDialog</b>(<i>project, parent=None</i>) |
|
116 |
|
117 <p> |
|
118 Constructor |
|
119 </p> |
|
120 <dl> |
|
121 |
|
122 <dt><i>project</i> (Project)</dt> |
|
123 <dd> |
|
124 reference to the project object |
|
125 </dd> |
|
126 <dt><i>parent</i> (QWidget (optional))</dt> |
|
127 <dd> |
|
128 parent widget of this dialog (defaults to None) |
|
129 </dd> |
|
130 </dl> |
|
131 <a NAME="FindLocationDialog.activate" ID="FindLocationDialog.activate"></a> |
|
132 <h4>FindLocationDialog.activate</h4> |
|
133 <b>activate</b>(<i></i>) |
|
134 |
|
135 <p> |
|
136 Public method to activate the dialog. |
|
137 </p> |
|
138 <div align="right"><a href="#top">Up</a></div> |
|
139 <hr /> |
|
140 <hr /> |
|
141 <a NAME="FindLocationWidget" ID="FindLocationWidget"></a> |
|
142 <h2>FindLocationWidget</h2> |
|
143 |
|
144 <p> |
|
145 Class implementing a widget to search for files. |
|
146 </p> |
|
147 <p> |
|
148 The occurrences found are displayed in a QTreeWidget showing the |
|
149 filename and the pathname. The file will be opened upon a double click |
|
150 onto the respective entry of the list or by pressing the open button. |
|
151 </p> |
|
152 <h3>Signals</h3> |
|
153 <dl> |
|
154 |
|
155 <dt>designerFile(str)</dt> |
|
156 <dd> |
|
157 emitted to open a Qt-Designer file |
|
158 </dd> |
|
159 <dt>linguistFile(str)</dt> |
|
160 <dd> |
|
161 emitted to open a Qt-Linguist (*.ts) file |
|
162 </dd> |
|
163 <dt>pixmapFile(str)</dt> |
|
164 <dd> |
|
165 emitted to open a pixmap file |
|
166 </dd> |
|
167 <dt>sourceFile(str)</dt> |
|
168 <dd> |
|
169 emitted to open a file in the editor |
|
170 </dd> |
|
171 <dt>svgFile(str)</dt> |
|
172 <dd> |
|
173 emitted to open a SVG file |
|
174 </dd> |
|
175 <dt>trpreview([str])</dt> |
|
176 <dd> |
|
177 emitted to preview Qt-Linguist (*.qm) files |
|
178 </dd> |
|
179 <dt>umlFile(str)</dt> |
|
180 <dd> |
|
181 emitted to open an eric UML file |
|
182 </dd> |
|
183 </dl> |
|
184 <h3>Derived from</h3> |
|
185 QWidget, Ui_FindLocationWidget |
|
186 <h3>Class Attributes</h3> |
|
187 |
|
188 <table> |
|
189 <tr><td>None</td></tr> |
|
190 </table> |
|
191 <h3>Class Methods</h3> |
|
192 |
|
193 <table> |
|
194 <tr><td>None</td></tr> |
|
195 </table> |
|
196 <h3>Methods</h3> |
|
197 |
|
198 <table> |
|
199 |
|
200 <tr> |
|
201 <td><a href="#FindLocationWidget.__init__">FindLocationWidget</a></td> |
|
202 <td>Constructor</td> |
|
203 </tr> |
|
204 <tr> |
|
205 <td><a href="#FindLocationWidget.__clearResults">__clearResults</a></td> |
|
206 <td>Private slot to clear the current search results.</td> |
|
207 </tr> |
|
208 <tr> |
|
209 <td><a href="#FindLocationWidget.__openFile">__openFile</a></td> |
|
210 <td>Private slot to open a file.</td> |
|
211 </tr> |
|
212 <tr> |
|
213 <td><a href="#FindLocationWidget.__projectClosed">__projectClosed</a></td> |
|
214 <td>Private slot to handle a project being closed.</td> |
|
215 </tr> |
|
216 <tr> |
|
217 <td><a href="#FindLocationWidget.__projectOpened">__projectOpened</a></td> |
|
218 <td>Private slot to handle a project being opened.</td> |
|
219 </tr> |
|
220 <tr> |
|
221 <td><a href="#FindLocationWidget.__searchFile">__searchFile</a></td> |
|
222 <td>Private slot to handle the search.</td> |
|
223 </tr> |
|
224 <tr> |
|
225 <td><a href="#FindLocationWidget.__stopSearch">__stopSearch</a></td> |
|
226 <td>Private slot to handle the stop button being pressed.</td> |
|
227 </tr> |
|
228 <tr> |
|
229 <td><a href="#FindLocationWidget.activate">activate</a></td> |
|
230 <td>Public slot to activate this widget.</td> |
|
231 </tr> |
|
232 <tr> |
|
233 <td><a href="#FindLocationWidget.checkStop">checkStop</a></td> |
|
234 <td>Public method to check, if the search should be stopped.</td> |
|
235 </tr> |
|
236 <tr> |
|
237 <td><a href="#FindLocationWidget.on_fileList_currentItemChanged">on_fileList_currentItemChanged</a></td> |
|
238 <td>Private slot handling a change of the current item.</td> |
|
239 </tr> |
|
240 <tr> |
|
241 <td><a href="#FindLocationWidget.on_fileList_itemActivated">on_fileList_itemActivated</a></td> |
|
242 <td>Private slot to handle the double click on a file item.</td> |
|
243 </tr> |
|
244 <tr> |
|
245 <td><a href="#FindLocationWidget.on_searchDirPicker_textChanged">on_searchDirPicker_textChanged</a></td> |
|
246 <td>Private slot to handle the textChanged signal of the search directory edit.</td> |
|
247 </tr> |
|
248 </table> |
|
249 <h3>Static Methods</h3> |
|
250 |
|
251 <table> |
|
252 <tr><td>None</td></tr> |
|
253 </table> |
|
254 |
|
255 <a NAME="FindLocationWidget.__init__" ID="FindLocationWidget.__init__"></a> |
|
256 <h4>FindLocationWidget (Constructor)</h4> |
|
257 <b>FindLocationWidget</b>(<i>project, parent=None</i>) |
|
258 |
|
259 <p> |
|
260 Constructor |
|
261 </p> |
|
262 <dl> |
|
263 |
|
264 <dt><i>project</i> (Project)</dt> |
|
265 <dd> |
|
266 reference to the project object |
|
267 </dd> |
|
268 <dt><i>parent</i> (QWidget)</dt> |
|
269 <dd> |
|
270 parent widget of this dialog |
|
271 </dd> |
|
272 </dl> |
|
273 <a NAME="FindLocationWidget.__clearResults" ID="FindLocationWidget.__clearResults"></a> |
|
274 <h4>FindLocationWidget.__clearResults</h4> |
|
275 <b>__clearResults</b>(<i></i>) |
|
276 |
|
277 <p> |
|
278 Private slot to clear the current search results. |
|
279 </p> |
|
280 <a NAME="FindLocationWidget.__openFile" ID="FindLocationWidget.__openFile"></a> |
|
281 <h4>FindLocationWidget.__openFile</h4> |
|
282 <b>__openFile</b>(<i>itm=None</i>) |
|
283 |
|
284 <p> |
|
285 Private slot to open a file. |
|
286 </p> |
|
287 <p> |
|
288 It emits a signal depending on the file extension. |
|
289 </p> |
|
290 <dl> |
|
291 |
|
292 <dt><i>itm</i> (QTreeWidgetItem)</dt> |
|
293 <dd> |
|
294 item to be opened |
|
295 </dd> |
|
296 </dl> |
|
297 <a NAME="FindLocationWidget.__projectClosed" ID="FindLocationWidget.__projectClosed"></a> |
|
298 <h4>FindLocationWidget.__projectClosed</h4> |
|
299 <b>__projectClosed</b>(<i></i>) |
|
300 |
|
301 <p> |
|
302 Private slot to handle a project being closed. |
|
303 </p> |
|
304 <a NAME="FindLocationWidget.__projectOpened" ID="FindLocationWidget.__projectOpened"></a> |
|
305 <h4>FindLocationWidget.__projectOpened</h4> |
|
306 <b>__projectOpened</b>(<i></i>) |
|
307 |
|
308 <p> |
|
309 Private slot to handle a project being opened. |
|
310 </p> |
|
311 <a NAME="FindLocationWidget.__searchFile" ID="FindLocationWidget.__searchFile"></a> |
|
312 <h4>FindLocationWidget.__searchFile</h4> |
|
313 <b>__searchFile</b>(<i></i>) |
|
314 |
|
315 <p> |
|
316 Private slot to handle the search. |
|
317 </p> |
|
318 <a NAME="FindLocationWidget.__stopSearch" ID="FindLocationWidget.__stopSearch"></a> |
|
319 <h4>FindLocationWidget.__stopSearch</h4> |
|
320 <b>__stopSearch</b>(<i></i>) |
|
321 |
|
322 <p> |
|
323 Private slot to handle the stop button being pressed. |
|
324 </p> |
|
325 <a NAME="FindLocationWidget.activate" ID="FindLocationWidget.activate"></a> |
|
326 <h4>FindLocationWidget.activate</h4> |
|
327 <b>activate</b>(<i></i>) |
|
328 |
|
329 <p> |
|
330 Public slot to activate this widget. |
|
331 </p> |
|
332 <a NAME="FindLocationWidget.checkStop" ID="FindLocationWidget.checkStop"></a> |
|
333 <h4>FindLocationWidget.checkStop</h4> |
|
334 <b>checkStop</b>(<i></i>) |
|
335 |
|
336 <p> |
|
337 Public method to check, if the search should be stopped. |
|
338 </p> |
|
339 <dl> |
|
340 <dt>Return:</dt> |
|
341 <dd> |
|
342 flag indicating the search should be stopped |
|
343 </dd> |
|
344 </dl> |
|
345 <dl> |
|
346 <dt>Return Type:</dt> |
|
347 <dd> |
|
348 bool |
|
349 </dd> |
|
350 </dl> |
|
351 <a NAME="FindLocationWidget.on_fileList_currentItemChanged" ID="FindLocationWidget.on_fileList_currentItemChanged"></a> |
|
352 <h4>FindLocationWidget.on_fileList_currentItemChanged</h4> |
|
353 <b>on_fileList_currentItemChanged</b>(<i>current, previous</i>) |
|
354 |
|
355 <p> |
|
356 Private slot handling a change of the current item. |
|
357 </p> |
|
358 <dl> |
|
359 |
|
360 <dt><i>current</i> (QTreeWidgetItem)</dt> |
|
361 <dd> |
|
362 current item |
|
363 </dd> |
|
364 <dt><i>previous</i> (QTreeWidgetItem)</dt> |
|
365 <dd> |
|
366 prevoius current item |
|
367 </dd> |
|
368 </dl> |
|
369 <a NAME="FindLocationWidget.on_fileList_itemActivated" ID="FindLocationWidget.on_fileList_itemActivated"></a> |
|
370 <h4>FindLocationWidget.on_fileList_itemActivated</h4> |
|
371 <b>on_fileList_itemActivated</b>(<i>itm, column</i>) |
|
372 |
|
373 <p> |
|
374 Private slot to handle the double click on a file item. |
|
375 </p> |
|
376 <p> |
|
377 It emits the signal sourceFile or designerFile depending on the |
|
378 file extension. |
|
379 </p> |
|
380 <dl> |
|
381 |
|
382 <dt><i>itm</i> (QTreeWidgetItem)</dt> |
|
383 <dd> |
|
384 the double clicked listview item |
|
385 </dd> |
|
386 <dt><i>column</i> (int)</dt> |
|
387 <dd> |
|
388 column that was double clicked (ignored) |
|
389 </dd> |
|
390 </dl> |
|
391 <a NAME="FindLocationWidget.on_searchDirPicker_textChanged" ID="FindLocationWidget.on_searchDirPicker_textChanged"></a> |
|
392 <h4>FindLocationWidget.on_searchDirPicker_textChanged</h4> |
|
393 <b>on_searchDirPicker_textChanged</b>(<i>text</i>) |
|
394 |
|
395 <p> |
|
396 Private slot to handle the textChanged signal of the search directory |
|
397 edit. |
|
398 </p> |
|
399 <dl> |
|
400 |
|
401 <dt><i>text</i> (str)</dt> |
|
402 <dd> |
|
403 text of the search dir edit |
|
404 </dd> |
|
405 </dl> |
|
406 <div align="right"><a href="#top">Up</a></div> |
|
407 <hr /> |
|
408 </body></html> |