1 #ifndef DIALOGS_ENTERPASSWORDDIALOG_H
2 #define DIALOGS_ENTERPASSWORDDIALOG_H
13 class EnterPasswordDialog;
18 Q_PROPERTY(QString userName READ userName)
19 Q_PROPERTY(QString password READ password)
20 Q_PROPERTY(QString description READ description WRITE setDescription)
21 Q_PROPERTY(
bool promtForUserName READ promtForUserName WRITE setPromptForUserName)
22 Q_PROPERTY(
bool isVerificationRequired READ isVerificationRequired WRITE setVerificationRequired)
23 Q_PROPERTY(
bool isPasswordRequired READ isPasswordRequired WRITE setPasswordRequired)
24 Q_PROPERTY(QString instruction READ instruction WRITE setInstruction)
25 Q_PROPERTY(
bool isCapslockPressed READ isCapslockPressed)
30 const QString &userName()
const;
31 const QString &password()
const;
32 QString description()
const;
33 void setDescription(
const QString &description = QString());
34 bool promtForUserName()
const;
35 void setPromptForUserName(
bool prompt);
36 bool isVerificationRequired()
const;
37 void setVerificationRequired(
bool value);
38 bool isPasswordRequired()
const;
39 void setPasswordRequired(
bool value);
40 const QString &instruction()
const;
41 void setInstruction(
const QString &value);
45 bool event(QEvent *event)
override;
46 bool eventFilter(QObject *sender, QEvent *event)
override;
49 void updateShowPassword();
54 std::unique_ptr<Ui::EnterPasswordDialog> m_ui;
57 QString m_instruction;
58 bool m_capslockPressed;
97 inline void EnterPasswordDialog::abort()
100 done(QDialog::Rejected);
The EnterPasswordDialog class provides a simple dialog to ask the user for a password.
static bool isCapslockPressed()
#define QT_UTILITIES_EXPORT
Marks the symbol to be exported by the qtutilities library.