Documentation/Source/eric6.Plugins.UiExtensionPlugins.PipInterface.PipSearchDialog.html

branch
maintenance
changeset 6826
c6dda2cbe081
parent 6764
d14ddbfbbd36
parent 6825
e659bb96cdfa
child 6827
14680839ad7a
equal deleted inserted replaced
6764:d14ddbfbbd36 6826:c6dda2cbe081
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.Plugins.UiExtensionPlugins.PipInterface.PipSearchDialog</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.Plugins.UiExtensionPlugins.PipInterface.PipSearchDialog</h1>
23 <p>
24 Module implementing a dialog to search PyPI.
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="#PipSearchDialog">PipSearchDialog</a></td>
34 <td>Class implementing a dialog to search PyPI.</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="PipSearchDialog" ID="PipSearchDialog"></a>
43 <h2>PipSearchDialog</h2>
44 <p>
45 Class implementing a dialog to search PyPI.
46 </p>
47 <h3>Derived from</h3>
48 QDialog, Ui_PipSearchDialog
49 <h3>Class Attributes</h3>
50 <table>
51 <tr><td>Stopwords</td></tr><tr><td>VersionRole</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="#PipSearchDialog.__init__">PipSearchDialog</a></td>
61 <td>Constructor</td>
62 </tr><tr>
63 <td><a href="#PipSearchDialog.__detailsError">__detailsError</a></td>
64 <td>Private method handling a details error.</td>
65 </tr><tr>
66 <td><a href="#PipSearchDialog.__displayPackageDetails">__displayPackageDetails</a></td>
67 <td>Private method to display the returned package details.</td>
68 </tr><tr>
69 <td><a href="#PipSearchDialog.__finish">__finish</a></td>
70 <td>Private slot performing the finishing actions.</td>
71 </tr><tr>
72 <td><a href="#PipSearchDialog.__getPackageDownloadsData">__getPackageDownloadsData</a></td>
73 <td>Private method to store the details data and get downloads information.</td>
74 </tr><tr>
75 <td><a href="#PipSearchDialog.__install">__install</a></td>
76 <td>Private slot to install the selected packages.</td>
77 </tr><tr>
78 <td><a href="#PipSearchDialog.__processSearchResult">__processSearchResult</a></td>
79 <td>Private method to process the search result data from PyPI.</td>
80 </tr><tr>
81 <td><a href="#PipSearchDialog.__score">__score</a></td>
82 <td>Private method to calculate some score for a search result.</td>
83 </tr><tr>
84 <td><a href="#PipSearchDialog.__search">__search</a></td>
85 <td>Private method to perform the search.</td>
86 </tr><tr>
87 <td><a href="#PipSearchDialog.__searchError">__searchError</a></td>
88 <td>Private method handling a search error.</td>
89 </tr><tr>
90 <td><a href="#PipSearchDialog.__showDetails">__showDetails</a></td>
91 <td>Private slot to show details about the selected package.</td>
92 </tr><tr>
93 <td><a href="#PipSearchDialog.__transformHits">__transformHits</a></td>
94 <td>Private method to convert the list returned from pypi into a packages list.</td>
95 </tr><tr>
96 <td><a href="#PipSearchDialog.closeEvent">closeEvent</a></td>
97 <td>Protected slot implementing a close event handler.</td>
98 </tr><tr>
99 <td><a href="#PipSearchDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td>
100 <td>Private slot called by a button of the button box clicked.</td>
101 </tr><tr>
102 <td><a href="#PipSearchDialog.on_resultList_itemActivated">on_resultList_itemActivated</a></td>
103 <td>Private slot reacting on an item activation.</td>
104 </tr><tr>
105 <td><a href="#PipSearchDialog.on_resultList_itemSelectionChanged">on_resultList_itemSelectionChanged</a></td>
106 <td>Private slot handling changes of the selection.</td>
107 </tr><tr>
108 <td><a href="#PipSearchDialog.on_searchButton_clicked">on_searchButton_clicked</a></td>
109 <td>Private slot handling a press of the search button.</td>
110 </tr><tr>
111 <td><a href="#PipSearchDialog.on_searchEdit_textChanged">on_searchEdit_textChanged</a></td>
112 <td>Private slot handling a change of the search term.</td>
113 </tr>
114 </table>
115 <h3>Static Methods</h3>
116 <table>
117 <tr><td>None</td></tr>
118 </table>
119 <a NAME="PipSearchDialog.__init__" ID="PipSearchDialog.__init__"></a>
120 <h4>PipSearchDialog (Constructor)</h4>
121 <b>PipSearchDialog</b>(<i>pip, indexUrl, parent=None</i>)
122 <p>
123 Constructor
124 </p><dl>
125 <dt><i>pip</i> (Pip)</dt>
126 <dd>
127 reference to the master object
128 </dd><dt><i>indexUrl</i> (str)</dt>
129 <dd>
130 URL of XML RPC interface to the pypi index
131 </dd><dt><i>parent</i> (QWidget)</dt>
132 <dd>
133 reference to the parent widget
134 </dd>
135 </dl><a NAME="PipSearchDialog.__detailsError" ID="PipSearchDialog.__detailsError"></a>
136 <h4>PipSearchDialog.__detailsError</h4>
137 <b>__detailsError</b>(<i>errorCode, errorString</i>)
138 <p>
139 Private method handling a details error.
140 </p><dl>
141 <dt><i>errorCode</i> (int)</dt>
142 <dd>
143 code of the error
144 </dd><dt><i>errorString</i> (str)</dt>
145 <dd>
146 error message
147 </dd>
148 </dl><a NAME="PipSearchDialog.__displayPackageDetails" ID="PipSearchDialog.__displayPackageDetails"></a>
149 <h4>PipSearchDialog.__displayPackageDetails</h4>
150 <b>__displayPackageDetails</b>(<i>data</i>)
151 <p>
152 Private method to display the returned package details.
153 </p><dl>
154 <dt><i>data</i> (tuple)</dt>
155 <dd>
156 result data with downloads information in the first element
157 </dd>
158 </dl><a NAME="PipSearchDialog.__finish" ID="PipSearchDialog.__finish"></a>
159 <h4>PipSearchDialog.__finish</h4>
160 <b>__finish</b>(<i></i>)
161 <p>
162 Private slot performing the finishing actions.
163 </p><a NAME="PipSearchDialog.__getPackageDownloadsData" ID="PipSearchDialog.__getPackageDownloadsData"></a>
164 <h4>PipSearchDialog.__getPackageDownloadsData</h4>
165 <b>__getPackageDownloadsData</b>(<i>packageVersion, data</i>)
166 <p>
167 Private method to store the details data and get downloads
168 information.
169 </p><dl>
170 <dt><i>packageVersion</i> (str)</dt>
171 <dd>
172 version info
173 </dd><dt><i>data</i> (tuple)</dt>
174 <dd>
175 result data with package details in the first
176 element
177 </dd>
178 </dl><a NAME="PipSearchDialog.__install" ID="PipSearchDialog.__install"></a>
179 <h4>PipSearchDialog.__install</h4>
180 <b>__install</b>(<i>userSite=False</i>)
181 <p>
182 Private slot to install the selected packages.
183 </p><dl>
184 <dt><i>userSite</i> (bool)</dt>
185 <dd>
186 flag indicating to install to the user directory
187 </dd>
188 </dl><a NAME="PipSearchDialog.__processSearchResult" ID="PipSearchDialog.__processSearchResult"></a>
189 <h4>PipSearchDialog.__processSearchResult</h4>
190 <b>__processSearchResult</b>(<i>data</i>)
191 <p>
192 Private method to process the search result data from PyPI.
193 </p><dl>
194 <dt><i>data</i> (tuple)</dt>
195 <dd>
196 result data with hits in the first element
197 </dd>
198 </dl><a NAME="PipSearchDialog.__score" ID="PipSearchDialog.__score"></a>
199 <h4>PipSearchDialog.__score</h4>
200 <b>__score</b>(<i>name, summary</i>)
201 <p>
202 Private method to calculate some score for a search result.
203 </p><dl>
204 <dt><i>name</i> (str)</dt>
205 <dd>
206 name of the returned package
207 </dd><dt><i>summary</i> (str)</dt>
208 <dd>
209 summary text for the package
210 </dd>
211 </dl><dl>
212 <dt>Returns:</dt>
213 <dd>
214 score value
215 </dd>
216 </dl><dl>
217 <dt>Return Type:</dt>
218 <dd>
219 int
220 </dd>
221 </dl><a NAME="PipSearchDialog.__search" ID="PipSearchDialog.__search"></a>
222 <h4>PipSearchDialog.__search</h4>
223 <b>__search</b>(<i></i>)
224 <p>
225 Private method to perform the search.
226 </p><a NAME="PipSearchDialog.__searchError" ID="PipSearchDialog.__searchError"></a>
227 <h4>PipSearchDialog.__searchError</h4>
228 <b>__searchError</b>(<i>errorCode, errorString</i>)
229 <p>
230 Private method handling a search error.
231 </p><dl>
232 <dt><i>errorCode</i> (int)</dt>
233 <dd>
234 code of the error
235 </dd><dt><i>errorString</i> (str)</dt>
236 <dd>
237 error message
238 </dd>
239 </dl><a NAME="PipSearchDialog.__showDetails" ID="PipSearchDialog.__showDetails"></a>
240 <h4>PipSearchDialog.__showDetails</h4>
241 <b>__showDetails</b>(<i></i>)
242 <p>
243 Private slot to show details about the selected package.
244 </p><a NAME="PipSearchDialog.__transformHits" ID="PipSearchDialog.__transformHits"></a>
245 <h4>PipSearchDialog.__transformHits</h4>
246 <b>__transformHits</b>(<i>hits</i>)
247 <p>
248 Private method to convert the list returned from pypi into a
249 packages list.
250 </p><dl>
251 <dt><i>hits</i> (list of dict)</dt>
252 <dd>
253 list returned from pypi
254 </dd>
255 </dl><dl>
256 <dt>Returns:</dt>
257 <dd>
258 list of packages
259 </dd>
260 </dl><dl>
261 <dt>Return Type:</dt>
262 <dd>
263 list of dict
264 </dd>
265 </dl><a NAME="PipSearchDialog.closeEvent" ID="PipSearchDialog.closeEvent"></a>
266 <h4>PipSearchDialog.closeEvent</h4>
267 <b>closeEvent</b>(<i>e</i>)
268 <p>
269 Protected slot implementing a close event handler.
270 </p><dl>
271 <dt><i>e</i> (QCloseEvent)</dt>
272 <dd>
273 close event
274 </dd>
275 </dl><a NAME="PipSearchDialog.on_buttonBox_clicked" ID="PipSearchDialog.on_buttonBox_clicked"></a>
276 <h4>PipSearchDialog.on_buttonBox_clicked</h4>
277 <b>on_buttonBox_clicked</b>(<i>button</i>)
278 <p>
279 Private slot called by a button of the button box clicked.
280 </p><dl>
281 <dt><i>button</i> (QAbstractButton)</dt>
282 <dd>
283 button that was clicked
284 </dd>
285 </dl><a NAME="PipSearchDialog.on_resultList_itemActivated" ID="PipSearchDialog.on_resultList_itemActivated"></a>
286 <h4>PipSearchDialog.on_resultList_itemActivated</h4>
287 <b>on_resultList_itemActivated</b>(<i>item, column</i>)
288 <p>
289 Private slot reacting on an item activation.
290 </p><dl>
291 <dt><i>item</i> (QTreeWidgetItem)</dt>
292 <dd>
293 reference to the activated item
294 </dd><dt><i>column</i> (int)</dt>
295 <dd>
296 activated column
297 </dd>
298 </dl><a NAME="PipSearchDialog.on_resultList_itemSelectionChanged" ID="PipSearchDialog.on_resultList_itemSelectionChanged"></a>
299 <h4>PipSearchDialog.on_resultList_itemSelectionChanged</h4>
300 <b>on_resultList_itemSelectionChanged</b>(<i></i>)
301 <p>
302 Private slot handling changes of the selection.
303 </p><a NAME="PipSearchDialog.on_searchButton_clicked" ID="PipSearchDialog.on_searchButton_clicked"></a>
304 <h4>PipSearchDialog.on_searchButton_clicked</h4>
305 <b>on_searchButton_clicked</b>(<i></i>)
306 <p>
307 Private slot handling a press of the search button.
308 </p><a NAME="PipSearchDialog.on_searchEdit_textChanged" ID="PipSearchDialog.on_searchEdit_textChanged"></a>
309 <h4>PipSearchDialog.on_searchEdit_textChanged</h4>
310 <b>on_searchEdit_textChanged</b>(<i>txt</i>)
311 <p>
312 Private slot handling a change of the search term.
313 </p><dl>
314 <dt><i>txt</i> (str)</dt>
315 <dd>
316 search term
317 </dd>
318 </dl>
319 <div align="right"><a href="#top">Up</a></div>
320 <hr />
321 </body></html>

eric ide

mercurial