KWidgetsAddons
knewpasswordwidget.h
45 * m_passwordWidget->setBackgroundWarningColor(colorScheme.background(KColorScheme::NegativeBackground).color());
47 * connect(m_passwordWidget, &KNewPasswordWidget::passwordStatusChanged, this, &MyCustomDialog::slotPasswordStatusChanged);
71 Q_PROPERTY(int reasonablePasswordLength READ reasonablePasswordLength WRITE setReasonablePasswordLength)
72 Q_PROPERTY(int passwordStrengthWarningLevel READ passwordStrengthWarningLevel WRITE setPasswordStrengthWarningLevel)
73 Q_PROPERTY(QColor backgroundWarningColor READ backgroundWarningColor WRITE setBackgroundWarningColor)
74 Q_PROPERTY(bool passwordStrengthMeterVisible READ isPasswordStrengthMeterVisible WRITE setPasswordStrengthMeterVisible)
79 Q_PROPERTY(bool revealPasswordAvailable READ isRevealPasswordAvailable WRITE setRevealPasswordAvailable)
81 Q_PROPERTY(KPassword::RevealMode revealPasswordMode READ revealPasswordMode WRITE setRevealPasswordMode)
259 * passwordWidget.setRevealPasswordAvailable(KAuthorized::authorize(QStringLiteral("lineedit_reveal_password")));
263 [[deprecated("Use setRevealPasswordMode instead.")]] void setRevealPasswordAvailable(bool reveal);
void setRevealPasswordAvailable(bool reveal)
Whether to show the visibility trailing action in the line edit.
Definition knewpasswordwidget.cpp:311
void passwordStatusChanged()
Notify about the current status of the password being typed.
@ PasswordNotVerified
Password and verification password don't match.
Definition knewpasswordwidget.h:90
@ WeakPassword
Passwords match but the strength level is not enough.
Definition knewpasswordwidget.h:91
@ EmptyPasswordNotAllowed
Both passwords fields empty, but minimum length > 0.
Definition knewpasswordwidget.h:88
KNewPasswordWidget(QWidget *parent=nullptr)
Constructs a password widget.
Definition knewpasswordwidget.cpp:193
void setAllowEmptyPasswords(bool allowed)
Allow empty passwords?
Definition knewpasswordwidget.cpp:262
bool isRevealPasswordAvailable() const
Whether the visibility trailing action in the line edit is visible.
Definition knewpasswordwidget.cpp:245
void setPasswordStrengthWarningLevel(int warningLevel)
Set the password strength level below which a warning is given The value is guaranteed to be in the r...
Definition knewpasswordwidget.cpp:291
void setBackgroundWarningColor(const QColor &color)
When the verification password does not match, the background color of the verification field is set ...
Definition knewpasswordwidget.cpp:296
void setReasonablePasswordLength(int reasonableLength)
Password length that is expected to be reasonably safe.
Definition knewpasswordwidget.cpp:286
bool revealPasswordAvailable
Definition knewpasswordwidget.h:79
RevealPasswordMode
This enum describe when the reveal password button is visible.
Definition knewpasswordwidget.h:100
@ OnlyNew
Display the button when entering a new password, but doesn't let you see a previously entered passwor...
Definition knewpasswordwidget.h:105
void setPasswordStrengthMeterVisible(bool visible)
Whether to show the password strength meter (label and progress bar).
Definition knewpasswordwidget.cpp:302
void setMaximumPasswordLength(int maxLength)
Maximum acceptable password length.
Definition knewpasswordwidget.cpp:274
bool isPasswordStrengthMeterVisible() const
Whether the password strength meter is visible.
Definition knewpasswordwidget.cpp:237
void setRevealPasswordMode(KPassword::RevealMode revealPasswordMode)
Set when the reveal password button will be visible.
Definition knewpasswordwidget.cpp:318
void setMinimumPasswordLength(int minLength)
Minimum acceptable password length.
Definition knewpasswordwidget.cpp:268
Q_ENUM(...)
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
QWidget(QWidget *parent, Qt::WindowFlags f)
visible
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 21 2025 11:52:02 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 21 2025 11:52:02 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.