KDEUI
knewpassworddialog.cpp
Go to the documentation of this file.
76 const QString strengthBarWhatsThis(i18n("The password strength meter gives an indication of the security "
92int KNewPasswordDialog::KNewPasswordDialogPrivate::effectivePasswordLength(const QString &password)
171 ui.labelMatch->setText(i18np("Password must be at least 1 character long", "Password must be at least %1 characters long", minPasswordLength));
181 int pwstrength = (20 * ui.linePassword->text().length() + 80 * effectivePasswordLength(ui.linePassword->text())) / qMax(reasonablePasswordLength, 2);
static int warningYesNo(QWidget *parent, const QString &text, const QString &caption=QString(), const KGuiItem &buttonYes=KStandardGuiItem::yes(), const KGuiItem &buttonNo=KStandardGuiItem::no(), const QString &dontAskAgainName=QString(), Options options=Options(Notify|Dangerous))
Display a "warning" dialog.
Definition: kmessagebox.cpp:564
void setPasswordStrengthWarningLevel(int warningLevel)
Set the password strength level below which a warning is given Value is in the range 0 to 99.
Definition: knewpassworddialog.cpp:332
void setReasonablePasswordLength(int reasonableLength)
Password length that is expected to be reasonably safe.
Definition: knewpassworddialog.cpp:312
void setAllowEmptyPasswords(bool allowed)
Allow empty passwords? - Default: true.
Definition: knewpassworddialog.cpp:276
void setPixmap(const QPixmap &)
Sets the pixmap that appears next to the prompt in the dialog.
Definition: knewpassworddialog.cpp:219
QPixmap pixmap() const
Returns the pixmap that appears next to the prompt in the dialog.
Definition: knewpassworddialog.cpp:226
void setMaximumPasswordLength(int maxLength)
Maximum acceptable password length.
Definition: knewpassworddialog.cpp:299
virtual bool checkPassword(const QString &)
Virtual function that can be overridden to provide password checking in derived classes.
Definition: knewpassworddialog.cpp:353
int minimumPasswordLength() const
Minimum acceptable password length.
Definition: knewpassworddialog.cpp:294
int passwordStrengthWarningLevel() const
Password strength level below which a warning is given.
Definition: knewpassworddialog.cpp:343
void setMinimumPasswordLength(int minLength)
Minimum acceptable password length.
Definition: knewpassworddialog.cpp:288
int maximumPasswordLength() const
Maximum acceptable password length.
Definition: knewpassworddialog.cpp:305
void newPassword(const QString &password)
The dialog has been accepted, and the new password is password.
void setPrompt(const QString &prompt)
Sets the password prompt.
Definition: knewpassworddialog.cpp:207
KNewPasswordDialog(QWidget *parent=0)
Constructs a password dialog.
Definition: knewpassworddialog.cpp:194
int reasonablePasswordLength() const
Password length that is expected to be reasonably safe.
Definition: knewpassworddialog.cpp:326
QString i18n(const char *text)
QString i18np(const char *sing, const char *plur, const A1 &a1)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.