KWidgetsAddons
kpassworddialog.h
130 explicit KPasswordDialog(QWidget *parent = nullptr, const KPasswordDialogFlags &flags = KPasswordDialog::NoFlags);
262 * This require the flag ShowUsernameLine to be set in the constructoe, and not the flag UsernameReadOnly
299 * dlg->setRevealPasswordAvailable(KAuthorized::authorize(QStringLiteral("lineedit_reveal_password")));
303 [[deprecated("Use setRevealPasswordMode instead.")]] void setRevealPasswordAvailable(bool reveal);
341 * @param keep true if the "remember password" checkbox was checked, false otherwise. false if ShowKeepPassword was not set in the constructor
A dialog for requesting a password and optionally a login from the end user.
Definition kpassworddialog.h:55
void setKeepPassword(bool b)
Check or uncheck the "keep password" checkbox.
Definition kpassworddialog.cpp:191
void setAnonymousMode(bool anonymous)
set anonymous mode (all other fields will be grayed out)
Definition kpassworddialog.cpp:172
@ ShowAnonymousLoginCheckBox
If this flag is set, the Anonymous Login checkbox will be displayed.
Definition kpassworddialog.h:82
@ ShowKeepPassword
If this flag is set, the "keep this password" checkbox will been shown, otherwise,...
Definition kpassworddialog.h:68
@ UsernameReadOnly
If this flag is set, the login lineedit will be in read only mode.
Definition kpassworddialog.h:77
@ DomainReadOnly
If this flag is set, the domain lineedit will be in read only mode.
Definition kpassworddialog.h:92
@ ShowDomainLine
If this flag is set, there will be an additional line to let the user enter the domain.
Definition kpassworddialog.h:87
@ ShowUsernameLine
If this flag is set, there will be an additional line to let the user enter his login.
Definition kpassworddialog.h:73
void gotUsernameAndPassword(const QString &username, const QString &password, bool keep)
emitted when the dialog has been accepted, and ShowUsernameLine was set on the constructor
@ FatalError
Error preventing further attempts, will result in disabling most of the interface.
Definition kpassworddialog.h:115
bool isRevealPasswordAvailable() const
Whether the visibility trailing action in the line edit is visible.
Definition kpassworddialog.cpp:367
void setPrompt(const QString &prompt)
Sets the prompt to show to the user.
Definition kpassworddialog.cpp:287
QFlags< KPasswordDialogFlag > KPasswordDialogFlags
Stores a combination of KPasswordDialogFlag values.
Definition kpassworddialog.h:97
void gotPassword(const QString &password, bool keep)
emitted when the dialog has been accepted
void setIcon(const QIcon &icon)
Set the icon that appears next to the prompt.
Definition kpassworddialog.cpp:124
void setRevealPasswordAvailable(bool reveal)
Whether to show the visibility trailing action in the line edit.
Definition kpassworddialog.cpp:362
virtual bool checkPassword()
Virtual function that can be overridden to provide password checking in derived classes.
Definition kpassworddialog.cpp:427
KPasswordDialog(QWidget *parent=nullptr, const KPasswordDialogFlags &flags=KPasswordDialog::NoFlags)
create a password dialog
Definition kpassworddialog.cpp:48
void addCommentLine(const QString &label, const QString &comment)
Adds a comment line to the dialog.
Definition kpassworddialog.cpp:201
QDialogButtonBox * buttonBox() const
Returns the button box used in the dialog.
Definition kpassworddialog.cpp:432
void setUsernameReadOnly(bool readOnly)
Sets the username field read-only and sets the focus to the password field.
Definition kpassworddialog.cpp:307
void setKnownLogins(const QMap< QString, QString > &knownLogins)
Presets a number of login+password pairs that the user can choose from.
Definition kpassworddialog.cpp:316
bool keepPassword() const
Determines whether supplied authorization should persist even after the application has been closed.
Definition kpassworddialog.cpp:196
KPassword::RevealMode revealPasswordMode() const
Return when the reveal password button is visible.
Definition kpassworddialog.cpp:374
void setUsernameContextHelp(const QString &help)
Sets contextual help for the username input field.
Definition kpassworddialog.cpp:437
void setRevealPasswordMode(KPassword::RevealMode revealPasswordMode)
Set when the reveal password button will be visible.
Definition kpassworddialog.cpp:379
QIcon icon() const
Returns the icon that appears next to the prompt.
Definition kpassworddialog.cpp:134
void showErrorMessage(const QString &message, const ErrorType type=PasswordError)
Shows an error message in the dialog box.
Definition kpassworddialog.cpp:249
QDialog(QWidget *parent, Qt::WindowFlags f)
virtual void accept()
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:56:58 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:56:58 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.