|
pycrossword
0.4
Pure-Python implementation of a crossword puzzle generator and editor
|
Tiny login/password authentication dialog. More...
Public Member Functions | |
| def | __init__ (self, title=_('Authentication'), icon='locked.png', user_label=_('User'), password_label=_('Password'), allow_empty_user=False, allow_empty_password=False, parent=None, flags=QtCore.Qt.WindowFlags()) |
| Constructor. More... | |
| def | addMainLayout (self) |
| Creates the main (central) layout for controls. More... | |
| def | validate (self) |
| Validates user input (reimplemented in child classes). More... | |
| def | get_auth (self) |
| Gets the user and password in a single 2-tuple. More... | |
Public Member Functions inherited from pycross.forms.BasicDialog | |
| def | __init__ (self, geometry=None, title=None, icon=None, parent=None, flags=QtCore.Qt.WindowFlags(), sizepolicy=QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)) |
| Constructor. More... | |
| def | initUI (self, geometry=None, title=None, icon=None) |
| Creates the core controls: OK and Cancel buttons and layouts. More... | |
| def | on_btn_OK_clicked (self) |
| Fires when the OK button is clicked. More... | |
| def | on_btn_cancel_clicked (self) |
| Fires when the Cancel button is clicked: rejects input and closes window. More... | |
Public Attributes | |
| user_label | |
| password_label | |
| allow_empty_user | |
| allow_empty_password | |
| layout_controls | |
| le_user | |
| le_pass | |
Public Attributes inherited from pycross.forms.BasicDialog | |
| layout_controls | |
QtWidgets.QFormLayout central layout for controls More... | |
| btn_OK | |
QtWidgets.QPushButton OK button More... | |
| btn_cancel | |
QtWidgets.QPushButton Cancel button More... | |
| layout_bottom | |
QtWidgets.QHBoxLayout bottom layout for OK and Cancel buttons More... | |
| layout_main | |
QtWidgets.QVBoxLayout window layout More... | |
Tiny login/password authentication dialog.
| def pycross.forms.PasswordDialog.__init__ | ( | self, | |
title = _('Authentication'), |
|||
icon = 'locked.png', |
|||
user_label = _('User'), |
|||
password_label = _('Password'), |
|||
allow_empty_user = False, |
|||
allow_empty_password = False, |
|||
parent = None, |
|||
flags = QtCore.Qt.WindowFlags() |
|||
| ) |
Constructor.
| title | str dialog title |
| icon | str dialog icon file |
| user_label | str user (login) hint |
| password_label | str password hint |
| allow_empty_user | bool whether an empty user string is allowed |
| allow_empty_password | bool dwhether an empty password string is allowed |
| parent | QtWidgets.QWidget parent widget (default = None, i.e. no parent) |
| flags | QtCore.Qt.WindowFlags Qt window flags |
| def pycross.forms.PasswordDialog.addMainLayout | ( | self | ) |
Creates the main (central) layout for controls.
Must be overridden by child classes to change the layout type (default = QtWidgets.QFormLayout) and add controls.
Reimplemented from pycross.forms.BasicDialog.
| def pycross.forms.PasswordDialog.get_auth | ( | self | ) |
Gets the user and password in a single 2-tuple.
2-tuple (user, password) | def pycross.forms.PasswordDialog.validate | ( | self | ) |
Validates user input (reimplemented in child classes).
bool True if user input is valid, False otherwise Reimplemented from pycross.forms.BasicDialog.
| pycross.forms.PasswordDialog.allow_empty_password |
| pycross.forms.PasswordDialog.allow_empty_user |
| pycross.forms.PasswordDialog.layout_controls |
| pycross.forms.PasswordDialog.le_pass |
| pycross.forms.PasswordDialog.le_user |
| pycross.forms.PasswordDialog.password_label |
| pycross.forms.PasswordDialog.user_label |
1.8.17