|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.UI.FindFileNameDialog</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.FindFileNameDialog</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="#FindFileNameDialog">FindFileNameDialog</a></td> |
|
25 <td>Class implementing a dialog to search for files.</td> |
|
26 </tr> |
|
27 </table> |
|
28 <h3>Functions</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <hr /> |
|
34 <hr /> |
|
35 <a NAME="FindFileNameDialog" ID="FindFileNameDialog"></a> |
|
36 <h2>FindFileNameDialog</h2> |
|
37 |
|
38 <p> |
|
39 Class implementing a dialog to search for files. |
|
40 </p> |
|
41 <p> |
|
42 The occurrences found are displayed in a QTreeWidget showing the |
|
43 filename and the pathname. The file will be opened upon a double click |
|
44 onto the respective entry of the list. |
|
45 </p> |
|
46 <h3>Signals</h3> |
|
47 <dl> |
|
48 |
|
49 <dt>designerFile(str)</dt> |
|
50 <dd> |
|
51 emitted to open a Qt-Designer file |
|
52 </dd> |
|
53 <dt>sourceFile(str)</dt> |
|
54 <dd> |
|
55 emitted to open a file in the editor |
|
56 </dd> |
|
57 </dl> |
|
58 <h3>Derived from</h3> |
|
59 QWidget, Ui_FindFileNameDialog |
|
60 <h3>Class Attributes</h3> |
|
61 |
|
62 <table> |
|
63 <tr><td>None</td></tr> |
|
64 </table> |
|
65 <h3>Class Methods</h3> |
|
66 |
|
67 <table> |
|
68 <tr><td>None</td></tr> |
|
69 </table> |
|
70 <h3>Methods</h3> |
|
71 |
|
72 <table> |
|
73 |
|
74 <tr> |
|
75 <td><a href="#FindFileNameDialog.__init__">FindFileNameDialog</a></td> |
|
76 <td>Constructor</td> |
|
77 </tr> |
|
78 <tr> |
|
79 <td><a href="#FindFileNameDialog.__openFile">__openFile</a></td> |
|
80 <td>Private slot to open a file.</td> |
|
81 </tr> |
|
82 <tr> |
|
83 <td><a href="#FindFileNameDialog.__searchFile">__searchFile</a></td> |
|
84 <td>Private slot to handle the search.</td> |
|
85 </tr> |
|
86 <tr> |
|
87 <td><a href="#FindFileNameDialog.checkStop">checkStop</a></td> |
|
88 <td>Public method to check, if the search should be stopped.</td> |
|
89 </tr> |
|
90 <tr> |
|
91 <td><a href="#FindFileNameDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> |
|
92 <td>Private slot called by a button of the button box clicked.</td> |
|
93 </tr> |
|
94 <tr> |
|
95 <td><a href="#FindFileNameDialog.on_fileExtEdit_textChanged">on_fileExtEdit_textChanged</a></td> |
|
96 <td>Private slot to handle the textChanged signal of the file extension edit.</td> |
|
97 </tr> |
|
98 <tr> |
|
99 <td><a href="#FindFileNameDialog.on_fileList_currentItemChanged">on_fileList_currentItemChanged</a></td> |
|
100 <td>Private slot handling a change of the current item.</td> |
|
101 </tr> |
|
102 <tr> |
|
103 <td><a href="#FindFileNameDialog.on_fileList_itemActivated">on_fileList_itemActivated</a></td> |
|
104 <td>Private slot to handle the double click on a file item.</td> |
|
105 </tr> |
|
106 <tr> |
|
107 <td><a href="#FindFileNameDialog.on_fileNameEdit_textChanged">on_fileNameEdit_textChanged</a></td> |
|
108 <td>Private slot to handle the textChanged signal of the file name edit.</td> |
|
109 </tr> |
|
110 <tr> |
|
111 <td><a href="#FindFileNameDialog.on_projectCheckBox_toggled">on_projectCheckBox_toggled</a></td> |
|
112 <td>Private slot to handle the toggled signal of the project checkbox.</td> |
|
113 </tr> |
|
114 <tr> |
|
115 <td><a href="#FindFileNameDialog.on_searchDirCheckBox_toggled">on_searchDirCheckBox_toggled</a></td> |
|
116 <td>Private slot to handle the toggled signal of the search directory checkbox.</td> |
|
117 </tr> |
|
118 <tr> |
|
119 <td><a href="#FindFileNameDialog.on_searchDirPicker_textChanged">on_searchDirPicker_textChanged</a></td> |
|
120 <td>Private slot to handle the textChanged signal of the search directory edit.</td> |
|
121 </tr> |
|
122 <tr> |
|
123 <td><a href="#FindFileNameDialog.on_syspathCheckBox_toggled">on_syspathCheckBox_toggled</a></td> |
|
124 <td>Private slot to handle the toggled signal of the sys.path checkbox.</td> |
|
125 </tr> |
|
126 <tr> |
|
127 <td><a href="#FindFileNameDialog.show">show</a></td> |
|
128 <td>Public method to enable/disable the project checkbox.</td> |
|
129 </tr> |
|
130 </table> |
|
131 <h3>Static Methods</h3> |
|
132 |
|
133 <table> |
|
134 <tr><td>None</td></tr> |
|
135 </table> |
|
136 |
|
137 <a NAME="FindFileNameDialog.__init__" ID="FindFileNameDialog.__init__"></a> |
|
138 <h4>FindFileNameDialog (Constructor)</h4> |
|
139 <b>FindFileNameDialog</b>(<i>project, parent=None</i>) |
|
140 |
|
141 <p> |
|
142 Constructor |
|
143 </p> |
|
144 <dl> |
|
145 |
|
146 <dt><i>project</i></dt> |
|
147 <dd> |
|
148 reference to the project object |
|
149 </dd> |
|
150 <dt><i>parent</i></dt> |
|
151 <dd> |
|
152 parent widget of this dialog (QWidget) |
|
153 </dd> |
|
154 </dl> |
|
155 <a NAME="FindFileNameDialog.__openFile" ID="FindFileNameDialog.__openFile"></a> |
|
156 <h4>FindFileNameDialog.__openFile</h4> |
|
157 <b>__openFile</b>(<i>itm=None</i>) |
|
158 |
|
159 <p> |
|
160 Private slot to open a file. |
|
161 </p> |
|
162 <p> |
|
163 It emits the signal sourceFile or designerFile depending on the |
|
164 file extension. |
|
165 </p> |
|
166 <dl> |
|
167 |
|
168 <dt><i>itm</i></dt> |
|
169 <dd> |
|
170 item to be opened (QTreeWidgetItem) |
|
171 </dd> |
|
172 </dl> |
|
173 <a NAME="FindFileNameDialog.__searchFile" ID="FindFileNameDialog.__searchFile"></a> |
|
174 <h4>FindFileNameDialog.__searchFile</h4> |
|
175 <b>__searchFile</b>(<i></i>) |
|
176 |
|
177 <p> |
|
178 Private slot to handle the search. |
|
179 </p> |
|
180 <a NAME="FindFileNameDialog.checkStop" ID="FindFileNameDialog.checkStop"></a> |
|
181 <h4>FindFileNameDialog.checkStop</h4> |
|
182 <b>checkStop</b>(<i></i>) |
|
183 |
|
184 <p> |
|
185 Public method to check, if the search should be stopped. |
|
186 </p> |
|
187 <dl> |
|
188 <dt>Return:</dt> |
|
189 <dd> |
|
190 flag indicating the search should be stopped (boolean) |
|
191 </dd> |
|
192 </dl> |
|
193 <a NAME="FindFileNameDialog.on_buttonBox_clicked" ID="FindFileNameDialog.on_buttonBox_clicked"></a> |
|
194 <h4>FindFileNameDialog.on_buttonBox_clicked</h4> |
|
195 <b>on_buttonBox_clicked</b>(<i>button</i>) |
|
196 |
|
197 <p> |
|
198 Private slot called by a button of the button box clicked. |
|
199 </p> |
|
200 <dl> |
|
201 |
|
202 <dt><i>button</i></dt> |
|
203 <dd> |
|
204 button that was clicked (QAbstractButton) |
|
205 </dd> |
|
206 </dl> |
|
207 <a NAME="FindFileNameDialog.on_fileExtEdit_textChanged" ID="FindFileNameDialog.on_fileExtEdit_textChanged"></a> |
|
208 <h4>FindFileNameDialog.on_fileExtEdit_textChanged</h4> |
|
209 <b>on_fileExtEdit_textChanged</b>(<i>text</i>) |
|
210 |
|
211 <p> |
|
212 Private slot to handle the textChanged signal of the file extension |
|
213 edit. |
|
214 </p> |
|
215 <dl> |
|
216 |
|
217 <dt><i>text</i></dt> |
|
218 <dd> |
|
219 (ignored) |
|
220 </dd> |
|
221 </dl> |
|
222 <a NAME="FindFileNameDialog.on_fileList_currentItemChanged" ID="FindFileNameDialog.on_fileList_currentItemChanged"></a> |
|
223 <h4>FindFileNameDialog.on_fileList_currentItemChanged</h4> |
|
224 <b>on_fileList_currentItemChanged</b>(<i>current, previous</i>) |
|
225 |
|
226 <p> |
|
227 Private slot handling a change of the current item. |
|
228 </p> |
|
229 <dl> |
|
230 |
|
231 <dt><i>current</i></dt> |
|
232 <dd> |
|
233 current item (QTreeWidgetItem) |
|
234 </dd> |
|
235 <dt><i>previous</i></dt> |
|
236 <dd> |
|
237 prevoius current item (QTreeWidgetItem) |
|
238 </dd> |
|
239 </dl> |
|
240 <a NAME="FindFileNameDialog.on_fileList_itemActivated" ID="FindFileNameDialog.on_fileList_itemActivated"></a> |
|
241 <h4>FindFileNameDialog.on_fileList_itemActivated</h4> |
|
242 <b>on_fileList_itemActivated</b>(<i>itm, column</i>) |
|
243 |
|
244 <p> |
|
245 Private slot to handle the double click on a file item. |
|
246 </p> |
|
247 <p> |
|
248 It emits the signal sourceFile or designerFile depending on the |
|
249 file extension. |
|
250 </p> |
|
251 <dl> |
|
252 |
|
253 <dt><i>itm</i></dt> |
|
254 <dd> |
|
255 the double clicked listview item (QTreeWidgetItem) |
|
256 </dd> |
|
257 <dt><i>column</i></dt> |
|
258 <dd> |
|
259 column that was double clicked (integer) (ignored) |
|
260 </dd> |
|
261 </dl> |
|
262 <a NAME="FindFileNameDialog.on_fileNameEdit_textChanged" ID="FindFileNameDialog.on_fileNameEdit_textChanged"></a> |
|
263 <h4>FindFileNameDialog.on_fileNameEdit_textChanged</h4> |
|
264 <b>on_fileNameEdit_textChanged</b>(<i>text</i>) |
|
265 |
|
266 <p> |
|
267 Private slot to handle the textChanged signal of the file name edit. |
|
268 </p> |
|
269 <dl> |
|
270 |
|
271 <dt><i>text</i></dt> |
|
272 <dd> |
|
273 (ignored) |
|
274 </dd> |
|
275 </dl> |
|
276 <a NAME="FindFileNameDialog.on_projectCheckBox_toggled" ID="FindFileNameDialog.on_projectCheckBox_toggled"></a> |
|
277 <h4>FindFileNameDialog.on_projectCheckBox_toggled</h4> |
|
278 <b>on_projectCheckBox_toggled</b>(<i>checked</i>) |
|
279 |
|
280 <p> |
|
281 Private slot to handle the toggled signal of the project checkbox. |
|
282 </p> |
|
283 <dl> |
|
284 |
|
285 <dt><i>checked</i></dt> |
|
286 <dd> |
|
287 flag indicating the state of the checkbox (boolean) |
|
288 </dd> |
|
289 </dl> |
|
290 <a NAME="FindFileNameDialog.on_searchDirCheckBox_toggled" ID="FindFileNameDialog.on_searchDirCheckBox_toggled"></a> |
|
291 <h4>FindFileNameDialog.on_searchDirCheckBox_toggled</h4> |
|
292 <b>on_searchDirCheckBox_toggled</b>(<i>checked</i>) |
|
293 |
|
294 <p> |
|
295 Private slot to handle the toggled signal of the search directory |
|
296 checkbox. |
|
297 </p> |
|
298 <dl> |
|
299 |
|
300 <dt><i>checked</i></dt> |
|
301 <dd> |
|
302 flag indicating the state of the checkbox (boolean) |
|
303 </dd> |
|
304 </dl> |
|
305 <a NAME="FindFileNameDialog.on_searchDirPicker_textChanged" ID="FindFileNameDialog.on_searchDirPicker_textChanged"></a> |
|
306 <h4>FindFileNameDialog.on_searchDirPicker_textChanged</h4> |
|
307 <b>on_searchDirPicker_textChanged</b>(<i>text</i>) |
|
308 |
|
309 <p> |
|
310 Private slot to handle the textChanged signal of the search directory |
|
311 edit. |
|
312 </p> |
|
313 <dl> |
|
314 |
|
315 <dt><i>text</i></dt> |
|
316 <dd> |
|
317 text of the search dir edit (string) |
|
318 </dd> |
|
319 </dl> |
|
320 <a NAME="FindFileNameDialog.on_syspathCheckBox_toggled" ID="FindFileNameDialog.on_syspathCheckBox_toggled"></a> |
|
321 <h4>FindFileNameDialog.on_syspathCheckBox_toggled</h4> |
|
322 <b>on_syspathCheckBox_toggled</b>(<i>checked</i>) |
|
323 |
|
324 <p> |
|
325 Private slot to handle the toggled signal of the sys.path checkbox. |
|
326 </p> |
|
327 <dl> |
|
328 |
|
329 <dt><i>checked</i></dt> |
|
330 <dd> |
|
331 flag indicating the state of the checkbox (boolean) |
|
332 </dd> |
|
333 </dl> |
|
334 <a NAME="FindFileNameDialog.show" ID="FindFileNameDialog.show"></a> |
|
335 <h4>FindFileNameDialog.show</h4> |
|
336 <b>show</b>(<i></i>) |
|
337 |
|
338 <p> |
|
339 Public method to enable/disable the project checkbox. |
|
340 </p> |
|
341 <div align="right"><a href="#top">Up</a></div> |
|
342 <hr /> |
|
343 </body></html> |