12 |
12 |
13 class LoginForm: |
13 class LoginForm: |
14 """ |
14 """ |
15 Class implementing a data structure for login forms. |
15 Class implementing a data structure for login forms. |
16 """ |
16 """ |
|
17 |
17 def __init__(self): |
18 def __init__(self): |
18 """ |
19 """ |
19 Constructor |
20 Constructor |
20 """ |
21 """ |
21 self.url = QUrl() |
22 self.url = QUrl() |
22 self.name = "" |
23 self.name = "" |
23 self.postData = "" |
24 self.postData = "" |
24 |
25 |
25 def isValid(self): |
26 def isValid(self): |
26 """ |
27 """ |
27 Public method to test for validity. |
28 Public method to test for validity. |
28 |
29 |
29 @return flag indicating a valid form (boolean) |
30 @return flag indicating a valid form (boolean) |
30 """ |
31 """ |
31 return ( |
32 return not self.url.isEmpty() and bool(self.postData) |
32 not self.url.isEmpty() and |
|
33 bool(self.postData) |
|
34 ) |
|