20 #ifndef __KPassDlg_h_included__
21 #define __KPassDlg_h_included__
24 #include <tqlineedit.h>
25 #include <kdialogbase.h>
44 enum EchoModes { OneStar, ThreeStars, NoEcho };
57 KPasswordEdit(EchoMode echoMode, TQWidget *parent,
const char *name);
64 KPasswordEdit(EchoModes echoMode, TQWidget *parent,
const char *name);
70 KPasswordEdit(TQWidget *parent,
const char *name,
int echoMode) TDE_DEPRECATED;
80 TQString password()
const;
87 static const int PassLen;
96 void setMaxPasswordLength(
int newLength);
102 int maxPasswordLength()
const;
108 virtual void insert(
const TQString &);
111 virtual void keyPressEvent(TQKeyEvent *);
112 virtual void focusInEvent(TQFocusEvent *e);
113 virtual bool event(TQEvent *e);
188 TQWidget *parent=0,
const char *name=0);
195 int extraBttn=0) TDE_DEPRECATED;
214 KPasswordDialog(Types type,
bool enableKeep,
int extraBttn, const TQString& iconName,
215 TQWidget *parent = 0, const
char *name = 0);
225 void setPrompt(TQString prompt);
230 TQString prompt() const;
235 void setKeepWarning(TQString warn);
240 void addLine(TQString key, TQString value);
246 void setAllowEmptyPasswords(
bool allowed);
252 bool allowEmptyPasswords() const;
262 void setMinimumPasswordLength(
int minLength);
268 int minimumPasswordLength() const;
277 void setMaximumPasswordLength(
int maxLength);
283 int maximumPasswordLength() const;
293 void setReasonablePasswordLength(
int reasonableLength);
299 int reasonablePasswordLength() const;
311 void setPasswordStrengthWarningLevel(
int warningLevel);
317 int passwordStrengthWarningLevel() const;
322 TQString password()
const {
return m_pEdit->
password(); }
329 void clearPassword();
334 bool keep()
const {
return m_Keep; }
348 static int getPassword(TQString &password, TQString prompt,
int *keep=0L);
360 static int getNewPassword(TQString &password, TQString prompt);
365 static void disableCoreDumps();
393 TQLabel *m_keepWarnLbl;
394 TQGridLayout *m_pGrid;
400 virtual void virtual_hook(
int id,
void* data );
402 class KPasswordDialogPrivate;
403 KPasswordDialogPrivate*
const d;
A dialog base class with standard buttons and predefined layouts.
TQString password() const
Returns the password entered.
bool keep() const
Returns true if the user wants to keep the password.
virtual bool checkPassword(const TQString &)
Virtual function that can be overridden to provide password checking in derived classes.
Types
This enum distinguishes the two operation modes of this dialog:
@ Password
The user is asked to enter a password.
A safe password input widget.