eric7/Documentation/Source/eric7.Project.QuickFindFileDialog.html

branch
eric7
changeset 8372
e0227a7c850e
child 8596
d64760b2da50
equal deleted inserted replaced
8371:d6062691d424 8372:e0227a7c850e
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.Project.QuickFindFileDialog</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>
22 <a NAME="top" ID="top"></a>
23 <h1>eric7.Project.QuickFindFileDialog</h1>
24
25 <p>
26 Module implementing a quick search for files.
27 </p>
28 <p>
29 This is basically the FindFileNameDialog modified to support faster
30 interactions.
31 </p>
32 <h3>Global Attributes</h3>
33
34 <table>
35 <tr><td>None</td></tr>
36 </table>
37 <h3>Classes</h3>
38
39 <table>
40
41 <tr>
42 <td><a href="#QuickFindFileDialog">QuickFindFileDialog</a></td>
43 <td>Class implementing the Quick Find File by Name Dialog.</td>
44 </tr>
45 </table>
46 <h3>Functions</h3>
47
48 <table>
49 <tr><td>None</td></tr>
50 </table>
51 <hr />
52 <hr />
53 <a NAME="QuickFindFileDialog" ID="QuickFindFileDialog"></a>
54 <h2>QuickFindFileDialog</h2>
55
56 <p>
57 Class implementing the Quick Find File by Name Dialog.
58 </p>
59 <p>
60 This dialog provides a slightly more streamlined behaviour
61 than the standard FindFileNameDialog in that it tries to
62 match any name in the project against (fragmentary) bits of
63 file names.
64 </p>
65 <h3>Signals</h3>
66 <dl>
67
68 <dt>designerFile(str)</dt>
69 <dd>
70 emitted to open a Qt-Designer file
71 </dd>
72 <dt>linguistFile(str)</dt>
73 <dd>
74 emitted to open a Qt translation file
75 </dd>
76 <dt>sourceFile(str)</dt>
77 <dd>
78 emitted to open a file in the editor
79 </dd>
80 </dl>
81 <h3>Derived from</h3>
82 QWidget, Ui_QuickFindFile
83 <h3>Class Attributes</h3>
84
85 <table>
86 <tr><td>None</td></tr>
87 </table>
88 <h3>Class Methods</h3>
89
90 <table>
91 <tr><td>None</td></tr>
92 </table>
93 <h3>Methods</h3>
94
95 <table>
96
97 <tr>
98 <td><a href="#QuickFindFileDialog.__init__">QuickFindFileDialog</a></td>
99 <td>Constructor</td>
100 </tr>
101 <tr>
102 <td><a href="#QuickFindFileDialog.__generateLocations">__generateLocations</a></td>
103 <td>Private method to generate a set of locations that can be searched.</td>
104 </tr>
105 <tr>
106 <td><a href="#QuickFindFileDialog.__openFile">__openFile</a></td>
107 <td>Private slot to open a file.</td>
108 </tr>
109 <tr>
110 <td><a href="#QuickFindFileDialog.__searchFile">__searchFile</a></td>
111 <td>Private slot to handle the search.</td>
112 </tr>
113 <tr>
114 <td><a href="#QuickFindFileDialog.__sortedMatches">__sortedMatches</a></td>
115 <td>Private method to find the subset of items which match a search term.</td>
116 </tr>
117 <tr>
118 <td><a href="#QuickFindFileDialog.eventFilter">eventFilter</a></td>
119 <td>Public method to handle event for another object.</td>
120 </tr>
121 <tr>
122 <td><a href="#QuickFindFileDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td>
123 <td>Private slot called by a button of the button box clicked.</td>
124 </tr>
125 <tr>
126 <td><a href="#QuickFindFileDialog.on_fileList_currentItemChanged">on_fileList_currentItemChanged</a></td>
127 <td>Private slot handling a change of the current item.</td>
128 </tr>
129 <tr>
130 <td><a href="#QuickFindFileDialog.on_fileList_itemActivated">on_fileList_itemActivated</a></td>
131 <td>Private slot to handle the double click on a file item.</td>
132 </tr>
133 <tr>
134 <td><a href="#QuickFindFileDialog.on_fileNameEdit_returnPressed">on_fileNameEdit_returnPressed</a></td>
135 <td>Private slot to handle enter being pressed on the file name edit box.</td>
136 </tr>
137 <tr>
138 <td><a href="#QuickFindFileDialog.on_fileNameEdit_textChanged">on_fileNameEdit_textChanged</a></td>
139 <td>Private slot to handle the textChanged signal of the file name edit.</td>
140 </tr>
141 <tr>
142 <td><a href="#QuickFindFileDialog.show">show</a></td>
143 <td>Public method to enable/disable the project checkbox.</td>
144 </tr>
145 </table>
146 <h3>Static Methods</h3>
147
148 <table>
149 <tr><td>None</td></tr>
150 </table>
151
152 <a NAME="QuickFindFileDialog.__init__" ID="QuickFindFileDialog.__init__"></a>
153 <h4>QuickFindFileDialog (Constructor)</h4>
154 <b>QuickFindFileDialog</b>(<i>project, parent=None</i>)
155
156 <p>
157 Constructor
158 </p>
159 <dl>
160
161 <dt><i>project</i> (Project)</dt>
162 <dd>
163 reference to the project object
164 </dd>
165 <dt><i>parent</i> (QWidget)</dt>
166 <dd>
167 parent widget of this dialog
168 </dd>
169 </dl>
170 <a NAME="QuickFindFileDialog.__generateLocations" ID="QuickFindFileDialog.__generateLocations"></a>
171 <h4>QuickFindFileDialog.__generateLocations</h4>
172 <b>__generateLocations</b>(<i></i>)
173
174 <p>
175 Private method to generate a set of locations that can be searched.
176 </p>
177 <dl>
178 <dt>Yield:</dt>
179 <dd>
180 set of files in our project
181 </dd>
182 </dl>
183 <dl>
184 <dt>Yield Type:</dt>
185 <dd>
186 str
187 </dd>
188 </dl>
189 <a NAME="QuickFindFileDialog.__openFile" ID="QuickFindFileDialog.__openFile"></a>
190 <h4>QuickFindFileDialog.__openFile</h4>
191 <b>__openFile</b>(<i>itm=None</i>)
192
193 <p>
194 Private slot to open a file.
195 </p>
196 <p>
197 It emits the signal sourceFile or designerFile depending on the
198 file extension.
199 </p>
200 <dl>
201
202 <dt><i>itm</i> (QTreeWidgetItem)</dt>
203 <dd>
204 item to be opened
205 </dd>
206 </dl>
207 <dl>
208 <dt>Return:</dt>
209 <dd>
210 flag indicating a file was opened
211 </dd>
212 </dl>
213 <dl>
214 <dt>Return Type:</dt>
215 <dd>
216 bool
217 </dd>
218 </dl>
219 <a NAME="QuickFindFileDialog.__searchFile" ID="QuickFindFileDialog.__searchFile"></a>
220 <h4>QuickFindFileDialog.__searchFile</h4>
221 <b>__searchFile</b>(<i></i>)
222
223 <p>
224 Private slot to handle the search.
225 </p>
226 <a NAME="QuickFindFileDialog.__sortedMatches" ID="QuickFindFileDialog.__sortedMatches"></a>
227 <h4>QuickFindFileDialog.__sortedMatches</h4>
228 <b>__sortedMatches</b>(<i>items, searchTerm</i>)
229
230 <p>
231 Private method to find the subset of items which match a search term.
232 </p>
233 <dl>
234
235 <dt><i>items</i> (list of str)</dt>
236 <dd>
237 list of items to be scanned for the search term
238 </dd>
239 <dt><i>searchTerm</i> (str)</dt>
240 <dd>
241 search term to be searched for
242 </dd>
243 </dl>
244 <dl>
245 <dt>Return:</dt>
246 <dd>
247 sorted subset of items which match searchTerm in
248 relevance order (i.e. the most likely match first)
249 </dd>
250 </dl>
251 <dl>
252 <dt>Return Type:</dt>
253 <dd>
254 list of tuple of bool, int and str
255 </dd>
256 </dl>
257 <a NAME="QuickFindFileDialog.eventFilter" ID="QuickFindFileDialog.eventFilter"></a>
258 <h4>QuickFindFileDialog.eventFilter</h4>
259 <b>eventFilter</b>(<i>source, event</i>)
260
261 <p>
262 Public method to handle event for another object.
263 </p>
264 <dl>
265
266 <dt><i>source</i> (QObject)</dt>
267 <dd>
268 object to handle events for
269 </dd>
270 <dt><i>event</i> (QEvent)</dt>
271 <dd>
272 event to handle
273 </dd>
274 </dl>
275 <dl>
276 <dt>Return:</dt>
277 <dd>
278 flag indicating that the event was handled
279 </dd>
280 </dl>
281 <dl>
282 <dt>Return Type:</dt>
283 <dd>
284 bool
285 </dd>
286 </dl>
287 <a NAME="QuickFindFileDialog.on_buttonBox_clicked" ID="QuickFindFileDialog.on_buttonBox_clicked"></a>
288 <h4>QuickFindFileDialog.on_buttonBox_clicked</h4>
289 <b>on_buttonBox_clicked</b>(<i>button</i>)
290
291 <p>
292 Private slot called by a button of the button box clicked.
293 </p>
294 <dl>
295
296 <dt><i>button</i></dt>
297 <dd>
298 button that was clicked (QAbstractButton)
299 </dd>
300 </dl>
301 <a NAME="QuickFindFileDialog.on_fileList_currentItemChanged" ID="QuickFindFileDialog.on_fileList_currentItemChanged"></a>
302 <h4>QuickFindFileDialog.on_fileList_currentItemChanged</h4>
303 <b>on_fileList_currentItemChanged</b>(<i>current, previous</i>)
304
305 <p>
306 Private slot handling a change of the current item.
307 </p>
308 <dl>
309
310 <dt><i>current</i></dt>
311 <dd>
312 current item (QTreeWidgetItem)
313 </dd>
314 <dt><i>previous</i></dt>
315 <dd>
316 prevoius current item (QTreeWidgetItem)
317 </dd>
318 </dl>
319 <a NAME="QuickFindFileDialog.on_fileList_itemActivated" ID="QuickFindFileDialog.on_fileList_itemActivated"></a>
320 <h4>QuickFindFileDialog.on_fileList_itemActivated</h4>
321 <b>on_fileList_itemActivated</b>(<i>itm, column</i>)
322
323 <p>
324 Private slot to handle the double click on a file item.
325 </p>
326 <p>
327 It emits the signal sourceFile or designerFile depending on the
328 file extension.
329 </p>
330 <dl>
331
332 <dt><i>itm</i></dt>
333 <dd>
334 the double clicked listview item (QTreeWidgetItem)
335 </dd>
336 <dt><i>column</i></dt>
337 <dd>
338 column that was double clicked (integer) (ignored)
339 </dd>
340 </dl>
341 <a NAME="QuickFindFileDialog.on_fileNameEdit_returnPressed" ID="QuickFindFileDialog.on_fileNameEdit_returnPressed"></a>
342 <h4>QuickFindFileDialog.on_fileNameEdit_returnPressed</h4>
343 <b>on_fileNameEdit_returnPressed</b>(<i></i>)
344
345 <p>
346 Private slot to handle enter being pressed on the file name edit box.
347 </p>
348 <a NAME="QuickFindFileDialog.on_fileNameEdit_textChanged" ID="QuickFindFileDialog.on_fileNameEdit_textChanged"></a>
349 <h4>QuickFindFileDialog.on_fileNameEdit_textChanged</h4>
350 <b>on_fileNameEdit_textChanged</b>(<i>text</i>)
351
352 <p>
353 Private slot to handle the textChanged signal of the file name edit.
354 </p>
355 <dl>
356
357 <dt><i>text</i></dt>
358 <dd>
359 (ignored)
360 </dd>
361 </dl>
362 <a NAME="QuickFindFileDialog.show" ID="QuickFindFileDialog.show"></a>
363 <h4>QuickFindFileDialog.show</h4>
364 <b>show</b>(<i></i>)
365
366 <p>
367 Public method to enable/disable the project checkbox.
368 </p>
369 <div align="right"><a href="#top">Up</a></div>
370 <hr />
371 </body></html>

eric ide

mercurial