| # kdeui Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# KPasswordEdit Class Reference

A safe password input widget. More...

`#include <kpassdlg.h>`

Inheritance diagram for KPasswordEdit:

[legend]
Collaboration diagram for KPasswordEdit:

[legend]
List of all members.

## Public Types
enum | EchoModes { OneStar, ThreeStars, NoEcho }
## Public Slots
virtual void | insert (const QString &)
| Reimplementation.
## Public Member Functions
| KPasswordEdit (QWidget *parent=0, const char *name=0)
| Constructs a password input widget using the user's global "echo mode" setting.
| KPasswordEdit (EchoMode echoMode, QWidget *parent, const char *name)
| Constructs a password input widget using echoMode as "echo mode".
| KPasswordEdit (QWidget *parent, const char *name, int echoMode)
| This class or method is obsolete, it is provided for compatibility only., may be removed in KDE 4.0 Creates a password input widget using echoMode as "echo mode".
| ~KPasswordEdit ()
| Destructs the widget.
const char * | password () const
| Returns the password.
void | erase ()
| Erases the current password.
## Static Public Attributes
const int | PassLen = 100
## 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 38 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 51 of file kpassdlg.cpp. References KGlobal::config(), KStdAccel::name(), and KConfigBase::readEntry().

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

| Constructs a password input widget using echoMode as "echo mode". Version: New in 3.0 Definition at line 74 of file kpassdlg.cpp. References KStdAccel::name().

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

| This class or method is obsolete, it is provided for compatibility only., may be removed in KDE 4.0 Creates a password input widget using echoMode as "echo mode". Definition at line 68 of file kpassdlg.cpp. References KStdAccel::name().

KPasswordEdit::~KPasswordEdit | ( |  | ) |

| Destructs the widget. Definition at line 89 of file kpassdlg.cpp.

## Member Function Documentation

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 69 of file kpassdlg.h. Referenced by KPasswordDialog::password(), and KPasswordDialog::slotOk().

void KPasswordEdit::erase | ( |  | ) |

| Erases the current password. Definition at line 111 of file kpassdlg.cpp. References QLineEdit::setText().

void KPasswordEdit::insert | ( | const QString & |  | ) | `[virtual, slot]`

| Reimplementation. Reimplemented from QLineEdit. Definition at line 96 of file kpassdlg.cpp. References QCString::length(), and QString::local8Bit().

The documentation for this class was generated from the following files:

- kpassdlg.h
- kpassdlg.cpp

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:03:49 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001