#include <krestrictedline.h>

Signals | |
void | invalidChar (int) |
Public Member Functions | |
KRestrictedLine (TQWidget *parent=0, const char *name=0, const TQString &valid=TQString::null) | |
~KRestrictedLine () | |
void | setValidChars (const TQString &valid) |
TQString | validChars () const |
Protected Member Functions | |
void | keyPressEvent (TQKeyEvent *e) |
virtual void | virtual_hook (int id, void *data) |
Properties | |
TQString | validChars |
Detailed Description
A line editor for restricted character sets.
The KRestrictedLine widget is a variant of TQLineEdit 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 TQString to the constructor or set afterwards via setValidChars(). The default key bindings of TQLineEdit are still in effect.
Definition at line 44 of file krestrictedline.h.
Constructor & Destructor Documentation
KRestrictedLine::KRestrictedLine | ( | TQWidget * | parent = 0 , |
const char * | name = 0 , |
||
const TQString & | valid = TQString::null |
||
) |
Constructor: This contructor takes three - optional - arguments.
The first two parameters are simply passed on to TQLineEdit.
- Parameters:
-
parent pointer to the parent widget name pointer to the name of this widget valid pointer to set of valid characters
Definition at line 28 of file krestrictedline.cpp.
Destructs the restricted line editor.
Definition at line 36 of file krestrictedline.cpp.
Member Function Documentation
void KRestrictedLine::invalidChar | ( | int | ) | [signal] |
Emitted when an invalid character was typed.
void KRestrictedLine::keyPressEvent | ( | TQKeyEvent * | e | ) | [protected, virtual] |
Re-implemented for internal reasons.
API not affected.
See TQLineEdit::keyPressEvent().
Reimplemented from KLineEdit.
Definition at line 42 of file krestrictedline.cpp.
void KRestrictedLine::setValidChars | ( | const TQString & | valid | ) |
All characters in the string valid are treated as acceptable characters.
Definition at line 68 of file krestrictedline.cpp.
TQString KRestrictedLine::validChars | ( | ) | const |
- Returns:
- the string of acceptable characters.
The documentation for this class was generated from the following files: