|
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.postData = "" |
|
26 |
|
27 def isValid(self): |
|
28 """ |
|
29 Public method to test for validity. |
|
30 |
|
31 @return flag indicating a valid form (boolean) |
|
32 """ |
|
33 return not self.url.isEmpty() and \ |
|
34 bool(self.postData) |