~mcfletch/eric/update-to-4.5.13

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
<html><head>
<title>eric4.Helpviewer.Passwords.PasswordManager</title>
<style>
body {
    background:white;
    margin: 0em 1em 10em 1em;
    color: black;
}

h1 { color: white; background: #4FA4FF; }
h2 { color: white; background: #4FA4FF; }
h3 { color: white; background: #00557F; }
h4 { color: white; background: #00557F; }
    
a { color: #AA5500; }

</style>
</head>
<body><a NAME="top" ID="top"></a>
<h1>eric4.Helpviewer.Passwords.PasswordManager</h1>
<p>
Module implementing the password manager.
</p>
<h3>Global Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Classes</h3>
<table>
<tr>
<td><a href="#LoginForm">LoginForm</a></td>
<td>Class implementing a data structure for login forms.</td>
</tr><tr>
<td><a href="#PasswordManager">PasswordManager</a></td>
<td>Class implementing the password manager.</td>
</tr>
</table>
<h3>Functions</h3>
<table>
<tr><td>None</td></tr>
</table>
<hr /><hr />
<a NAME="LoginForm" ID="LoginForm"></a>
<h2>LoginForm</h2>
<p>
    Class implementing a data structure for login forms.
</p>
<h3>Derived from</h3>
object
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Class Methods</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#LoginForm.__init__">LoginForm</a></td>
<td>Constructor</td>
</tr><tr>
<td><a href="#LoginForm.isValid">isValid</a></td>
<td>Public method to test for validity.</td>
</tr><tr>
<td><a href="#LoginForm.load">load</a></td>
<td>Public method to load the form data from a file.</td>
</tr><tr>
<td><a href="#LoginForm.save">save</a></td>
<td>Public method to save the form data to a file.</td>
</tr>
</table>
<h3>Static Methods</h3>
<table>
<tr><td>None</td></tr>
</table>
<a NAME="LoginForm.__init__" ID="LoginForm.__init__"></a>
<h4>LoginForm (Constructor)</h4>
<b>LoginForm</b>(<i></i>)
<p>
        Constructor
</p><a NAME="LoginForm.isValid" ID="LoginForm.isValid"></a>
<h4>LoginForm.isValid</h4>
<b>isValid</b>(<i></i>)
<p>
        Public method to test for validity.
</p><dl>
<dt>Returns:</dt>
<dd>
flag indicating a valid form (boolean)
</dd>
</dl><a NAME="LoginForm.load" ID="LoginForm.load"></a>
<h4>LoginForm.load</h4>
<b>load</b>(<i>data</i>)
<p>
        Public method to load the form data from a file.
</p><dl>
<dt><i>data</i></dt>
<dd>
list of strings to load data from (list of strings)
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
flag indicating success (boolean)
</dd>
</dl><a NAME="LoginForm.save" ID="LoginForm.save"></a>
<h4>LoginForm.save</h4>
<b>save</b>(<i>f</i>)
<p>
        Public method to save the form data to a file.
</p><dl>
<dt><i>f</i></dt>
<dd>
file or file like object open for writing
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
flag indicating success (booelan)
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="PasswordManager" ID="PasswordManager"></a>
<h2>PasswordManager</h2>
<p>
    Class implementing the password manager.
</p><h3>Signals</h3>
<dl>
<dt>changed()</dt>
<dd>
emitted to indicate a change
</dd>
</dl>
<h3>Derived from</h3>
QObject
<h3>Class Attributes</h3>
<table>
<tr><td>FORMS</td></tr><tr><td>NEVER</td></tr><tr><td>SEPARATOR</td></tr>
</table>
<h3>Class Methods</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#PasswordManager.__init__">PasswordManager</a></td>
<td>Constructor</td>
</tr><tr>
<td><a href="#PasswordManager.__createKey">__createKey</a></td>
<td>Private method to create the key string for the login credentials.</td>
</tr><tr>
<td><a href="#PasswordManager.__extractMultipartQueryItems">__extractMultipartQueryItems</a></td>
<td>Private method to extract the query items for a post operation.</td>
</tr><tr>
<td><a href="#PasswordManager.__findForm">__findForm</a></td>
<td>Private method to find the form used for logging in.</td>
</tr><tr>
<td><a href="#PasswordManager.__load">__load</a></td>
<td>Private method to load the saved login credentials.</td>
</tr><tr>
<td><a href="#PasswordManager.__stripUrl">__stripUrl</a></td>
<td>Private method to strip off all unneeded parts of a URL.</td>
</tr><tr>
<td><a href="#PasswordManager.allSiteNames">allSiteNames</a></td>
<td>Public method to get a list of all site names.</td>
</tr><tr>
<td><a href="#PasswordManager.clear">clear</a></td>
<td>Public slot to clear the saved passwords.</td>
</tr><tr>
<td><a href="#PasswordManager.close">close</a></td>
<td>Public method to close the open search engines manager.</td>
</tr><tr>
<td><a href="#PasswordManager.fill">fill</a></td>
<td>Public slot to fill login forms with saved data.</td>
</tr><tr>
<td><a href="#PasswordManager.getLogin">getLogin</a></td>
<td>Public method to get the login credentials.</td>
</tr><tr>
<td><a href="#PasswordManager.post">post</a></td>
<td>Public method to check, if the data to be sent contains login data.</td>
</tr><tr>
<td><a href="#PasswordManager.removePassword">removePassword</a></td>
<td>Public method to remove a password entry.</td>
</tr><tr>
<td><a href="#PasswordManager.save">save</a></td>
<td>Public slot to save the login entries to disk.</td>
</tr><tr>
<td><a href="#PasswordManager.setLogin">setLogin</a></td>
<td>Public method to set the login credentials.</td>
</tr><tr>
<td><a href="#PasswordManager.siteInfo">siteInfo</a></td>
<td>Public method to get a reference to the named site.</td>
</tr><tr>
<td><a href="#PasswordManager.sitesCount">sitesCount</a></td>
<td>Public method to get the number of available sites.</td>
</tr>
</table>
<h3>Static Methods</h3>
<table>
<tr><td>None</td></tr>
</table>
<a NAME="PasswordManager.__init__" ID="PasswordManager.__init__"></a>
<h4>PasswordManager (Constructor)</h4>
<b>PasswordManager</b>(<i>parent = None</i>)
<p>
        Constructor
</p><dl>
<dt><i>parent</i></dt>
<dd>
reference to the parent object (QObject)
</dd>
</dl><a NAME="PasswordManager.__createKey" ID="PasswordManager.__createKey"></a>
<h4>PasswordManager.__createKey</h4>
<b>__createKey</b>(<i>url, realm</i>)
<p>
        Private method to create the key string for the login credentials.
</p><dl>
<dt><i>url</i></dt>
<dd>
URL to get the credentials for (QUrl)
</dd><dt><i>realm</i></dt>
<dd>
realm to get the credentials for (string or QString)
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
key string (string)
</dd>
</dl><a NAME="PasswordManager.__extractMultipartQueryItems" ID="PasswordManager.__extractMultipartQueryItems"></a>
<h4>PasswordManager.__extractMultipartQueryItems</h4>
<b>__extractMultipartQueryItems</b>(<i>data, boundary</i>)
<p>
        Private method to extract the query items for a post operation.
</p><dl>
<dt><i>data</i></dt>
<dd>
data to be sent (QByteArray)
</dd><dt><i>boundary</i></dt>
<dd>
boundary string (QByteArray)
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
set of name, value pairs (set of tuple of QString, QString)
</dd>
</dl><a NAME="PasswordManager.__findForm" ID="PasswordManager.__findForm"></a>
<h4>PasswordManager.__findForm</h4>
<b>__findForm</b>(<i>webPage, data, boundary = None</i>)
<p>
        Private method to find the form used for logging in.
</p><dl>
<dt><i>webPage</i></dt>
<dd>
reference to the web page (QWebPage)
</dd><dt><i>data</i></dt>
<dd>
data to be sent (QByteArray)
</dd><dt><i>boundary=</i></dt>
<dd>
boundary string (QByteArray) for multipart encoded data,
            None for urlencoded data
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
parsed form (LoginForm)
</dd>
</dl><a NAME="PasswordManager.__load" ID="PasswordManager.__load"></a>
<h4>PasswordManager.__load</h4>
<b>__load</b>(<i></i>)
<p>
        Private method to load the saved login credentials.
</p><a NAME="PasswordManager.__stripUrl" ID="PasswordManager.__stripUrl"></a>
<h4>PasswordManager.__stripUrl</h4>
<b>__stripUrl</b>(<i>url</i>)
<p>
        Private method to strip off all unneeded parts of a URL.
</p><dl>
<dt><i>url</i></dt>
<dd>
URL to be stripped (QUrl)
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
stripped URL (QUrl)
</dd>
</dl><a NAME="PasswordManager.allSiteNames" ID="PasswordManager.allSiteNames"></a>
<h4>PasswordManager.allSiteNames</h4>
<b>allSiteNames</b>(<i></i>)
<p>
        Public method to get a list of all site names.
</p><dl>
<dt>Returns:</dt>
<dd>
sorted list of all site names (QStringList)
</dd>
</dl><a NAME="PasswordManager.clear" ID="PasswordManager.clear"></a>
<h4>PasswordManager.clear</h4>
<b>clear</b>(<i></i>)
<p>
        Public slot to clear the saved passwords.
</p><a NAME="PasswordManager.close" ID="PasswordManager.close"></a>
<h4>PasswordManager.close</h4>
<b>close</b>(<i></i>)
<p>
        Public method to close the open search engines manager.
</p><a NAME="PasswordManager.fill" ID="PasswordManager.fill"></a>
<h4>PasswordManager.fill</h4>
<b>fill</b>(<i>page</i>)
<p>
        Public slot to fill login forms with saved data.
</p><dl>
<dt><i>page</i></dt>
<dd>
reference to the web page (QWebPage)
</dd>
</dl><a NAME="PasswordManager.getLogin" ID="PasswordManager.getLogin"></a>
<h4>PasswordManager.getLogin</h4>
<b>getLogin</b>(<i>url, realm</i>)
<p>
        Public method to get the login credentials.
</p><dl>
<dt><i>url</i></dt>
<dd>
URL to get the credentials for (QUrl)
</dd><dt><i>realm</i></dt>
<dd>
realm to get the credentials for (string or QString)
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
tuple containing the user name (string) and password (string)
</dd>
</dl><a NAME="PasswordManager.post" ID="PasswordManager.post"></a>
<h4>PasswordManager.post</h4>
<b>post</b>(<i>request, data</i>)
<p>
        Public method to check, if the data to be sent contains login data.
</p><dl>
<dt><i>request</i></dt>
<dd>
reference to the network request (QNetworkRequest)
</dd><dt><i>data</i></dt>
<dd>
data to be sent (QByteArray)
</dd>
</dl><a NAME="PasswordManager.removePassword" ID="PasswordManager.removePassword"></a>
<h4>PasswordManager.removePassword</h4>
<b>removePassword</b>(<i>site</i>)
<p>
        Public method to remove a password entry.
</p><dl>
<dt><i>site</i></dt>
<dd>
web site name (string or QString)
</dd>
</dl><a NAME="PasswordManager.save" ID="PasswordManager.save"></a>
<h4>PasswordManager.save</h4>
<b>save</b>(<i></i>)
<p>
        Public slot to save the login entries to disk.
</p><a NAME="PasswordManager.setLogin" ID="PasswordManager.setLogin"></a>
<h4>PasswordManager.setLogin</h4>
<b>setLogin</b>(<i>url, realm, username, password</i>)
<p>
        Public method to set the login credentials.
</p><dl>
<dt><i>url</i></dt>
<dd>
URL to set the credentials for (QUrl)
</dd><dt><i>realm</i></dt>
<dd>
realm to set the credentials for (string or QString)
</dd><dt><i>username</i></dt>
<dd>
username for the login (string or QString)
</dd><dt><i>password</i></dt>
<dd>
password for the login (string or QString)
</dd>
</dl><a NAME="PasswordManager.siteInfo" ID="PasswordManager.siteInfo"></a>
<h4>PasswordManager.siteInfo</h4>
<b>siteInfo</b>(<i>site</i>)
<p>
        Public method to get a reference to the named site.
</p><dl>
<dt><i>site</i></dt>
<dd>
web site name (string or QString)
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
tuple containing the user name (string) and password (string)
</dd>
</dl><a NAME="PasswordManager.sitesCount" ID="PasswordManager.sitesCount"></a>
<h4>PasswordManager.sitesCount</h4>
<b>sitesCount</b>(<i></i>)
<p>
        Public method to get the number of available sites.
</p><dl>
<dt>Returns:</dt>
<dd>
number of sites (integer)
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
</body></html>