eric7/WebBrowser/JavaScript/PasswordManagerJsObject.py

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

eric ide

mercurial