#include <krestrictedline.h>
Signals | |
void | invalidChar (int) |
Signals inherited from KLineEdit | |
void | completionBoxActivated (const TQString &) |
void | returnPressed (const TQString &) |
void | completion (const TQString &) |
void | substringCompletion (const TQString &) |
void | textRotation (TDECompletionBase::KeyBindingType) |
void | completionModeChanged (TDEGlobalSettings::Completion) |
void | aboutToShowContextMenu (TQPopupMenu *p) |
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 |
Public Member Functions inherited from KLineEdit | |
KLineEdit (const TQString &string, TQWidget *parent, const char *name=0) | |
KLineEdit (TQWidget *parent=0, const char *name=0) | |
virtual | ~KLineEdit () |
void | setURL (const KURL &url) |
void | cursorAtEnd () |
virtual void | setCompletionMode (TDEGlobalSettings::Completion mode) |
virtual void | setContextMenuEnabled (bool showMenu) |
bool | isContextMenuEnabled () const |
void | setURLDropsEnabled (bool enable) |
bool | isURLDropsEnabled () const |
void | setTrapReturnKey (bool trap) |
bool | trapReturnKey () const |
virtual bool | eventFilter (TQObject *, TQEvent *) |
TDECompletionBox * | completionBox (bool create=true) |
virtual void | setCompletionObject (TDECompletion *, bool hsig=true) |
virtual void | copy () const |
void | setEnableSqueezedText (bool enable) |
bool | isSqueezedTextEnabled () const |
TQString | originalText () const |
void | setCompletionBox (TDECompletionBox *box) |
void | setClickMessage (const TQString &msg) |
TQString | clickMessage () const |
Public Member Functions inherited from TDECompletionBase | |
TDECompletion * | completionObject (bool hsig=true) |
virtual void | setHandleSignals (bool handle) |
bool | isCompletionObjectAutoDeleted () const |
void | setAutoDeleteCompletionObject (bool autoDelete) |
void | setEnableSignals (bool enable) |
bool | handleSignals () const |
bool | emitSignals () const |
TDEGlobalSettings::Completion | completionMode () const |
bool | setKeyBinding (KeyBindingType item, const TDEShortcut &key) |
const TDEShortcut & | getKeyBinding (KeyBindingType item) const |
void | useGlobalKeyBindings () |
virtual void | setCompletedText (const TQString &text)=0 |
virtual void | setCompletedItems (const TQStringList &items)=0 |
TDECompletion * | compObj () const |
Protected Member Functions | |
void | keyPressEvent (TQKeyEvent *e) |
virtual void | virtual_hook (int id, void *data) |
Protected Member Functions inherited from KLineEdit | |
virtual void | resizeEvent (TQResizeEvent *) |
virtual void | mousePressEvent (TQMouseEvent *) |
virtual void | mouseDoubleClickEvent (TQMouseEvent *) |
virtual void | mouseReleaseEvent (TQMouseEvent *) |
virtual void | contextMenuEvent (TQContextMenuEvent *) |
virtual TQPopupMenu * | createPopupMenu () |
virtual void | drawContents (TQPainter *p) |
virtual void | dropEvent (TQDropEvent *) |
virtual void | setCompletedText (const TQString &, bool) |
void | setUserSelection (bool userSelection) |
virtual void | create (WId=0, bool initializeWindow=true, bool destroyOldWindow=true) |
virtual void | focusInEvent (TQFocusEvent *) |
virtual void | focusOutEvent (TQFocusEvent *) |
bool | autoSuggest () const |
Protected Member Functions inherited from TDECompletionBase | |
KeyBindingMap | getKeyBindings () const |
void | setDelegate (TDECompletionBase *delegate) |
TDECompletionBase * | delegate () const |
Additional Inherited Members | |
Public Types inherited from TDECompletionBase | |
enum | KeyBindingType |
Public Slots inherited from KLineEdit | |
virtual void | setReadOnly (bool) |
void | rotateText (TDECompletionBase::KeyBindingType type) |
virtual void | setCompletedText (const TQString &) |
void | setCompletedItems (const TQStringList &items) |
void | setCompletedItems (const TQStringList &items, bool autoSuggest) |
virtual void | clear () |
void | setSqueezedText (const TQString &text) |
virtual void | setText (const TQString &) |
Public Attributes inherited from TDECompletionBase | |
TextCompletion | |
PrevCompletionMatch | |
NextCompletionMatch | |
SubstringCompletion | |
Protected Slots inherited from KLineEdit | |
virtual void | makeCompletion (const TQString &) |
void | slotAboutToShow () |
void | slotCancelled () |
void | userCancelled (const TQString &cancelText) |
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::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.
◆ ~KRestrictedLine()
KRestrictedLine::~KRestrictedLine | ( | ) |
Destructs the restricted line editor.
Definition at line 36 of file krestrictedline.cpp.
Member Function Documentation
◆ invalidChar
|
signal |
Emitted when an invalid character was typed.
◆ keyPressEvent()
|
protectedvirtual |
Re-implemented for internal reasons.
API not affected.
See TQLineEdit::keyPressEvent().
Reimplemented from KLineEdit.
Definition at line 42 of file krestrictedline.cpp.
◆ setValidChars()
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.
◆ validChars()
TQString KRestrictedLine::validChars | ( | ) | const |
- Returns
- the string of acceptable characters.
Definition at line 73 of file krestrictedline.cpp.
The documentation for this class was generated from the following files: