class KRestrictedLine

A line editor for restricted character sets. More...

Definition#include <krestrictedline.h>
InheritsKLineEdit
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Signals


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)

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

Parameters:
parentpointer to the parent widget
namepointer to the name of this widget
validpointer to set of valid characters

KRestrictedLine ()

Destructs the restricted line editor.

void  setValidChars (const QString& valid)

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

QString  validChars ()

[const]

Returns: the string of acceptable characters.

void  invalidChar (int)

[signal]

Emitted when an invalid character was typed.

void  keyPressEvent ( QKeyEvent *e )

[protected]

Reimplemented from KLineEdit for internal reasons; the API is not affected.