21 #ifndef __KPassDlg_h_included__ 22 #define __KPassDlg_h_included__ 25 #include <tqlineedit.h> 26 #include <kdialogbase.h> 45 enum EchoModes { OneStar, ThreeStars, NoEcho };
58 KPasswordEdit(EchoMode echoMode, TQWidget *parent,
const char *name);
65 KPasswordEdit(EchoModes echoMode, TQWidget *parent,
const char *name);
71 KPasswordEdit(TQWidget *parent,
const char *name,
int echoMode) KDE_DEPRECATED;
82 const char *password()
const;
89 static const int PassLen;
98 void setMaxPasswordLength(
int newLength);
104 int maxPasswordLength()
const;
110 virtual void insert(
const TQString &);
113 virtual void keyPressEvent(TQKeyEvent *);
114 virtual void focusInEvent(TQFocusEvent *e);
115 virtual bool event(TQEvent *e);
198 TQWidget *parent=0,
const char *name=0);
205 int extraBttn=0) KDE_DEPRECATED;
225 TQWidget *parent = 0, const
char *name = 0);
235 void setPrompt(TQString prompt);
240 TQString prompt() const;
245 void setKeepWarning(TQString warn);
250 void addLine(TQString key, TQString value);
256 void setAllowEmptyPasswords(
bool allowed);
262 bool allowEmptyPasswords() const;
272 void setMinimumPasswordLength(
int minLength);
278 int minimumPasswordLength() const;
287 void setMaximumPasswordLength(
int maxLength);
293 int maximumPasswordLength() const;
303 void setReasonablePasswordLength(
int reasonableLength);
309 int reasonablePasswordLength() const;
321 void setPasswordStrengthWarningLevel(
int warningLevel);
327 int passwordStrengthWarningLevel() const;
333 const
char *password()
const {
return m_pEdit->
password(); }
340 void clearPassword();
345 bool keep()
const {
return m_Keep; }
359 static int getPassword(TQCString &password, TQString prompt,
int *keep=0L);
371 static int getNewPassword(TQCString &password, TQString prompt);
376 static void disableCoreDumps();
404 TQLabel *m_keepWarnLbl;
405 TQGridLayout *m_pGrid;
411 virtual void virtual_hook(
int id,
void* data );
413 class KPasswordDialogPrivate;
414 KPasswordDialogPrivate*
const d;
418 #endif // __KPassDlg_h_included__ virtual void slotOk()
Activated when the Ok button has been clicked.
A safe password input widget.
bool keep() const
Returns true if the user wants to keep the password.
A dialog base class with standard buttons and predefined layouts.
const char * password() const
Returns the password entered.
The user is asked to enter a password.
virtual void slotCancel()
Activated when the Cancel button has been clicked.
virtual bool checkPassword(const char *)
Virtual function that can be overridden to provide password checking in derived classes.
Types
This enum distinguishes the two operation modes of this dialog: