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

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

eric ide

mercurial