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) KDE_DEPRECATED;
81 const char *password()
const;
88 static const int PassLen;
97 void setMaxPasswordLength(
int newLength);
103 int maxPasswordLength()
const;
109 virtual void insert(
const TQString &);
112 virtual void keyPressEvent(TQKeyEvent *);
113 virtual void focusInEvent(TQFocusEvent *e);
114 virtual bool event(TQEvent *e);
197 TQWidget *parent=0,
const char *name=0);
204 int extraBttn=0) KDE_DEPRECATED;
223 KPasswordDialog(Types type,
bool enableKeep,
int extraBttn, const TQString& iconName,
224 TQWidget *parent = 0, const
char *name = 0);
234 void setPrompt(TQString prompt);
239 TQString prompt() const;
244 void setKeepWarning(TQString warn);
249 void addLine(TQString key, TQString value);
255 void setAllowEmptyPasswords(
bool allowed);
261 bool allowEmptyPasswords() const;
271 void setMinimumPasswordLength(
int minLength);
277 int minimumPasswordLength() const;
286 void setMaximumPasswordLength(
int maxLength);
292 int maximumPasswordLength() const;
302 void setReasonablePasswordLength(
int reasonableLength);
308 int reasonablePasswordLength() const;
320 void setPasswordStrengthWarningLevel(
int warningLevel);
326 int passwordStrengthWarningLevel() const;
332 const
char *password()
const {
return m_pEdit->
password(); }
339 void clearPassword();
344 bool keep()
const {
return m_Keep; }
358 static int getPassword(TQCString &password, TQString prompt,
int *keep=0L);
370 static int getNewPassword(TQCString &password, TQString prompt);
375 static void disableCoreDumps();
403 TQLabel *m_keepWarnLbl;
404 TQGridLayout *m_pGrid;
410 virtual void virtual_hook(
int id,
void* data );
412 class KPasswordDialogPrivate;
413 KPasswordDialogPrivate*
const d;
417 #endif // __KPassDlg_h_included__
virtual void slotOk()
Activated when the Ok button has been clicked.
A safe password input widget.
const char * password() const
Returns the password entered.
A dialog base class with standard buttons and predefined layouts.
bool keep() const
Returns true if the user wants to keep the password.
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: