eric6/WebBrowser/JavaScript/PasswordManagerJsObject.py

changeset 6942
2602857055c5
parent 6645
ad476851d7e0
child 7229
53054eb5b15a
equal deleted inserted replaced
6941:f99d60d6b59b 6942:2602857055c5
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2016 - 2019 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing the Python side for calling the password manager.
8 """
9
10 from __future__ import unicode_literals
11
12 from PyQt5.QtCore import pyqtSlot, QObject, QByteArray
13
14
15 class PasswordManagerJsObject(QObject):
16 """
17 Class implementing the Python side for calling the password manager.
18 """
19 def __init__(self, parent=None):
20 """
21 Constructor
22
23 @param parent reference to the parent object
24 @type ExternalJsObject
25 """
26 super(PasswordManagerJsObject, self).__init__(parent)
27
28 self.__external = parent
29
30 @pyqtSlot(str, str, str, QByteArray)
31 def formSubmitted(self, urlStr, userName, password, data):
32 """
33 Public slot passing form data to the password manager.
34
35 @param urlStr form submission URL
36 @type str
37 @param userName name of the user
38 @type str
39 @param password user password
40 @type str
41 @param data data to be submitted
42 @type QByteArray
43 """
44 from WebBrowser.WebBrowserWindow import WebBrowserWindow
45 WebBrowserWindow.passwordManager().formSubmitted(
46 urlStr, userName, password, data, self.__external.page())

eric ide

mercurial