Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

KRestrictedLine Class Reference

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

#include <krestrictedline.h>

Inheritance diagram for KRestrictedLine:

KLineEdit KCompletionBase List of all members.

Signals

void invalidChar (int)

Public Methods

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

Protected Methods

void keyPressEvent (QKeyEvent *e)
virtual void virtual_hook (int id, void *data)

Detailed Description

A line editor for restricted character sets.

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.

Author:
Michael Wiedmann <mw@miwie.in-berlin.de>
Version:
0.0.1

Definition at line 44 of file krestrictedline.h.


Constructor & Destructor Documentation

KRestrictedLine::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:
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.


Member Function Documentation

void KRestrictedLine::invalidChar int    [signal]
 

Emitted when an invalid character was typed.

void KRestrictedLine::keyPressEvent QKeyEvent *    e [protected, virtual]
 

@reimplemented

Reimplemented from KLineEdit.

void KRestrictedLine::setValidChars const QString &    valid
 

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

QString KRestrictedLine::validChars  
 

Returns:
the string of acceptable characters.


The documentation for this class was generated from the following file:
Generated on Wed Aug 13 23:30:22 2003 for kdelibs by doxygen1.2.18