class KRestrictedLine

# 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)

#### Protected Methods

- virtual void virtual_hook ( int id, void* data )

## 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..

void virtual_hook ( int id, void* data ) | ### virtual_hook

[protected virtual]

Reimplemented from KLineEdit.

- Version: 0.0.1
- Author: Michael Wiedmann
- Generated: root on macppc.ports.openbsd.org on Sat Sep 6 10:36:37 2003, using kdoc 2.0a54.