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

changeset 6011
e6af0dcfbb35
child 6333
3d4e7155d48f
equal deleted inserted replaced
6010:7ef7d47a0ad5 6011:e6af0dcfbb35
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, plugin, parent=None</i>)
122 <p>
123 Constructor
124 </p><dl>
125 <dt><i>pip</i></dt>
126 <dd>
127 reference to the master object (Pip)
128 </dd><dt><i>plugin</i></dt>
129 <dd>
130 reference to the plugin object (ToolPipPlugin)
131 </dd><dt><i>parent</i></dt>
132 <dd>
133 reference to the parent widget (QWidget)
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></dt>
142 <dd>
143 code of the error (integer)
144 </dd><dt><i>errorString</i></dt>
145 <dd>
146 error message (string)
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></dt>
155 <dd>
156 result data (tuple) with downloads information in the first
157 element
158 </dd>
159 </dl><a NAME="PipSearchDialog.__finish" ID="PipSearchDialog.__finish"></a>
160 <h4>PipSearchDialog.__finish</h4>
161 <b>__finish</b>(<i></i>)
162 <p>
163 Private slot performing the finishing actions.
164 </p><a NAME="PipSearchDialog.__getPackageDownloadsData" ID="PipSearchDialog.__getPackageDownloadsData"></a>
165 <h4>PipSearchDialog.__getPackageDownloadsData</h4>
166 <b>__getPackageDownloadsData</b>(<i>packageVersion, data</i>)
167 <p>
168 Private method to store the details data and get downloads
169 information.
170 </p><dl>
171 <dt><i>packageVersion</i> (str)</dt>
172 <dd>
173 version info
174 </dd><dt><i>data</i> (tuple)</dt>
175 <dd>
176 result data with package details in the first
177 element
178 </dd>
179 </dl><a NAME="PipSearchDialog.__install" ID="PipSearchDialog.__install"></a>
180 <h4>PipSearchDialog.__install</h4>
181 <b>__install</b>(<i></i>)
182 <p>
183 Private slot to install the selected packages.
184 </p><a NAME="PipSearchDialog.__processSearchResult" ID="PipSearchDialog.__processSearchResult"></a>
185 <h4>PipSearchDialog.__processSearchResult</h4>
186 <b>__processSearchResult</b>(<i>data</i>)
187 <p>
188 Private method to process the search result data from PyPI.
189 </p><dl>
190 <dt><i>data</i></dt>
191 <dd>
192 result data (tuple) with hits in the first element
193 </dd>
194 </dl><a NAME="PipSearchDialog.__score" ID="PipSearchDialog.__score"></a>
195 <h4>PipSearchDialog.__score</h4>
196 <b>__score</b>(<i>name, summary</i>)
197 <p>
198 Private method to calculate some score for a search result.
199 </p><dl>
200 <dt><i>name</i> (str)</dt>
201 <dd>
202 name of the returned package
203 </dd><dt><i>summary</i> (str)</dt>
204 <dd>
205 summary text for the package
206 </dd>
207 </dl><dl>
208 <dt>Returns:</dt>
209 <dd>
210 score value
211 </dd>
212 </dl><dl>
213 <dt>Return Type:</dt>
214 <dd>
215 int
216 </dd>
217 </dl><a NAME="PipSearchDialog.__search" ID="PipSearchDialog.__search"></a>
218 <h4>PipSearchDialog.__search</h4>
219 <b>__search</b>(<i></i>)
220 <p>
221 Private method to perform the search.
222 </p><a NAME="PipSearchDialog.__searchError" ID="PipSearchDialog.__searchError"></a>
223 <h4>PipSearchDialog.__searchError</h4>
224 <b>__searchError</b>(<i>errorCode, errorString</i>)
225 <p>
226 Private method handling a search error.
227 </p><dl>
228 <dt><i>errorCode</i></dt>
229 <dd>
230 code of the error (integer)
231 </dd><dt><i>errorString</i></dt>
232 <dd>
233 error message (string)
234 </dd>
235 </dl><a NAME="PipSearchDialog.__showDetails" ID="PipSearchDialog.__showDetails"></a>
236 <h4>PipSearchDialog.__showDetails</h4>
237 <b>__showDetails</b>(<i></i>)
238 <p>
239 Private slot to show details about the selected package.
240 </p><a NAME="PipSearchDialog.__transformHits" ID="PipSearchDialog.__transformHits"></a>
241 <h4>PipSearchDialog.__transformHits</h4>
242 <b>__transformHits</b>(<i>hits</i>)
243 <p>
244 Private method to convert the list returned from pypi into a
245 packages list.
246 </p><dl>
247 <dt><i>hits</i></dt>
248 <dd>
249 list returned from pypi (list of dict)
250 </dd>
251 </dl><dl>
252 <dt>Returns:</dt>
253 <dd>
254 list of packages (list of dict)
255 </dd>
256 </dl><a NAME="PipSearchDialog.closeEvent" ID="PipSearchDialog.closeEvent"></a>
257 <h4>PipSearchDialog.closeEvent</h4>
258 <b>closeEvent</b>(<i>e</i>)
259 <p>
260 Protected slot implementing a close event handler.
261 </p><dl>
262 <dt><i>e</i></dt>
263 <dd>
264 close event (QCloseEvent)
265 </dd>
266 </dl><a NAME="PipSearchDialog.on_buttonBox_clicked" ID="PipSearchDialog.on_buttonBox_clicked"></a>
267 <h4>PipSearchDialog.on_buttonBox_clicked</h4>
268 <b>on_buttonBox_clicked</b>(<i>button</i>)
269 <p>
270 Private slot called by a button of the button box clicked.
271 </p><dl>
272 <dt><i>button</i></dt>
273 <dd>
274 button that was clicked (QAbstractButton)
275 </dd>
276 </dl><a NAME="PipSearchDialog.on_resultList_itemActivated" ID="PipSearchDialog.on_resultList_itemActivated"></a>
277 <h4>PipSearchDialog.on_resultList_itemActivated</h4>
278 <b>on_resultList_itemActivated</b>(<i>item, column</i>)
279 <p>
280 Private slot reacting on an item activation.
281 </p><dl>
282 <dt><i>item</i></dt>
283 <dd>
284 reference to the activated item (QTreeWidgetItem)
285 </dd><dt><i>column</i></dt>
286 <dd>
287 activated column (integer)
288 </dd>
289 </dl><a NAME="PipSearchDialog.on_resultList_itemSelectionChanged" ID="PipSearchDialog.on_resultList_itemSelectionChanged"></a>
290 <h4>PipSearchDialog.on_resultList_itemSelectionChanged</h4>
291 <b>on_resultList_itemSelectionChanged</b>(<i></i>)
292 <p>
293 Private slot handling changes of the selection.
294 </p><a NAME="PipSearchDialog.on_searchButton_clicked" ID="PipSearchDialog.on_searchButton_clicked"></a>
295 <h4>PipSearchDialog.on_searchButton_clicked</h4>
296 <b>on_searchButton_clicked</b>(<i></i>)
297 <p>
298 Private slot handling a press of the search button.
299 </p><a NAME="PipSearchDialog.on_searchEdit_textChanged" ID="PipSearchDialog.on_searchEdit_textChanged"></a>
300 <h4>PipSearchDialog.on_searchEdit_textChanged</h4>
301 <b>on_searchEdit_textChanged</b>(<i>txt</i>)
302 <p>
303 Private slot handling a change of the search term.
304 </p><dl>
305 <dt><i>txt</i></dt>
306 <dd>
307 search term (string)
308 </dd>
309 </dl>
310 <div align="right"><a href="#top">Up</a></div>
311 <hr />
312 </body></html>

eric ide

mercurial