eric6/WebBrowser/Passwords/LoginForm.py

Wed, 30 Dec 2020 11:00:44 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 30 Dec 2020 11:00:44 +0100
branch
maintenance
changeset 7924
8a96736d465e
parent 7781
607a6098cb44
child 8207
d359172d11be
permissions
-rw-r--r--

Updated copyright for 2021.

1685
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
7924
8a96736d465e Updated copyright for 2021.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7781
diff changeset
3 # Copyright (c) 2012 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
1685
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing a data structure for login forms.
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
4749
750577d35452 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4744
diff changeset
10 from PyQt5.QtCore import QUrl
1685
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13 class LoginForm(object):
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14 """
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15 Class implementing a data structure for login forms.
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16 """
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 def __init__(self):
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 """
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 Constructor
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 """
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 self.url = QUrl()
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 self.name = ""
4749
750577d35452 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4744
diff changeset
23 self.postData = ""
1685
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25 def isValid(self):
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 """
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 Public method to test for validity.
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 @return flag indicating a valid form (boolean)
7640d5500966 Changed file format for saved login data to XML.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 """
7269
0c63ea7f94bd Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
31 return (
0c63ea7f94bd Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
32 not self.url.isEmpty() and
4749
750577d35452 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4744
diff changeset
33 bool(self.postData)
7269
0c63ea7f94bd Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
34 )

eric ide

mercurial