KWidgetsAddons
kpassworddialog.cpp
92 QObject::connect(ui.userEdit, &QLineEdit::returnPressed, ui.passEdit, qOverload<>(&QWidget::setFocus));
219 d->ui.formLayout->getContentsMargins(&gridMarginLeft, &gridMarginTop, &gridMarginRight, &gridMarginBottom);
224 spacing = style()->combinedLayoutSpacing(QSizePolicy::Label, QSizePolicy::LineEdit, Qt::Horizontal, nullptr, this);
253 int w = sizeHint().width() - firstColumnWidth - leftMargin - rightMargin - gridMarginLeft - gridMarginRight - spacing;
305 d->ui.prompt->setMinimumHeight(d->ui.prompt->heightForWidth(width() - leftMarginHint - rightMarginHint));
358 connect(d->ui.userEdit, &QLineEdit::returnPressed, d->ui.passEdit, qOverload<>(&QWidget::setFocus));
void adjustSize()
void setWindowIcon(const QIcon &icon)
void showErrorMessage(const QString &message, const ErrorType type=PasswordError)
Shows an error message in the dialog box.
Definition: kpassworddialog.cpp:260
void setUsernameContextHelp(const QString &help)
Sets contextual help for the username input field.
Definition: kpassworddialog.cpp:433
@ UsernameReadOnly
If this flag is set, the login lineedit will be in read only mode.
Definition: kpassworddialog.h:76
bool keepPassword() const
Determines whether supplied authorization should persist even after the application has been closed.
Definition: kpassworddialog.cpp:208
QString translate(const char *context, const char *sourceText, const char *disambiguation, int n)
QIcon icon() const
Returns the icon that appears next to the prompt.
Definition: kpassworddialog.cpp:134
const T value(const Key &key, const T &defaultValue) const const
singleShot
QCA_EXPORT void init()
void released()
QMap::iterator begin()
QDialogButtonBox * buttonBox() const
Returns the button box used in the dialog.
Definition: kpassworddialog.cpp:428
void setAnonymousMode(bool anonymous)
set anonymous mode (all other fields will be grayed out)
Definition: kpassworddialog.cpp:184
QIcon fromTheme(const QString &name)
font
int width() const const
void initFrom(const QWidget *widget)
Label
int width() const const
void textActivated(const QString &text)
void setWordWrap(bool on)
QMap::const_iterator constFind(const Key &key) const const
void setMinimumSize(const QSize &)
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void setIcon(const QIcon &icon)
Set the icon that appears next to the prompt.
Definition: kpassworddialog.cpp:124
void setPrompt(const QString &prompt)
Sets the prompt to show to the user.
Definition: kpassworddialog.cpp:298
void addCommentLine(const QString &label, const QString &comment)
Adds a comment line to the dialog.
Definition: kpassworddialog.cpp:213
virtual QWidget * widget()
virtual int pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option, const QWidget *widget) const const=0
bool isRevealPasswordAvailable() const
Whether the visibility trailing action in the line edit is visible.
Definition: kpassworddialog.cpp:375
int combinedLayoutSpacing(QSizePolicy::ControlTypes controls1, QSizePolicy::ControlTypes controls2, Qt::Orientation orientation, QStyleOption *option, QWidget *widget) const const
@ ShowUsernameLine
If this flag is set, there will be an additional line to let the user enter his login.
Definition: kpassworddialog.h:72
QStyle * style() const const
KPasswordDialog(QWidget *parent=nullptr, const KPasswordDialogFlags &flags=KPasswordDialog::NoFlags)
create a password dialog
Definition: kpassworddialog.cpp:48
void setTabOrder(QWidget *first, QWidget *second)
@ FatalError
Error preventing further attempts, will result in disabling most of the interface.
Definition: kpassworddialog.h:114
Horizontal
bool isEmpty() const const
LabelRole
void setWindowTitle(const QString &)
void returnPressed()
int count(const Key &key) const const
virtual bool checkPassword()
Virtual function that can be overridden to provide password checking in derived classes.
Definition: kpassworddialog.cpp:423
PM_MessageBoxIconSize
@ DomainReadOnly
If this flag is set, the domain lineedit will be in read only mode.
Definition: kpassworddialog.h:91
void setKnownLogins(const QMap< QString, QString > &knownLogins)
Presets a number of login+password pairs that the user can choose from.
Definition: kpassworddialog.cpp:327
QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state) const const
QList< Key > keys() const const
void setRevealPasswordAvailable(bool reveal)
Whether to show the visibility trailing action in the line edit.
Definition: kpassworddialog.cpp:370
@ ShowKeepPassword
If this flag is set, the "keep this password" checkbox will been shown, otherwise,...
Definition: kpassworddialog.h:67
void setPixmap(const QPixmap &)
set an image that appears next to the prompt.
Definition: kpassworddialog.cpp:140
sizeHint
QString password() const
Returns the password entered by the user.
Definition: kpassworddialog.cpp:169
void setBold(bool enable)
ReturnByValue
bool isHidden() const const
QString username() const
Returns the username entered by the user.
Definition: kpassworddialog.cpp:164
@ ShowAnonymousLoginCheckBox
If this flag is set, the Anonymous Login checkbox will be displayed.
Definition: kpassworddialog.h:81
width
QString tr(const char *sourceText, const char *disambiguation, int n)
void setFocus()
virtual int heightForWidth(int w) const const override
QString message
dialog for requesting login and password from the end user
Definition: kpassworddialog.h:53
virtual QSize sizeHint() const const override
@ ShowDomainLine
If this flag is set, there will be an additional line to let the user enter the domain.
Definition: kpassworddialog.h:86
void setUsernameReadOnly(bool readOnly)
Sets the username field read-only and sets the focus to the password field.
Definition: kpassworddialog.cpp:318
void setKeepPassword(bool b)
Check or uncheck the "keep password" checkbox.
Definition: kpassworddialog.cpp:203
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Sep 26 2023 03:59:35 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Sep 26 2023 03:59:35 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.