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;
81 TQString 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);
189 TQWidget *parent=0,
const char *name=0);
196 int extraBttn=0) KDE_DEPRECATED;
215 KPasswordDialog(Types type,
bool enableKeep,
int extraBttn, const TQString& iconName,
216 TQWidget *parent = 0, const
char *name = 0);
226 void setPrompt(TQString prompt);
231 TQString prompt() const;
236 void setKeepWarning(TQString warn);
241 void addLine(TQString key, TQString value);
247 void setAllowEmptyPasswords(
bool allowed);
253 bool allowEmptyPasswords() const;
263 void setMinimumPasswordLength(
int minLength);
269 int minimumPasswordLength() const;
278 void setMaximumPasswordLength(
int maxLength);
284 int maximumPasswordLength() const;
294 void setReasonablePasswordLength(
int reasonableLength);
300 int reasonablePasswordLength() const;
312 void setPasswordStrengthWarningLevel(
int warningLevel);
318 int passwordStrengthWarningLevel() const;
323 TQString password()
const {
return m_pEdit->
password(); }
330 void clearPassword();
335 bool keep()
const {
return m_Keep; }
349 static int getPassword(TQString &password, TQString prompt,
int *keep=0L);
361 static int getNewPassword(TQString &password, TQString prompt);
366 static void disableCoreDumps();
394 TQLabel *m_keepWarnLbl;
395 TQGridLayout *m_pGrid;
401 virtual void virtual_hook(
int id,
void* data );
403 class KPasswordDialogPrivate;
404 KPasswordDialogPrivate*
const d;
408 #endif // __KPassDlg_h_included__
A safe password input widget.
The user is asked to enter a password.
virtual bool checkPassword(const TQString &)
Virtual function that can be overridden to provide password checking in derived classes.
virtual void slotCancel()
Activated when the Cancel button has been clicked.
A dialog base class with standard buttons and predefined layouts.
bool keep() const
Returns true if the user wants to keep the password.
TQString password() const
Returns the password entered.
Types
This enum distinguishes the two operation modes of this dialog:
virtual void slotOk()
Activated when the Ok button has been clicked.