#include <kpassdlg.h>

Inheritance diagram for KPasswordEdit:
QLineEdit

List of all members.

Public Types

enum  EchoModes { OneStar, ThreeStars, NoEcho }

Public Slots

virtual void insert (const QString &)

Public Member Functions

 KPasswordEdit (QWidget *parent=0, const char *name=0)
 KPasswordEdit (EchoMode echoMode, QWidget *parent, const char *name)
 KPasswordEdit (EchoModes echoMode, QWidget *parent, const char *name)
 KPasswordEdit (QWidget *parent, const char *name, int echoMode) KDE_DEPRECATED
 ~KPasswordEdit ()
const char * password () const
void erase ()
void setMaxPasswordLength (int newLength)
int maxPasswordLength () const

Static Public Attributes

static const int PassLen = 200

Protected Member Functions

virtual void keyPressEvent (QKeyEvent *)
virtual void focusInEvent (QFocusEvent *e)
virtual bool event (QEvent *e)

Detailed Description

A safe password input widget.

Author:
Geert Jansen <geertj@kde.org>

The widget uses the user's global "echo mode" setting.

Definition at line 39 of file kpassdlg.h.


Constructor & Destructor Documentation

KPasswordEdit::KPasswordEdit ( QWidget parent = 0,
const char *  name = 0 
)

Constructs a password input widget using the user's global "echo mode" setting.

Definition at line 105 of file kpassdlg.cpp.

KPasswordEdit::KPasswordEdit ( EchoMode  echoMode,
QWidget parent,
const char *  name 
)

Constructs a password input widget using echoMode as "echo mode".

Note that echoMode is a QLineEdit::EchoMode.

Since:
3.0

Definition at line 136 of file kpassdlg.cpp.

KPasswordEdit::KPasswordEdit ( EchoModes  echoMode,
QWidget parent,
const char *  name 
)

Constructs a password input widget using echoMode as "echo mode".

Note that echoMode is a KPasswordEdit::EchoModes.

Since:
3.2

Definition at line 130 of file kpassdlg.cpp.

KPasswordEdit::KPasswordEdit ( QWidget parent,
const char *  name,
int  echoMode 
)
Deprecated:
, will be removed in KDE 4.0 Creates a password input widget using echoMode as "echo mode".

Definition at line 124 of file kpassdlg.cpp.

Destructs the widget.

Definition at line 154 of file kpassdlg.cpp.


Member Function Documentation

Erases the current password.

Definition at line 178 of file kpassdlg.cpp.

void KPasswordEdit::insert ( const QString txt) [virtual, slot]

Reimplementation.

Reimplemented from QLineEdit.

Definition at line 161 of file kpassdlg.cpp.

Returns the current maximum password length.

Since:
3.4

Definition at line 295 of file kpassdlg.cpp.

const char* KPasswordEdit::password ( ) const [inline]

Returns the password.

The memory is freed in the destructor so you should make a copy.

Definition at line 82 of file kpassdlg.h.

void KPasswordEdit::setMaxPasswordLength ( int  newLength)

Set the current maximum password length.

If a password longer than the limit specified is currently entered, it is truncated accordingly.

The length is capped to lie between 0 and 199 inclusive.

Parameters:
newLength,:The new maximum password length
Since:
3.4

Definition at line 282 of file kpassdlg.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys