eric6/Helpviewer/Passwords/LoginForm.py

branch
maintenance
changeset 7286
7eb04391adf7
parent 7226
babe80d84a3e
parent 7285
1ff497f33f31
child 7287
1c17f2191bdd
equal deleted inserted replaced
7226:babe80d84a3e 7286:7eb04391adf7
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2012 - 2019 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing a data structure for login forms.
8 """
9
10 from __future__ import unicode_literals
11
12 from PyQt5.QtCore import QUrl
13
14
15 class LoginForm(object):
16 """
17 Class implementing a data structure for login forms.
18 """
19 def __init__(self):
20 """
21 Constructor
22 """
23 self.url = QUrl()
24 self.name = ""
25 self.hasAPassword = False
26 self.elements = []
27 # list of tuples of element name and value (string, string)
28 self.elementTypes = {}
29 # dict of element name as key and type as value
30
31 def isValid(self):
32 """
33 Public method to test for validity.
34
35 @return flag indicating a valid form (boolean)
36 """
37 return len(self.elements) > 0

eric ide

mercurial