# class KRestrictedLine | A line editor for restricted character sets. More...
Definition | `#include <krestrictedline.h>`
Inherits | KLineEdit [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- KRestrictedLine ( QWidget *parent=0, const char *name=0, const QString& valid = QString::null)
- ~KRestrictedLine ()
- void setValidChars (const QString& valid)
- QString validChars () const

#### Signals

- void invalidChar (int)

## Detailed Description

The KRestrictedLine widget is a variant of QLineEdit which accepts only a restricted set of characters as input. All other characters will be discarded and the signal invalidChar() will be emitted for each of them.

Valid characters can be passed as a QString to the constructor or set afterwards via setValidChars(). The default key bindings of QLineEdit are still in effect.

KRestrictedLine ( QWidget *parent=0, const char *name=0, const QString& valid = QString::null) | ### KRestrictedLine

Constructor: This contructor takes three - optional - arguments. The first two parameters are simply passed on to QLineEdit.

Parameters:

parent | pointer to the parent widget
name | pointer to the name of this widget
valid | pointer to set of valid characters

~KRestrictedLine () | ### ~KRestrictedLine

Destructs the restricted line editor.

void setValidChars (const QString& valid) | ### setValidChars

All characters in the string valid are treated as acceptable characters.

QString validChars () | ### validChars

[const]

Returns: the string of acceptable characters.

void invalidChar (int) | ### invalidChar

[signal]

Emitted when an invalid character was typed.

void keyPressEvent ( QKeyEvent *e ) | ### keyPressEvent

[protected]

Reimplemented from KLineEdit for internal purposes..

- Version: 0.0.1
- Author: Michael Wiedmann <mw@miwie.in-berlin.de>
- Generated: root@sparc.ports.openbsd.org on Wed May 2 09:37:45 2001, using kdoc 2.0a53.