KNewPasswordDialog
#include <KNewPasswordDialog>
Properties | |
KPassword::RevealMode | revealPasswordMode |
Properties inherited from QDialog | |
modal | |
sizeGripEnabled | |
Properties inherited from QWidget | |
acceptDrops | |
accessibleDescription | |
accessibleName | |
autoFillBackground | |
baseSize | |
childrenRect | |
childrenRegion | |
contextMenuPolicy | |
cursor | |
enabled | |
focus | |
focusPolicy | |
font | |
frameGeometry | |
frameSize | |
fullScreen | |
geometry | |
height | |
inputMethodHints | |
isActiveWindow | |
layoutDirection | |
locale | |
maximized | |
maximumHeight | |
maximumSize | |
maximumWidth | |
minimized | |
minimumHeight | |
minimumSize | |
minimumSizeHint | |
minimumWidth | |
modal | |
mouseTracking | |
normalGeometry | |
palette | |
pos | |
rect | |
size | |
sizeHint | |
sizeIncrement | |
sizePolicy | |
statusTip | |
styleSheet | |
tabletTracking | |
toolTip | |
toolTipDuration | |
updatesEnabled | |
visible | |
whatsThis | |
width | |
windowFilePath | |
windowFlags | |
windowIcon | |
windowIconText | |
windowModality | |
windowModified | |
windowOpacity | |
windowTitle | |
x | |
y | |
Properties inherited from QObject | |
objectName | |
Signals | |
void | newPassword (const QString &password) |
Detailed Description
A password input dialog.
This dialog asks the user to enter a new password.
The password has to be entered twice to check if the passwords match. A hint about the strength of the entered password is also shown.
Usage Example
Asynchronous
Synchronous
Definition at line 59 of file knewpassworddialog.h.
Property Documentation
◆ revealPasswordMode
|
readwrite |
- Since
- 6.0
Definition at line 66 of file knewpassworddialog.h.
Constructor & Destructor Documentation
◆ KNewPasswordDialog()
Constructs a password dialog.
- Parameters
-
parent Passed to lower level constructor.
Definition at line 92 of file knewpassworddialog.cpp.
◆ ~KNewPasswordDialog()
|
overridedefault |
Destructs the password dialog.
Member Function Documentation
◆ accept()
|
overridevirtual |
Reimplemented from QDialog.
Definition at line 156 of file knewpassworddialog.cpp.
◆ allowEmptyPasswords()
bool KNewPasswordDialog::allowEmptyPasswords | ( | ) | const |
Allow empty passwords?
- Returns
- true if minimumPasswordLength() == 0
Definition at line 172 of file knewpassworddialog.cpp.
◆ backgroundWarningColor()
QColor KNewPasswordDialog::backgroundWarningColor | ( | ) | const |
The color used as warning for the verification password field's background.
- Since
- 5.17
Definition at line 224 of file knewpassworddialog.cpp.
◆ checkAndGetPassword()
|
protected |
Checks input password.
If the password is right, returns true and fills pwd with the password. Otherwise returns false and pwd will be null.
- Since
- 4.2
Definition at line 127 of file knewpassworddialog.cpp.
◆ checkPassword()
Virtual function that can be overridden to provide password checking in derived classes.
It should return true
if the password is valid, false
otherwise.
Definition at line 259 of file knewpassworddialog.cpp.
◆ icon()
QIcon KNewPasswordDialog::icon | ( | ) | const |
Returns the icon that appears next to the prompt in the dialog.
The default icon represents a simple key.
- Since
- 5.63
Definition at line 122 of file knewpassworddialog.cpp.
◆ isRevealPasswordAvailable()
bool KNewPasswordDialog::isRevealPasswordAvailable | ( | ) | const |
Whether the visibility trailing action in the line edit is visible.
- Since
- 5.31
Definition at line 242 of file knewpassworddialog.cpp.
◆ maximumPasswordLength()
int KNewPasswordDialog::maximumPasswordLength | ( | ) | const |
Maximum acceptable password length.
Definition at line 192 of file knewpassworddialog.cpp.
◆ minimumPasswordLength()
int KNewPasswordDialog::minimumPasswordLength | ( | ) | const |
Minimum acceptable password length.
Definition at line 182 of file knewpassworddialog.cpp.
◆ newPassword
The dialog has been accepted, and the new password is password
.
◆ password()
QString KNewPasswordDialog::password | ( | ) | const |
Returns the password entered.
- Note
- Only has meaningful data after accept has been called if you want to access the password from a subclass use checkAndGetPassword()
Definition at line 229 of file knewpassworddialog.cpp.
◆ passwordStrengthWarningLevel()
int KNewPasswordDialog::passwordStrengthWarningLevel | ( | ) | const |
Password strength level below which a warning is given.
Definition at line 214 of file knewpassworddialog.cpp.
◆ prompt()
QString KNewPasswordDialog::prompt | ( | ) | const |
Returns the password prompt.
Definition at line 107 of file knewpassworddialog.cpp.
◆ reasonablePasswordLength()
int KNewPasswordDialog::reasonablePasswordLength | ( | ) | const |
Password length that is expected to be reasonably safe.
Definition at line 204 of file knewpassworddialog.cpp.
◆ revealPasswordMode()
KPassword::RevealMode KNewPasswordDialog::revealPasswordMode | ( | ) | const |
Whether the visibility trailing action in the line edit is visible.
- Since
- 6.0
Definition at line 249 of file knewpassworddialog.cpp.
◆ setAllowEmptyPasswords()
void KNewPasswordDialog::setAllowEmptyPasswords | ( | bool | allowed | ) |
Allow empty passwords? - Default: true.
same as setMinimumPasswordLength( allowed ? 0 : 1 )
Definition at line 167 of file knewpassworddialog.cpp.
◆ setBackgroundWarningColor()
When the verification password does not match, the background color of the verification field is set to color
.
As soon as the passwords match, the original color of the verification field is restored.
Default: the background color from the current theme.
- Since
- 5.17
Definition at line 219 of file knewpassworddialog.cpp.
◆ setIcon()
Sets the icon that appears next to the prompt in the dialog.
The default icon represents a simple key.
- Since
- 5.63
Definition at line 112 of file knewpassworddialog.cpp.
◆ setMaximumPasswordLength()
void KNewPasswordDialog::setMaximumPasswordLength | ( | int | maxLength | ) |
Maximum acceptable password length.
- Parameters
-
maxLength The new maximum password length.
Definition at line 187 of file knewpassworddialog.cpp.
◆ setMinimumPasswordLength()
void KNewPasswordDialog::setMinimumPasswordLength | ( | int | minLength | ) |
Minimum acceptable password length.
Default: 0
- Parameters
-
minLength The new minimum password length
Definition at line 177 of file knewpassworddialog.cpp.
◆ setPasswordStrengthWarningLevel()
void KNewPasswordDialog::setPasswordStrengthWarningLevel | ( | int | warningLevel | ) |
Set the password strength level below which a warning is given Value is in the range 0 to 99.
Empty passwords score 0; non-empty passwords score up to 100, depending on their length and whether they contain numbers, mixed case letters and punctuation.
Default: 1 - warn if the password has no discernible strength whatsoever
- Parameters
-
warningLevel The level below which a warning should be given.
Definition at line 209 of file knewpassworddialog.cpp.
◆ setPrompt()
Sets the password prompt.
Definition at line 101 of file knewpassworddialog.cpp.
◆ setReasonablePasswordLength()
void KNewPasswordDialog::setReasonablePasswordLength | ( | int | reasonableLength | ) |
Password length that is expected to be reasonably safe.
Used to compute the strength level
Default: 8 - the standard UNIX password length
- Parameters
-
reasonableLength The new reasonable password length.
Definition at line 199 of file knewpassworddialog.cpp.
◆ setRevealPasswordAvailable()
void KNewPasswordDialog::setRevealPasswordAvailable | ( | bool | reveal | ) |
Whether to show the visibility trailing action in the line edit.
Default is true. This can be used to honor the lineedit_reveal_password kiosk key, for example:
- Since
- 5.31
Definition at line 237 of file knewpassworddialog.cpp.
◆ setRevealPasswordMode()
void KNewPasswordDialog::setRevealPasswordMode | ( | KPassword::RevealMode | revealPasswordMode | ) |
Set when the reveal password button will be visible.
The default is RevealPasswordMode::OnlyNew and the reveal password button will only be visible when entering a new password.
This can be used to honor the lineedit_reveal_password kiosk key, for example:
- Since
- 6.0
Definition at line 254 of file knewpassworddialog.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:43 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.