26 #ifndef __PINENTRYDIALOG_H__
27 #define __PINENTRYDIALOG_H__
29 #include <QAccessible>
34 #include "core/function/SecureMemoryAllocator.h"
47 QPixmap applicationIconPixmap(
const QIcon &overlayIcon = {});
49 void raiseWindow(QWidget *w);
54 Q_PROPERTY(QString description READ description WRITE setDescription)
55 Q_PROPERTY(QString error READ error WRITE setError)
56 Q_PROPERTY(QString pin READ pin WRITE setPin)
57 Q_PROPERTY(QString prompt READ prompt WRITE setPrompt)
60 bool formatPassphrase;
71 int timeout = 0,
bool modal =
false,
72 bool enable_quality_bar =
false,
73 const QString &repeatString = QString(),
74 const QString &visibiltyTT = QString(),
75 const QString &hideTT = QString());
77 void setDescription(
const QString &);
78 QString description()
const;
80 void setError(
const QString &);
81 QString error()
const;
83 void setPin(
const QString &);
86 QString repeatedPin()
const;
87 void setRepeatErrorText(
const QString &);
89 void setPrompt(
const QString &);
90 QString prompt()
const;
92 void setOkText(
const QString &);
93 void setCancelText(
const QString &);
95 void setQualityBar(
const QString &);
96 void setQualityBarTT(
const QString &);
98 void setGenpinLabel(
const QString &);
99 void setGenpinTT(
const QString &);
101 void setCapsLockHint(
const QString &);
107 void setPinentryInfo(
struct pinentry);
109 bool timedOut()
const;
112 void updateQuality(
const QString &);
114 void textChanged(
const QString &);
115 void focusChanged(QWidget *old, QWidget *now);
116 void toggleVisibility();
119 void toggleFormattedPassphrase();
122 void keyPressEvent(QKeyEvent *event)
override;
123 void keyReleaseEvent(QKeyEvent *event)
override;
124 void showEvent(QShowEvent *event)
override;
127 void cancelTimeout();
128 void checkCapsLock();
132 enum PassphraseCheckResult {
133 PassphraseNotChecked = -1,
138 QLabel *_icon =
nullptr;
139 QLabel *_desc =
nullptr;
140 QLabel *_error =
nullptr;
141 QLabel *_prompt =
nullptr;
142 QLabel *_quality_bar_label =
nullptr;
143 QProgressBar *_quality_bar =
nullptr;
146 QLabel *mRepeatError =
nullptr;
147 QPushButton *_ok =
nullptr;
148 QPushButton *_cancel =
nullptr;
149 bool _grabbed =
false;
150 bool _have_quality_bar =
false;
151 bool _timed_out =
false;
152 bool _disable_echo_allowed =
true;
153 bool mEnforceConstraints =
false;
154 bool mFormatPassphrase =
false;
156 GpgFrontend::SecureUniquePtr<struct pinentry> _pinentry_info =
nullptr;
157 QTimer *_timer =
nullptr;
158 QString mVisibilityTT;
160 QAction *mVisiActionEdit =
nullptr;
161 QPushButton *mGenerateButton =
nullptr;
162 QCheckBox *mVisiCB =
nullptr;
163 QLabel *mFormattedPassphraseHint =
nullptr;
164 QLabel *mFormattedPassphraseHintSpacer =
nullptr;
165 QLabel *mCapsLockHint =
nullptr;
166 QLabel *mConstraintsHint =
nullptr;
167 QString mConstraintsErrorTitle;
Definition: pinentrydialog.h:51
Definition: pinlineedit.h:27
Definition: pinentrydialog.h:63
Definition: pinentrydialog.h:59
Definition: pinentry.h:46