KWidgetsAddons
kpassworddialog.cpp
92 QObject::connect(ui.userEdit, &QLineEdit::returnPressed, ui.passEdit, qOverload<>(&QWidget::setFocus));
207 d->ui.formLayout->getContentsMargins(&gridMarginLeft, &gridMarginTop, &gridMarginRight, &gridMarginBottom);
212 spacing = style()->combinedLayoutSpacing(QSizePolicy::Label, QSizePolicy::LineEdit, Qt::Horizontal, nullptr, this);
294 d->ui.prompt->setMinimumHeight(d->ui.prompt->heightForWidth(width() - leftMarginHint - rightMarginHint));
347 connect(d->ui.userEdit, &QLineEdit::returnPressed, d->ui.passEdit, qOverload<>(&QWidget::setFocus));
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
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
void released()
void textActivated(const QString &text)
QString translate(const char *context, const char *sourceText, const char *disambiguation, int n)
virtual QSize sizeHint() const const override
void setBold(bool enable)
LabelRole
QPixmap pixmap(QWindow *window, const QSize &size, Mode mode, State state) const const
QIcon fromTheme(const QString &name)
virtual int heightForWidth(int w) const const override
void setTextInteractionFlags(Qt::TextInteractionFlags flags)
void setWordWrap(bool on)
virtual QWidget * widget() const const
void returnPressed()
ConstIterator
iterator begin()
const_iterator constEnd() const const
const_iterator constFind(const Key &key) const const
size_type count() const const
QList< Key > keys() const const
T value(const Key &key, const T &defaultValue) const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
T qobject_cast(QObject *object)
QString tr(const char *sourceText, const char *disambiguation, int n)
int width() const const
geometry
int width() const const
Label
bool isEmpty() const const
PM_MessageBoxIconSize
int combinedLayoutSpacing(QSizePolicy::ControlTypes controls1, QSizePolicy::ControlTypes controls2, Qt::Orientation orientation, QStyleOption *option, QWidget *widget) const const
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const const=0
void initFrom(const QWidget *widget)
Horizontal
TextBrowserInteraction
singleShot
QWidget * topLevelWidget() const const
void adjustSize()
font
bool isHidden() const const
void setMinimumSize(const QSize &)
void setMinimumWidth(int minw)
QScreen * screen() const const
void setFocus()
void setTabOrder(QWidget *first, QWidget *second)
sizeHint
QStyle * style() const const
width
void setWindowIcon(const QIcon &icon)
void setWindowTitle(const QString &)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.