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 {
return m_Password; }
89 static const int PassLen;
100 void setMaxPasswordLength(
int newLength);
106 int maxPasswordLength()
const;
112 virtual void insert(
const TQString &);
115 virtual void keyPressEvent(TQKeyEvent *);
116 virtual void focusInEvent(TQFocusEvent *e);
117 virtual bool event(TQEvent *e);
124 int m_EchoMode, m_Length;
204 TQWidget *parent=0,
const char *name=0);
211 int extraBttn=0) KDE_DEPRECATED;
230 KPasswordDialog(Types type,
bool enableKeep,
int extraBttn, const TQString& iconName,
231 TQWidget *parent = 0, const
char *name = 0);
241 void setPrompt(TQString prompt);
246 TQString prompt() const;
251 void setKeepWarning(TQString warn);
256 void addLine(TQString key, TQString value);
262 void setAllowEmptyPasswords(
bool allowed);
268 bool allowEmptyPasswords() const;
278 void setMinimumPasswordLength(
int minLength);
284 int minimumPasswordLength() const;
293 void setMaximumPasswordLength(
int maxLength);
299 int maximumPasswordLength() const;
309 void setReasonablePasswordLength(
int reasonableLength);
315 int reasonablePasswordLength() const;
327 void setPasswordStrengthWarningLevel(
int warningLevel);
333 int passwordStrengthWarningLevel() const;
339 const
char *password()
const {
return m_pEdit->
password(); }
346 void clearPassword();
351 bool keep()
const {
return m_Keep; }
365 static int getPassword(TQCString &password, TQString prompt,
int *keep=0L);
377 static int getNewPassword(TQCString &password, TQString prompt);
382 static void disableCoreDumps();
406 int m_Keep, m_Type, m_Row;
408 TQLabel *m_keepWarnLbl;
409 TQGridLayout *m_pGrid;
414 virtual void virtual_hook(
int id,
void* data );
416 class KPasswordDialogPrivate;
417 KPasswordDialogPrivate*
const d;
A dialog base class with standard buttons and predefined layouts.
bool keep() const
Returns true if the user wants to keep the password.
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:
@ Password
The user is asked to enter a password.
const char * password() const
Returns the password entered.
A safe password input widget.
const char * password() const
Returns the password.